• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C# FernBusinessBase.IDRequest类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中FernBusinessBase.IDRequest的典型用法代码示例。如果您正苦于以下问题:C# IDRequest类的具体用法?C# IDRequest怎么用?C# IDRequest使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



IDRequest类属于FernBusinessBase命名空间,在下文中一共展示了IDRequest类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: GetProfileListForExtension

 public List<IProfile> GetProfileListForExtension(Guid companyId, Guid extensionId)
 {
     var request = new IDRequest(extensionId) { CompanyID = companyId };
     var response = _proxy.Invoke(service => service.GetProfileListForExtension(request));
     ErrorHandler.Check(response);
     return response.List.OfType<IProfile>().ToList();
 }
开发者ID:ashish-antil,项目名称:Products,代码行数:7,代码来源:ProfileProviderBase.cs


示例2: GetNotificationTemplateList

        public GetListResponse<NotificationItem> GetNotificationTemplateList(IDRequest request)
        {
            try
            {
                var response = new GetListResponse<NotificationItem>();
                var db = ImardaDatabase.CreateDatabase(Util.GetConnName<NotificationItem>());
                bool includeInactive = request.HasSome(RetrievalOptions.IncludeInactive);
                object[] args = new object[] { includeInactive, request.ID };
                using (IDataReader dr = db.ExecuteDataReader("SPGetNotificationTemplateList", args))
                {
                    response.List = new List<NotificationItem>();
                    while (dr.Read())
                    {
                        response.List.Add(GetFromData<NotificationItem>(dr));
                    }

                    return response;
                }

            }
            catch (Exception ex)
            {
                return ErrorHandler.Handle<GetListResponse<NotificationItem>>(ex);
            }
        }
开发者ID:ashish-antil,项目名称:Products,代码行数:25,代码来源:NotificationItem.Extra.cs


示例3: GetApplicationFeatureListByOwnerID

        public GetListResponse<ApplicationFeature> GetApplicationFeatureListByOwnerID(IDRequest request)
        {
            try
            {
                var response = new GetListResponse<ApplicationFeature>();
                var db = ImardaDatabase.CreateDatabase(Util.GetConnName<ApplicationFeature>());

                bool includeInactive = request.HasSome(RetrievalOptions.IncludeInactive);
                int topn = request.Get<int>("TopN", int.MaxValue);

                Guid ownerid = Guid.Empty;
                request.Get<Guid>("OwnerID", out ownerid);

                using (IDataReader dr = db.ExecuteDataReader("SPGetApplicationFeatureListByOwnerID", includeInactive, topn, request.CompanyID, ownerid))
                {
                    response.List = new List<ApplicationFeature>();
                    while (dr.Read())
                    {
                        response.List.Add(GetFromData<ApplicationFeature>(dr));
                    }

                    return response;
                }

            }
            catch (Exception ex)
            {
                return ErrorHandler.Handle<GetListResponse<ApplicationFeature>>(ex);
            }
        }
开发者ID:ashish-antil,项目名称:Products,代码行数:30,代码来源:ApplicationFeature.Extra.cs


示例4: GetReportListByReportTypeID

 public GetListResponse<Report> GetReportListByReportTypeID(IDRequest request)
 {
     Initialize();
     var response = new GetListResponse<Report>();
     try
     {
         var db = ImardaDatabase.CreateDatabase(Util.GetConnName<Report>());
         object[] args = new object[] { request.ID };
         using (IDataReader dr = db.ExecuteDataReader("SPGetReportListByReportTypeID", args))
         {
             response.List = new List<Report>();
             while (dr.Read())
             {
                 var report = GetFromData<Report>(dr);
                 SetAccessInformation(report);
                 response.List.Add(report);
             }
             response.Status = true;
             return response;
         }
     }
     catch (Exception ex)
     {
         return ErrorHandler.Handle<GetListResponse<Report>>(ex);
     }
 }
开发者ID:ashish-antil,项目名称:Products,代码行数:26,代码来源:Report.Extra.cs


示例5: DeleteContact

        public BusinessMessageResponse DeleteContact(IDRequest request)
        {
            try
            {
                BusinessMessageResponse appResponse = null;
                var service = ImardaProxyManager.Instance.IImardaCRMProxy;
                ChannelInvoker.Invoke(delegate(out IClientChannel channel)
                {
                    channel = service as IClientChannel;
                    var response = service.DeleteContact(request);
                    ErrorHandler.Check(response);

                    if (!request.ContainsKey("contactType") || !((int)Contact.ContactType.ContactPerson).ToString().Equals(request["contactType"]))
                    {
                        response = service.DeleteContactRelatedPersons(request);
                        ErrorHandler.Check(response);
                    }
                    appResponse = response;
                });

                return appResponse;
            }
            catch (Exception ex)
            {
                return ErrorHandler.Handle<BusinessMessageResponse>(ex);
            }
        }
开发者ID:ashish-antil,项目名称:Products,代码行数:27,代码来源:Contact.cs


示例6: DeleteLinkedReports

 public BusinessMessageResponse DeleteLinkedReports(IDRequest request)
 {
     try
     {
         Initialize();
         int countDB = 0;
         int countRS = 0;
         var db = ImardaDatabase.CreateDatabase(Util.GetConnName<ReportType>());
         IDataReader dr;
         if (request.ID == Guid.Empty)
         {
             string name = request["name"];
             dr = db.ExecuteDataReader("GetReportsByNamePattern", name);
         }
         else
         {
             dr = db.ExecuteDataReader("SPGetReportType", request.ID);
         }
         using (dr)
         {
             while (dr.Read())
             {
                 DeleteOneLinkedReport(db, dr, ref countDB, ref countRS);
             }
             return new BusinessMessageResponse { StatusMessage = string.Format("{0}|{1}", countDB, countRS) };
         }
     }
     catch (Exception ex)
     {
         return ErrorHandler.Handle(ex);
     }
 }
开发者ID:ashish-antil,项目名称:Products,代码行数:32,代码来源:Report.Extra.cs


示例7: GetContactByName

        public GetItemResponse<Contact> GetContactByName(IDRequest request)
        {
            try
            {
                var response = new GetItemResponse<Contact>();
                var db = ImardaDatabase.CreateDatabase(Util.GetConnName<Contact>());
                string custName = request.GetString("custName");

                using (IDataReader dr = db.ExecuteDataReader("SPGetContactByName", request.ID, custName))
                {
                    response = new GetItemResponse<Contact>();

                    if (dr.Read())
                    {
                        response.Item = (GetFromData<Contact>(dr));
                    }

                    return response;
                }
            }
            catch (Exception ex)
            {
                return ErrorHandler.Handle<GetItemResponse<Contact>>(ex);
            }
        }
开发者ID:ashish-antil,项目名称:Products,代码行数:25,代码来源:Contact.Extra.cs


示例8: GetContactListByParentId

        public GetListResponse<Contact> GetContactListByParentId(IDRequest request)
        {
            try
            {
                var response = new GetListResponse<Contact>();
                var db = ImardaDatabase.CreateDatabase(Util.GetConnName<Contact>());

                bool includeInactive = request.HasSome(RetrievalOptions.IncludeInactive);
                int topn = request.Get<int>("TopN", int.MaxValue);
                int contactType = request.Get<int>("ContactType", 0);
                Guid parentId = request.Get("ParentId", Guid.Empty);
                using (IDataReader dr = db.ExecuteDataReader("SPGetContactListByParentId", includeInactive, request.CompanyID, topn, contactType, parentId))
                {
                    response.List = new List<Contact>();
                    while (dr.Read())
                    {
                        response.List.Add(GetFromData<Contact>(dr));
                    }

                    return response;
                }

            }
            catch (Exception ex)
            {
                return ErrorHandler.Handle<GetListResponse<Contact>>(ex);
            }
        }
开发者ID:ashish-antil,项目名称:Products,代码行数:28,代码来源:Contact.Extra.cs


示例9: GetContactList

 //get contact list by type
 public GetListResponse<Contact> GetContactList(IDRequest request)
 {
     var response = new GetListResponse<Contact>();
     response.List = new List<Contact>();
     try
     {
         var db = ImardaDatabase.CreateDatabase(Util.GetConnName<Contact>());
         string spName = "SPGetContactList";
         byte type = 0;
         if (request.ContainsKey("Type")) type = byte.Parse(request["Type"]);
         int size = 0;
         if (request.ContainsKey("TopN")) int.TryParse(request["TopN"], out size);
         bool includeInactive = request.HasSome(RetrievalOptions.IncludeInactive);
         Guid id = request.ID;
         var args = new object[] { includeInactive, id, type };
         using (IDataReader dr = db.ExecuteDataReader(spName, args))
         {
             while (dr.Read()) response.List.Add(GetFromData<Contact>(dr));
             if (size > 0 && response.List.Count > size)
             {
                 response.List.RemoveRange(size - 1, response.List.Count - size);
             }
             return response;
         }
     }
     catch (Exception ex)
     {
         return ErrorHandler.Handle<GetListResponse<Contact>>(ex);
     }
 }
开发者ID:ashish-antil,项目名称:Products,代码行数:31,代码来源:Contact.cs


示例10: GetBillableFeaturesByCompanyID

        public GetListResponse<BillableFeature> GetBillableFeaturesByCompanyID(IDRequest request)
        {
            try
            {
                var response = new GetListResponse<BillableFeature>();
                var db = ImardaDatabase.CreateDatabase(Util.GetConnName<BillableFeature>());

                object[] args = new object[] { request.ID };
                using (IDataReader dr = db.ExecuteDataReader("SPGetBillableFeaturesByCompanyID", args))
                {
                    response.List = new List<BillableFeature>();
                    while (dr.Read())
                    {
                        response.List.Add(GetFromData<BillableFeature>(dr));
                    }

                    return response;
                }

            }
            catch (Exception ex)
            {
                return ErrorHandler.Handle<GetListResponse<BillableFeature>>(ex);
            }
        }
开发者ID:ashish-antil,项目名称:Products,代码行数:25,代码来源:BillableFeature.cs


示例11: GetFtpFailedDueList

        //public GetListResponse<FtpFailed> GetFtpFailedListByNotificationID(IDRequest request)
        //{
        //    try
        //    {
        //        return GenericGetRelated<FtpFailed>("NotificationID", request.ID, false);
        //    }
        //    catch (Exception ex)
        //    {
        //        return ErrorHandler.Handle<GetListResponse<FtpFailed>>(ex);
        //    }
        //}
        public GetListResponse<FtpFailed> GetFtpFailedDueList(IDRequest request)
        {
            var result = new GetListResponse<FtpFailed>();

            try
            {
                var db = ImardaDatabase.CreateDatabase(Util.GetConnName<FtpFailed>());

                object[] args = new object[] { DateTime.UtcNow };
                using (IDataReader dr = db.ExecuteDataReader("SPGetFtpFailedDueList", args))
                {
                    while (dr.Read())
                    {
                        result.List.Add(GetFromData<FtpFailed>(dr));
                    }

                    return result;
                }

            }
            catch (Exception ex)
            {
                return ErrorHandler.Handle<GetListResponse<FtpFailed>>(ex);
            }
        }
开发者ID:ashish-antil,项目名称:Products,代码行数:36,代码来源:FtpFailed.Extra.cs


示例12: CancelScheduledAppTask

 /// <summary>
 /// Cancel the scheduled task.
 /// </summary>
 /// <param name="request">ID = ScheduledTask.ID, ["QueueID"]=queue where scheduled</param>
 /// <returns></returns>
 public SolutionMessageResponse CancelScheduledAppTask(IDRequest request)
 {
     try
     {
         Guid id = request.ID;
         ScheduledTask task = null;
         var service = ImardaTaskProxyManager.Instance.IImardaTaskProxy;
         ChannelInvoker.Invoke(delegate(out IClientChannel channel)
         {
             channel = service as IClientChannel;
             var resp1 = service.GetScheduledTask(new IDRequest(id));
             ErrorHandler.CheckItem(resp1);
             task = resp1.Item;
             if (task.Status == (byte)TaskStatus.Queued)
             {
                 var resp2 = service.SetScheduledTaskStatus(new GenericRequest(id, (byte)AppTaskStatus.Cancelled));
                 ErrorHandler.Check(resp2);
             }
         });
         return new SolutionMessageResponse { StatusMessage = task.QueueID };
     }
     catch (Exception ex)
     {
         return ErrorHandler.Handle<SolutionMessageResponse>(ex);
     }
 }
开发者ID:ashish-antil,项目名称:Products,代码行数:31,代码来源:AppTask.cs


示例13: GetSecurityEntity

        public GetItemResponse<SecurityEntity> GetSecurityEntity(IDRequest request)
        {
            var response = new GetItemResponse<SecurityEntity>();
            try
            {
                response = GenericGetEntity<SecurityEntity>(request);
                if (response != null && response.Item != null)
                {
                    SecurityEntity entity = response.Item;

                    Guid applicationID;
                    request.Get<Guid>("appid", out applicationID);

                    //fill in permission list
                    entity.PermissionList = GetSecurityPermissionList(applicationID, entity);

                    // fill in the parent id list
                    entity.ImmediateParentsIds = GetEntityRelationships(entity.ID);

                    response.Item = entity;
                }
            }
            catch (Exception ex)
            {
                return ErrorHandler.Handle<GetItemResponse<SecurityEntity>>(ex);
            }
            return response;
        }
开发者ID:ashish-antil,项目名称:Products,代码行数:28,代码来源:SecurityEntity.cs


示例14: GetSMSPendingList

        public GetListResponse<SMSPending> GetSMSPendingList(IDRequest request)
        {
            var result = new GetListResponse<SMSPending>();

            try
            {
                var db = ImardaDatabase.CreateDatabase(Util.GetConnName<SMSPending>());
                int numRecords = 100; //process 100 SMS at a time
                if (request.ContainsKey("NumRecords"))  //! IM-2342
                    int.TryParse(request["NumRecords"], out numRecords);
                object[] args = new object[] { numRecords };
                using (IDataReader dr = db.ExecuteDataReader("SPGetSMSPendingList", args))
                {
                    while (dr.Read())
                    {
                        result.List.Add(GetFromData<SMSPending>(dr));
                    }

                    return result;
                }

            }
            catch (Exception ex)
            {
                return ErrorHandler.Handle<GetListResponse<SMSPending>>(ex);
            }
        }
开发者ID:ashish-antil,项目名称:Products,代码行数:27,代码来源:SMSPending.cs


示例15: GetProfile

 public IProfile GetProfile(Guid profileId)
 {
     var request = new IDRequest(profileId);
     var response = _proxy.Invoke(service => service.GetExtensionProfile(request));
     ErrorHandler.Check(response);
     return response.Item;
 }
开发者ID:ashish-antil,项目名称:Products,代码行数:7,代码来源:ProfileProviderBase.cs


示例16: DeleteSecurityObject

 public BusinessMessageResponse DeleteSecurityObject(IDRequest request)
 {
     try {
         return GenericDeleteEntity<SecurityObject>("SecurityObject", true, new object[] { request.ID });
     }
     catch (Exception ex) {
         return ErrorHandler.Handle(ex);
     }
 }
开发者ID:ashish-antil,项目名称:Products,代码行数:9,代码来源:SecurityObject.cs


示例17: GetSecurityObjectList

 public GetListResponse<SecurityObject> GetSecurityObjectList(IDRequest request)
 {
     try {
         return GenericGetEntityList<SecurityObject>("SecurityObject", true, request.ID);
     }
     catch (Exception ex) {
         return ErrorHandler.Handle<GetListResponse<SecurityObject>>(ex);
     }
 }
开发者ID:ashish-antil,项目名称:Products,代码行数:9,代码来源:SecurityObject.cs


示例18: GetRelationShipTypeList

 public GetListResponse<RelationShipType> GetRelationShipTypeList(IDRequest request)
 {
     try
     {
         return GenericGetEntityList<RelationShipType>(request);
     }
     catch (Exception ex)
     {
         return ErrorHandler.Handle<GetListResponse<RelationShipType>>(ex);
     }
 }
开发者ID:ashish-antil,项目名称:Products,代码行数:11,代码来源:RelationShipType.cs


示例19: DeleteRelationShipType

 public BusinessMessageResponse DeleteRelationShipType(IDRequest request)
 {
     try
     {
         return GenericDeleteEntity<RelationShipType>("RelationShipType", request.ID);
     }
     catch (Exception ex)
     {
         return ErrorHandler.Handle(ex);
     }
 }
开发者ID:ashish-antil,项目名称:Products,代码行数:11,代码来源:RelationShipType.cs


示例20: GetReport

 public GetItemResponse<Report> GetReport(IDRequest request)
 {
     try
     {
         return GenericGetEntity<Report>(request);
     }
     catch (Exception ex)
     {
         return ErrorHandler.Handle<GetItemResponse<Report>>(ex);
     }
 }
开发者ID:ashish-antil,项目名称:Products,代码行数:11,代码来源:Report.cs



注:本文中的FernBusinessBase.IDRequest类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# Fiddler.Session类代码示例发布时间:2022-05-24
下一篇:
C# DX11.DX11RenderContext类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap