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


C# CmsWebServiceClient.GetAttachmentTypesAsync方法代码示例

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


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

示例1: IssueFilesViewModel

        public IssueFilesViewModel(Issue issue)
        {
            CompositionInitializer.SatisfyImports(this);
            mIssue = issue;

            var cmsWebServiceClient = new CmsWebServiceClient(Utils.WcfBinding, Utils.WcfEndPoint);
            cmsWebServiceClient.GetAttachmentTypesCompleted += (s, e) =>
            {
                mAttachmentTypes = e.Result;

                cmsWebServiceClient.GetIssueFilesCompleted += (s1, e1) =>
                {
                    mIssue.IssueFiles.Clear();
                    foreach (IssueFile attachment in e1.Result)
                    {
                        attachment.Issue = mIssue;//this brings i the distribution list we need to set padlock.
                        attachment.AttachmentTypes = mAttachmentTypes;
                        mIssue.IssueFiles.Add(attachment);
                    }

                    if (DataLoaded != null)
                    {
                        DataLoaded();
                    }

                    RaisePropertyChanged("Attachments");
                };
                cmsWebServiceClient.GetIssueFilesAsync(mIssue.Id);
            };
            cmsWebServiceClient.GetAttachmentTypesAsync();

            AddButton = new DelegateCommand<object>(AddButtonHandler, CanAddHandler);
            DeleteButton = new DelegateCommand<object>(DeleteButtonHandler, CanDeleteHandler);
            ExportButton = new DelegateCommand<object>(ExportButtonHandler, x => true);
        }
开发者ID:barrett2474,项目名称:CMS2,代码行数:35,代码来源:IssueFilesViewModel.cs

示例2: PipeAttachmentsViewModel

        public PipeAttachmentsViewModel(Pipe pipe)
        {
            CompositionInitializer.SatisfyImports(this);
            mPipe = pipe;

            CmsWebServiceClient cmsWebServiceClient = new CmsWebServiceClient(Utils.WcfBinding, Utils.WcfEndPoint);
            cmsWebServiceClient.GetAttachmentTypesCompleted += cmsWebServiceClient_GetAttachmentTypesCompleted;
            cmsWebServiceClient.GetAttachmentTypesAsync();

            AddButtonClick = new DelegateCommand<object>(AddButtonHandler, CanAddHandler);
            DeleteButtonClick = new DelegateCommand<object>(DeleteButtonHandler, CanDeleteHandler);
            ExportButton = new DelegateCommand<object>(ExportButtonHandler, x => true);
        }
开发者ID:barrett2474,项目名称:CMS2,代码行数:13,代码来源:PipeAttachmentsViewModel.cs

示例3: InstrumentAttachmentsViewModel

        public InstrumentAttachmentsViewModel(Instrument instrumentEquipment)
        {
            AddAttachmentCommand = new DelegateCommand<object>(AddFileHandler, CanAdd);
            RemoveAttachmentCommand = new DelegateCommand<object>(DeleteButtonHandler, CanDelete);
            ExportButton = new DelegateCommand<object>(ExportButtonHandler, x => true);

            CompositionInitializer.SatisfyImports(this);
            mInstrument = instrumentEquipment;

            Attachments = new ObservableCollection<InstrumentAttachment>();

            CmsWebServiceClient cmsWebServiceClient = new CmsWebServiceClient(Utils.WcfBinding, Utils.WcfEndPoint);
            cmsWebServiceClient.GetAttachmentTypesCompleted += cmsWebServiceClient_GetAttachmentTypesCompleted;
            cmsWebServiceClient.GetAttachmentTypesAsync();
        }
开发者ID:barrett2474,项目名称:CMS2,代码行数:15,代码来源:InstrumentAttachmentsViewModel.cs

示例4: ElectricalEquipmentAttachmentsViewModel

        public ElectricalEquipmentAttachmentsViewModel(ElectricalEquipment electricalEquipment, ElectricalAttachmentsControl view)
        {
            CompositionInitializer.SatisfyImports(this);

            View = view;

            AddAttachmentCommand = new DelegateCommand<object>(AddFileHandler, CanAdd);
            RemoveAttachmentCommand = new DelegateCommand<object>(DeleteButtonHandler, CanDelete);
            ExportButton = new DelegateCommand<object>(ExportButtonHandler, x => true);

            mElectricalEquipment = electricalEquipment;

            Attachments = new ObservableCollection<ElectricalEquipmentAttachment>();

            CmsWebServiceClient cmsWebServiceClient = new CmsWebServiceClient(Utils.WcfBinding, Utils.WcfEndPoint);
            cmsWebServiceClient.GetAttachmentTypesCompleted += cmsWebServiceClient_GetAttachmentTypesCompleted;
            cmsWebServiceClient.GetAttachmentTypesAsync();
        }
开发者ID:barrett2474,项目名称:CMS2,代码行数:18,代码来源:ElectricalEquipmentAttachmentsViewModel.cs

示例5: ExportAttachmentsModel

        public ExportAttachmentsModel(CommonUtils.AttachmentObject attachmentObject)
        {
            CompositionInitializer.SatisfyImports(this);

            mAttachmentObject = attachmentObject;

            var cmsWebServiceClient = new CmsWebServiceClient(Utils.WcfBinding, Utils.WcfEndPoint);
            cmsWebServiceClient.GetEquipmentAttachmentsCompleted += (s, e) =>
            {
                Attachments = new CmsObservableCollection<BaseEquipmentAttachment>(e.Result);

                var uploaderIds = (from x in Attachments select x.UploadedById).Distinct().ToList();

                var act = (from x in CMS.Cache.Users orderby x.LastName where x.ActiveUser select x).ToList();
                var inact = (from x in CMS.Cache.Users orderby x.LastName where !x.ActiveUser select x).ToList();

                Uploaders = new List<QuickUser>(act);
                Uploaders.AddRange(inact);

                var presentUploaders = (from x in Uploaders where uploaderIds.Contains(x.Id) select x).ToList();
                presentUploaders.Insert(0, new QuickUser { FirstName = ALL, Id = -1, ActiveUser = true });

                Uploaders = new List<QuickUser>(presentUploaders);
                SelectedUploader = Uploaders[0];

                mAttachmentsLoaded = true;
                OnRaiseLoaded();
            };
            cmsWebServiceClient.GetEquipmentAttachmentsAsync(attachmentObject);

            cmsWebServiceClient.GetAttachmentTypesCompleted += (s, e) =>
            {
                AttachmentTypes = new List<AttachmentType>(e.Result);
                AttachmentTypes.Insert(0, new AttachmentType { Name = ALL, Id = -1 });
                SelectedAttachmentType = AttachmentTypes[0];

                mAttachmenttypesLoaded = true;
                OnRaiseLoaded();
            };
            cmsWebServiceClient.GetAttachmentTypesAsync();

            OkCommand = new DelegateCommand<object>(OkHandler, CanExecuteOkButton);
            CancelCommand = new DelegateCommand<object>(CancelHandler);
        }
开发者ID:barrett2474,项目名称:CMS2,代码行数:44,代码来源:ExportAttachmentsModel.cs


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