當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。