当前位置: 首页>>代码示例>>C#>>正文


C# IDRequest.GetString方法代码示例

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


在下文中一共展示了IDRequest.GetString方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: GetMessageListByUser

 public GetListResponse<MessageItem> GetMessageListByUser(IDRequest request)
 {
     try
     {
         return ImardaDatabase.GetList<MessageItem>("SPGetMessageListByUser", new Guid(request.GetString("userid")), request.GetString("ViewDate"));
     }
     catch (Exception ex)
     {
         return ErrorHandler.Handle<GetListResponse<MessageItem>>(ex);
     }
 }
开发者ID:ashish-antil,项目名称:Products,代码行数:11,代码来源:MessageItem.Extra.cs

示例2: 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

示例3: DeleteAttributeDefinition

 public BusinessMessageResponse DeleteAttributeDefinition(IDRequest request)
 {
     var response = new BusinessMessageResponse();
     try
     {
         var entityName = request.GetString("EntityName");
         var attribName = request.GetString("AttributeName");
         return GenericDeleteEntity<AttributeDefinition>("AttributeDefinition", request.ID, entityName, attribName);
     }
     catch (Exception ex)
     {
         response.Status = false;
         response.ErrorCode = ex.StackTrace + ", " + ex.Message;
         response.StatusMessage = ex.StackTrace + ", " + ex.Message;
         return response;
     }
 }
开发者ID:ashish-antil,项目名称:Products,代码行数:17,代码来源:AttributeDefinition.cs

示例4: SaveMessageViewedByUser

 public BusinessMessageResponse SaveMessageViewedByUser(IDRequest request)
 {
     try
     {
         bool deleted = false;
         if (!string.IsNullOrEmpty(request.GetString("deleted")))
             deleted = true;
         object[] properties = new object[]{
             new Guid(request.GetString("userid")),
             new Guid(request.GetString("messageid")),
             deleted
         };
         return GenericSaveEntity<MessageItem>("MessageViewedByUser", properties);
     }
     catch (Exception ex)
     {
         return ErrorHandler.Handle(ex);
     }
 }
开发者ID:ashish-antil,项目名称:Products,代码行数:19,代码来源:MessageItem.Extra.cs

示例5: GetRouteByExternalID

 public GetItemResponse<Route> GetRouteByExternalID(IDRequest request)
 {
     try
     {
         bool includeInactive = request.HasSome(RetrievalOptions.IncludeInactive);
         Guid companyID = request.CompanyID;
         string externalID = request.GetString("ExternalID");
         return ImardaDatabase.GetItem<Route>("SPGetRouteByExternalID", request.ID, includeInactive, externalID);
     }
     catch (Exception ex)
     {
         return ErrorHandler.Handle<GetItemResponse<Route>>(ex);
     }
 }
开发者ID:ashish-antil,项目名称:Products,代码行数:14,代码来源:Route.Extra.cs

示例6: SearchContactList

        public GetListResponse<Contact> SearchContactList(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);
                string searchContent = request.GetString("SearchContent") ?? "";
                using (IDataReader dr = db.ExecuteDataReader("SPSearchContactList", includeInactive, request.CompanyID, topn, contactType, searchContent))
                {
                    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

示例7: SendNotification

        /// <summary>
        /// Send an email or sms
        /// </summary>
        /// <param name="request">.ID=Notification.ID, ["PersonID"] = Person.ID, ["Data"]=typedDataKV, ["TZ"]=Windows time zone name, ["Type"]="email" or "sms"</param>
        /// <returns></returns>
        public SolutionMessageResponse SendNotification(IDRequest request)
        {
            try
            {
                SolutionMessageResponse appResponse = null;
                var service = ImardaProxyManager.Instance.IImardaCRMProxy;
                ChannelInvoker.Invoke(delegate(out IClientChannel channel)
                {
                    channel = service as IClientChannel;
                    Guid notificationItemID = request.ID;
                    var data = request.GetString("Data");
                    var tzid = request.GetString("TZ");
                    var personID = request.Get("PersonID", Guid.Empty);
                    var req = new GenericRequest(personID, notificationItemID, request.CompanyID, data, tzid);
                    string type = request.GetString("Type");
                    BusinessMessageResponse response = null;
                    if (type == "email")
                    {
                        response = service.SendNotificationEmail(req);
                    }
                    else if (type == "sms")
                    {
                        response = service.SendNotificationSMS(req);
                    }
                    else throw new ArgumentException("'Type' missing: 'sms' or 'email'");

                    ErrorHandler.Check(response);
                    //TODO more stuff here...?
                    appResponse = new SolutionMessageResponse();
                });
                return appResponse;
            }
            catch (Exception ex)
            {
                return ErrorHandler.Handle<SolutionMessageResponse>(ex);
            }
        }
开发者ID:ashish-antil,项目名称:Products,代码行数:42,代码来源:NotificationPlan.Extra.cs


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