本文整理汇总了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);
}
}
示例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);
}
}
示例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;
}
}
示例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);
}
}
示例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);
}
}
示例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);
}
}
示例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);
}
}