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


C# BLL.Save方法代码示例

本文整理汇总了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);
        }
开发者ID:nicholaswilliambrown,项目名称:ProfilesRNS_ORCID,代码行数:45,代码来源:ORCID.cs

示例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);
 }
开发者ID:nicholaswilliambrown,项目名称:ProfilesRNS_ORCID,代码行数:12,代码来源:ORCID.cs


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