本文整理汇总了C#中BLL.Save方法的典型用法代码示例。如果您正苦于以下问题:C# BLL.Save方法的具体用法?C# BLL.Save怎么用?C# BLL.Save使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类BLL
的用法示例。
在下文中一共展示了BLL.Save方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: SavePersonMessage
private void SavePersonMessage(BO.ORCID.PersonMessage personMessage, BO.ORCID.REFPermission refPermission, BLL.ORCID.PersonMessage personMessageBLL)
{
if (!personMessage.MessagePostSuccess)
{
string rsp = personMessage.XML_Response;
int openTag = rsp.IndexOf("<error-desc>") + ("<error-desc>").Length;
int closeTag = rsp.IndexOf("</error-desc>");
personMessage.RecordStatusID = (int)ProfilesRNSDLL.BO.ORCID.REFRecordStatus.REFRecordStatuss.Failed;
if (rsp.Contains("<error-desc>"))
{
personMessage.UserMessage = rsp.Substring(openTag, closeTag - openTag);
switch ((ProfilesRNSDLL.BO.ORCID.REFPermission.REFPermissions)personMessage.PermissionID)
{
case BO.ORCID.REFPermission.REFPermissions.orcid_bio_update:
case BO.ORCID.REFPermission.REFPermissions.orcid_works_create:
personMessage.UserMessage = refPermission.FailedMessage + ".";
break;
}
}
else
{
personMessage.UserMessage = rsp;
}
}
else
{
personMessage.RecordStatusID = (int)ProfilesRNSDLL.BO.ORCID.REFRecordStatus.REFRecordStatuss.Success;
switch ((ProfilesRNSDLL.BO.ORCID.REFPermission.REFPermissions)personMessage.PermissionID)
{
case BO.ORCID.REFPermission.REFPermissions.orcid_bio_update:
case BO.ORCID.REFPermission.REFPermissions.orcid_works_create:
case BO.ORCID.REFPermission.REFPermissions.orcid_profile_read_limited:
case BO.ORCID.REFPermission.REFPermissions.affiliations_create:
personMessage.UserMessage = refPermission.SuccessMessage + ".";
break;
default:
throw new Exception("Unhandled Permission Type for Success Message.");
}
}
personMessage.PostDate = DateTime.Now;
personMessageBLL.Save(personMessage);
}
示例2: InitializePersonMessageRequestInfo
private void InitializePersonMessageRequestInfo(BO.ORCID.PersonMessage personMessage, BLL.ORCID.PersonMessage personMessageBLL)
{
// initialize the request information
personMessage.MessagePostSuccessIsNull = true;
personMessage.HttpResponseCodeIsNull = true;
personMessage.HeaderPostIsNull = true;
personMessage.XML_ResponseIsNull = true;
personMessage.UserMessageIsNull = true;
personMessage.PostDateIsNull = true;
personMessage.RecordStatusID = (int)BO.ORCID.REFRecordStatus.REFRecordStatuss.Waiting_to_be_sent_to_ORCID;
personMessageBLL.Save(personMessage);
}