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


C# CmsWebServiceClient.AddDocumentRevisionHistoryAsync方法代码示例

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


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

示例1: SaveAcceptanceTestButton_Click

        private void SaveAcceptanceTestButton_Click(object sender, RoutedEventArgs e)
        {
            CmsWebServiceClient mCmsWebServiceClient = new CmsWebServiceClient(Utils.WcfBinding, Utils.WcfEndPoint);

            mCmsWebServiceClient.AddDocumentRevisionHistoryCompleted +=
                (s1, e1) =>
                    {
                        AddedRevisionHistory = e1.Result;
                        DialogResult = true;
                    };

            mModel.User = CMS.User;
            mModel.Date = DateTime.Now;
            mModel.Description = "Site Acceptance Testing";
            mModel.Issue = null;
            mCmsWebServiceClient.AddDocumentRevisionHistoryAsync(mModel.History);
        }
开发者ID:barrett2474,项目名称:CMS2,代码行数:17,代码来源:AddDocumentRevisionHistoryDialog.xaml.cs

示例2: AddRevisionHistory

        private void AddRevisionHistory(SaveDocumentVersionCompletedEventArgs e1, CmsWebServiceClient cmsWebServiceClient)
        {
            cmsWebServiceClient.AddDocumentRevisionHistoryCompleted +=
                (s2, e2) =>
                {
                    DialogView.RevisionHistory = e2.Result;

                    DialogView.DialogResult = true;

                    if (OKButtonClicked != null)
                    {
                        OKButtonClicked(e1.Result.EntityResult);
                    }
                };

            DocumentRevisionHistory documentRevisionHistory = new DocumentRevisionHistory();
            documentRevisionHistory.Date = mDocumentVersion.CheckoutDate ?? DateTime.Now;
            documentRevisionHistory.UserId = mDocumentVersion.CheckoutByUserId ?? CMS.User.Id;
            documentRevisionHistory.DocumentId = mDocumentVersion.DocumentId;
            if (mDocumentVersion.CheckedOut)
            {
                //Version XX.XX - Checked out By Cameron Akers - CheckoutDescription
                documentRevisionHistory.Description = String.Format("Document Version {0} - Checked out To {1} By {2} - {3}",
                        mDocumentVersion.Version.ToString("##0.00"),
                        mDocumentVersion.CheckedOutTo,
                        mDocumentVersion.CheckoutByUser.FirstLastName,
                        mDocumentVersion.CheckoutComment);
            }
            else
            {
                if (mDocumentVersion.CheckoutByUser != null)
                {
                    //Version XX.XX - Checked in By Cameron Akers - CheckoutDescription
                    documentRevisionHistory.Description = String.Format("Document Version {0} - Checked in By {1} - {2}",
                        mDocumentVersion.Version.ToString("##0.00"),
                        mDocumentVersion.CheckoutByUser.FirstLastName,
                        mDocumentVersion.CheckoutComment);
                }
            }

            //Check if document version number has changed
            if (mOriginalVersionNumber != mDocumentVersion.Version)
            {
                documentRevisionHistory.Description = string.Format("Document Version {0} was changed to {1} (Filename = {2}).",
                    mOriginalVersionNumber, mDocumentVersion.FormattedVersion, mDocumentVersion.Filename);
            }

            else if (string.IsNullOrEmpty(documentRevisionHistory.Description))
            {
                documentRevisionHistory.Description = string.Format("Document Version {0} Updated.", mDocumentVersion.FormattedVersion);
            }
            documentRevisionHistory.IsSystemMessage = true;

            cmsWebServiceClient.AddDocumentRevisionHistoryAsync(documentRevisionHistory);
        }
开发者ID:barrett2474,项目名称:CMS2,代码行数:55,代码来源:AddDocumentVersionModel.cs

示例3: OKButton_Click

        private void OKButton_Click(object sender, RoutedEventArgs e)
        {
            if (mModel.AreAllValid())
            {
                CmsWebServiceClient mCmsWebServiceClient = new CmsWebServiceClient(Utils.WcfBinding, Utils.WcfEndPoint);

                mCmsWebServiceClient.AddDocumentRevisionHistoryCompleted +=
                    (s1, e1) =>
                        {
                            AddedRevisionHistory = e1.Result;
                            DialogResult = true;
                        };

                mModel.User = CMS.User;
                mModel.Date = DateTime.Now;
                mCmsWebServiceClient.AddDocumentRevisionHistoryAsync(mModel.History);
            }
        }
开发者ID:barrett2474,项目名称:CMS2,代码行数:18,代码来源:AddDocumentRevisionHistoryDialog.xaml.cs


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