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


C# CmsWebServiceClient类代码示例

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


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

示例1: AddIssueSubTypeViewModel

        public AddIssueSubTypeViewModel(List<IssueSubType> selectedIssueSubTypes, IEnumerable<IssueType> issueTypes)
        {
            var idList = (from x in issueTypes select x.Id).ToList();

            mSelectedSubIssueSubTypes = selectedIssueSubTypes;
            CmsWebServiceClient cmsWebServiceClient = new CmsWebServiceClient(Utils.WcfBinding, Utils.WcfEndPoint);

            cmsWebServiceClient.GetIssueSubTypesAvailableForIssueTypesCompleted += (s1, e1) =>
                                                             {
                                                                 IssueSubTypes = e1.Result.OrderBy(x=>x.Ordinal).ToList();

                                                                 foreach (var issueType in IssueSubTypes)
                                                                 {
                                                                     if ((from x in mSelectedSubIssueSubTypes where x.Id == issueType.Id select x).FirstOrDefault() != null)
                                                                     {
                                                                         issueType.Checked = true;
                                                                     }
                                                                 }
                                                                 mIssueSubTypesLoaded = true;
                                                                 RaiseLoaded();

                                                             };
            cmsWebServiceClient.GetIssueSubTypesAvailableForIssueTypesAsync(idList);

            OkButtonCommand = new DelegateCommand<object>(OkButtonHandler, CanExecuteOkButtonHandler);
            CancelButtonCommand = new DelegateCommand<object>(CanelButtonHandler, CanExecuteOkButtonHandler);
        }
开发者ID:barrett2474,项目名称:CMS2,代码行数:27,代码来源:AddIssueSubTypeViewModel.cs

示例2: AddEditPropertyListNameViewModel

        public AddEditPropertyListNameViewModel(AddEditPropertyListNameDialog view, PropertyListName propertyListName, CommonUtils.Operation operation)
        {
            View = view;
            mPropertyListName = propertyListName;

            OkButtonCommand = new DelegateCommand<object>(OkButtonHander, CanModifyConfig);
            CancelButtonCommand = new DelegateCommand<object>(CancelButtonHander, x => true);

            if (operation == CommonUtils.Operation.Update)
            {
                CmsWebServiceClient cmsWebServiceClient = new CmsWebServiceClient(Utils.WcfBinding, Utils.WcfEndPoint);

                cmsWebServiceClient.GetPropertyListNameCompleted +=
                    (s1, e1) =>
                    {
                        mPropertyListName = e1.Result;
                        LoadPropertyListNames(mPropertyListName.PropertyListId);
                        mExistingPropertyListNamesLoaded = true;
                        FireLoaded();
                    };
                cmsWebServiceClient.GetPropertyListNameAsync(mPropertyListName.Id);
            }
            else
            {
                LoadPropertyListNames(mPropertyListName.PropertyListId);
            }
        }
开发者ID:barrett2474,项目名称:CMS2,代码行数:27,代码来源:AddEditPropertyListNameViewModel.cs

示例3: AddEditUnitViewUnit

        public AddEditUnitViewUnit(AddEditUnitDialog view, Unit unit, CommonUtils.Operation operation)
        {
            View = view;
            mUnit = unit;
            LoadUnits();

            OkButtonCommand = new DelegateCommand<object>(OkButtonHander, CanModifyConfig);
            CancelButtonCommand = new DelegateCommand<object>(CancelButtonHander, x => true);

            if (operation == CommonUtils.Operation.Update)
            {
                CmsWebServiceClient cmsWebServiceClient = new CmsWebServiceClient(Utils.WcfBinding, Utils.WcfEndPoint);

                cmsWebServiceClient.GetUnitCompleted +=
                    (s1, e1) =>
                    {
                        mUnit = e1.Result;
                        FireLoaded();
                    };
                cmsWebServiceClient.GetUnitAsync(mUnit.Id);
            }
            else
            {
                FireLoaded();
            }
        }
开发者ID:barrett2474,项目名称:CMS2,代码行数:26,代码来源:AddEditUnitViewModel.cs

示例4: AddIssueTypeViewModel

        public AddIssueTypeViewModel(List<IssueType> selectedIssueTypes)
        {
            if (DesignerProperties.IsInDesignTool) { return; }

            mSelectedIssueTypes = selectedIssueTypes;
            CmsWebServiceClient cmsWebServiceClient = new CmsWebServiceClient(Utils.WcfBinding, Utils.WcfEndPoint);

            cmsWebServiceClient.GetIssueTypesCompleted += (s1, e1) =>
                                                             {
                                                                 IssueTypes = e1.Result;

                                                                 foreach (var issueType in IssueTypes)
                                                                 {
                                                                     if ((from x in mSelectedIssueTypes where x.Id == issueType.Id select x).FirstOrDefault() != null)
                                                                     {
                                                                         issueType.Checked = true;
                                                                     }
                                                                 }
                                                                 mIssueTypesLoaded = true;
                                                                 RaiseLoaded();

                                                             };
            cmsWebServiceClient.GetIssueTypesAsync();

            OkButtonCommand = new DelegateCommand<object>(OkButtonHandler, CanExecuteOkButtonHandler);
            CancelButtonCommand = new DelegateCommand<object>(CanelButtonHandler, CanExecuteOkButtonHandler);
        }
开发者ID:barrett2474,项目名称:CMS2,代码行数:27,代码来源:AddIssueTypeViewModel.cs

示例5: MyProfileViewModel

        public MyProfileViewModel(User user)
        {
            mUser = user;

            if (user.UserPreference == null)
            {
                const int width = 315;
                user.UserPreference = new UserPreference();
                user.UserPreference.AdminPanelWidth = width;
                user.UserPreference.ControlPanelWidth = width;
                user.UserPreference.DocumentPanelWidth = 630;
                user.UserPreference.ElectricalPanelWidth = width;
                user.UserPreference.InstrumentPanelWidth = width;
                user.UserPreference.IssuePanelWidth = width;
                user.UserPreference.MechanicalPanelWidth = width;
                user.UserPreference.MobilePanelWidth = width;
                user.UserPreference.PipePanelWidth = width;
            }

            CmsWebServiceClient cmsWebServiceClient = new CmsWebServiceClient(Utils.WcfBinding, Utils.WcfEndPoint);

            cmsWebServiceClient.UserIsADefaultUserCompleted +=
                (s1, e1) =>
                {
                    UserIsADefaultUser = e1.Result;
                };

            cmsWebServiceClient.UserIsADefaultUserAsync(mUser.Id);
        }
开发者ID:barrett2474,项目名称:CMS2,代码行数:29,代码来源:MyProfileViewModel.cs

示例6: AddEditIssueFinancialVarianceCodeModel

        public AddEditIssueFinancialVarianceCodeModel(CommonUtils.Operation operation, int itemId)
        {
            CompositionInitializer.SatisfyImports(this);

            OkButtonCommand = new DelegateCommand<object>(OkButtonHander, CanExecuteOkButtonHandler);
            CancelButtonCommand = new DelegateCommand<object>(CancelButtonHander, x => true);

            if (operation == CommonUtils.Operation.Add)
            {
                mIssueFinancialVarianceCode = new IssueFinancialVarianceCode();
            }
            else if (operation == CommonUtils.Operation.Update)
            {
                var varianceId = itemId;
                CmsWebServiceClient cmsWebServiceClient = new CmsWebServiceClient(Utils.WcfBinding, Utils.WcfEndPoint);

                cmsWebServiceClient.GetIssueFinancialVarianceCodeCompleted += (s1, e1) =>
                {
                    mIssueFinancialVarianceCode = e1.Result;
                    if (DataLoaded != null)
                    {
                        mIssueFinancialVarianceCode = e1.Result;
                        DataLoaded();
                    }
                };
                cmsWebServiceClient.GetIssueFinancialVarianceCodeAsync(varianceId);
            }
        }
开发者ID:barrett2474,项目名称:CMS2,代码行数:28,代码来源:AddEditIssueFinancialVarianceCodeModel.cs

示例7: OKButton_Click

        private void OKButton_Click(object sender, RoutedEventArgs e)
        {
            CmsWebServiceClient cmsWebServiceClient = new CmsWebServiceClient(Utils.WcfBinding, Utils.WcfEndPoint);
            cmsWebServiceClient.EmptyReportsFolderCompleted += cmsWebServiceClient_EmptyReportsFolderCompleted;

            cmsWebServiceClient.EmptyReportsFolderAsync(CMS.AppSetting.DownloadAttachmentsPathRoot);
        }
开发者ID:barrett2474,项目名称:CMS2,代码行数:7,代码来源:EmptyReportsFolderDialog.xaml.cs

示例8: AddEditCoefficientModel

        public AddEditCoefficientModel(CommonUtils.Operation operation, int itemId)
        {
            CompositionInitializer.SatisfyImports(this);

            OkButtonCommand = new DelegateCommand<object>(OkButtonHander, CanExecuteOkButtonHandler);
            CancelButtonCommand = new DelegateCommand<object>(CancelButtonHander, x => true);

            if (operation == CommonUtils.Operation.Add)
            {
                var groupId = itemId;
                mCoefficient = new CalculatedRatingCoefficient();
                //mCoefficient.CoefficientGroupId = groupId;
            }
            else if (operation == CommonUtils.Operation.Update)
            {
                var CoefficientId = itemId;
                CmsWebServiceClient cmsWebServiceClient = new CmsWebServiceClient(Utils.WcfBinding, Utils.WcfEndPoint);

                cmsWebServiceClient.GetCalculatedRatingCoefficientCompleted += (s1, e1) =>
                {
                    mCoefficient = e1.Result;
                    if (DataLoaded != null)
                    {
                        mCoefficient = e1.Result;
                        DataLoaded();
                    }
                };
                cmsWebServiceClient.GetCalculatedRatingCoefficientAsync(CoefficientId);
            }
        }
开发者ID:barrett2474,项目名称:CMS2,代码行数:30,代码来源:AddEditCoefficientModel.cs

示例9: MobilePlantControlViewModel

        public MobilePlantControlViewModel(int equipmentId)
        {
            CompositionInitializer.SatisfyImports(this);

            SaveButtonCommand = new DelegateCommand<object>(SaveButtonHandler, CanModify);
            RemoveButtonCommand = new DelegateCommand<object>(RemoveButtonHandler, CanDelete);
            ExpiryPickerButton = new DelegateCommand<object>(ExpiryButtonHandler, CanDelete);

            CmsWebServiceClient cmsWebServiceClient = new CmsWebServiceClient(Utils.WcfBinding, Utils.WcfEndPoint);

            cmsWebServiceClient.GetMobilePlantCompleted += cmsWebServiceClient_GetMobilePlantCompleted;
            cmsWebServiceClient.GetMobilePlantAsync(equipmentId);

            cmsWebServiceClient.GetMobilePlantTypesCompleted += cmsWebServiceClient_GetMobilePlantTypesCompleted;
            cmsWebServiceClient.GetMobilePlantTypesAsync(false);

            //MobileHirers
            cmsWebServiceClient.GetMobileHirersCompleted += cmsWebServiceClient_GetMobileHirersCompleted;
            cmsWebServiceClient.GetMobileHirersAsync();

            //Owners
            cmsWebServiceClient.GetMobileOwnersCompleted += cmsWebServiceClient_GetMobileOwnersCompleted;
            cmsWebServiceClient.GetMobileOwnersAsync();

            cmsWebServiceClient.GetUpperEquipmentsCompleted += cmsWebServiceClient_GetUpperEquipmentsCompleted;
            cmsWebServiceClient.GetUpperEquipmentsAsync();

            Areas = new ObservableCollection<Area>(from x in CMS.Cache.Areas where x.IsActive && x.SiteId == CMS.AppSetting.DefaultSiteId select x);
        }
开发者ID:barrett2474,项目名称:CMS2,代码行数:29,代码来源:MobilePlantControlViewModel.cs

示例10: GetDomainUsers

        private void GetDomainUsers()
        {
            CmsWebServiceClient cmsWebServiceClient = new CmsWebServiceClient(Utils.WcfBinding, Utils.WcfEndPoint);

            EventHandler<GetActiveDirectoryUsersCompletedEventArgs> eventHandler = null;
            eventHandler =
               (s1, e1) =>
               {
                   var activeDirectoryContacts = e1.Result;
                   UsersDataGrid.ItemsSource = activeDirectoryContacts;
                   cmsWebServiceClient.GetActiveDirectoryUsersCompleted -= eventHandler;

                   //sort by Contact column
                   UsersDataGrid.SortDescriptors.Clear();
                   ColumnSortDescriptor descriptor = new ColumnSortDescriptor();
                   descriptor.Column = (GridViewDataColumn)UsersDataGrid.Columns["Contact"];
                   descriptor.SortDirection = ListSortDirection.Ascending;
                   UsersDataGrid.SortDescriptors.Add(descriptor);

                   IsBusyIndicator.IsBusy = false;

               };
            cmsWebServiceClient.GetActiveDirectoryUsersCompleted += eventHandler;
            cmsWebServiceClient.GetActiveDirectoryUsersAsync();
        }
开发者ID:barrett2474,项目名称:CMS2,代码行数:25,代码来源:DomainUsersPicker.xaml.cs

示例11: AddEditExistingControlSystemComponentAlarmPropertyViewModel

        public AddEditExistingControlSystemComponentAlarmPropertyViewModel(int componentTypePropertyId)
        {
            //edit

            OkButtonCommand = new DelegateCommand<object>(OkButtonHander, CanModify);
            CancelButtonCommand = new DelegateCommand<object>(CancelButtonHander, x => true);

            CmsWebServiceClient cmsWebServiceClient = new CmsWebServiceClient(Utils.WcfBinding, Utils.WcfEndPoint);
            Properties = new List<ControlSystemAlarmProperty>();

            //Load ControlSystem Properties types
            EventHandler<GetAllControlSystemAlarmPropertiesCompletedEventArgs>
                fetchCompleted = (s, e) =>
                                     {
                                         Properties = e.Result;
                                         cmsWebServiceClient.GetControlSystemComponentTypeAlarmPropertyCompleted +=
                                             (s2, e2) =>
                                             {
                                                 if (Properties.Count > 0)
                                                 {
                                                     SelectedProperty = (from x in Properties
                                                                         where x.Id == e2.Result.ComponentTypeId
                                                                         select x).FirstOrDefault();
                                                 }

                                                 mControlSystemComponentTypeAlarmProperty = e2.Result;
                                                 Loaded();
                                             };
                                         cmsWebServiceClient.GetControlSystemComponentTypeAlarmPropertyAsync(componentTypePropertyId);
                                     };

            cmsWebServiceClient.GetAllControlSystemAlarmPropertiesCompleted += fetchCompleted;
            cmsWebServiceClient.GetAllControlSystemAlarmPropertiesAsync();
        }
开发者ID:barrett2474,项目名称:CMS2,代码行数:34,代码来源:AddEditExistingControlSystemComponentAlarmPropertyViewModel.cs

示例12: 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

示例13: AddClassificationViewModel

        public AddClassificationViewModel(List<IssueClassification> selectedIssueSubTypes, IEnumerable<IssueType> issueTypes)
        {
            mSelectedClassifications = selectedIssueSubTypes;

            var ids = (from x in issueTypes select x.Id).ToList();

            var cmsWebServiceClient = new CmsWebServiceClient(Utils.WcfBinding, Utils.WcfEndPoint);
            cmsWebServiceClient.GetIssueClassificationsAvailableForIssueTypesCompleted += (s1, e1) =>
            {
                IssueClassifications = e1.Result;

                foreach (IssueClassification classification in IssueClassifications)
                {
                    if ((from x in mSelectedClassifications where x.Id == classification.Id select x).FirstOrDefault() != null)
                    {
                        classification.Checked = true;
                    }
                }
                mLoaded = true;
                RaiseLoaded();
            };
            cmsWebServiceClient.GetIssueClassificationsAvailableForIssueTypesAsync(ids);

            OkButtonCommand = new DelegateCommand<object>(OkButtonHandler, CanExecuteOkButtonHandler);
            CancelButtonCommand = new DelegateCommand<object>(CanelButtonHandler, CanExecuteOkButtonHandler);
        }
开发者ID:barrett2474,项目名称:CMS2,代码行数:26,代码来源:AddClassificationViewModel.cs

示例14: LoadIssueCategoriesCache

        public static Task LoadIssueCategoriesCache()
        {
            var task = new TaskCompletionSource<bool>();

            if (CMS.Cache.IssueCategories == null)
            {
                CMS.Cache.IssueCategories = new CmsObservableCollection<IssueCategory>();
                var cee = new CmsWebServiceClient(Utils.WcfBinding, Utils.WcfEndPoint);

                DateTime now = DateTime.Now;
                System.Diagnostics.Debug.WriteLine("LoadIssueCategoriesCache First {0}", now.ToString("G"));

                //IssueCategories
                cee.GetIssueCategoriesCompleted += (s4, e4) =>
                {
                    CMS.Cache.IssueCategories = new ObservableCollection<IssueCategory>(e4.Result.OrderBy(x => x.Ordinal));
                    var elapsed = DateTime.Now - now;
                    System.Diagnostics.Debug.WriteLine("LoadIssueCategoriesCache: {0}      {1}", elapsed.TotalSeconds, DateTime.Now);
                    task.SetResult(true);
                };
                cee.GetIssueCategoriesAsync();
            }
            else
            {
                task.SetResult(true);
                return task.Task; //Already loaded
            }
            return task.Task;
        }
开发者ID:barrett2474,项目名称:CMS2,代码行数:29,代码来源:CacheLoader.cs

示例15: AddControlSystemRevisionHistoryDialog

        public AddControlSystemRevisionHistoryDialog(int controlSystemId, string tabText)
        {
            InitializeComponent();
            mHistory.IsSystemMessage = false;

            this.Title = string.Format("Add Revision History - Control System {0}: " , tabText);

            mHistory.ControlSystemId = controlSystemId;
            mModel = new ControlSystemRevisionHistoryViewModel(mHistory);

            DataContext = mModel;

            CmsWebServiceClient mCmsWebServiceClient = new CmsWebServiceClient(Utils.WcfBinding, Utils.WcfEndPoint);

            mCmsWebServiceClient.GetControlSystemRelatedIssuesCompleted +=
                (s1, e1) =>
                    {
                        //Get list of issue ids assigned to the pipe
                        List<IssueRelatedControlSystem> relatedIssues = e1.Result;
                        List<int> issueIds = (from x in relatedIssues select x.IssueId).ToList();

                        mCmsWebServiceClient.GetIssuesAsync(issueIds);

                        mCmsWebServiceClient.GetIssuesCompleted +=
                            (s2, e2) =>
                                {
                                    //Bing list of issues to IssuesGridView
                                    issueComboBox.ItemsSource = e2.Result;
                                };
                    };

            mCmsWebServiceClient.GetControlSystemRelatedIssuesAsync(controlSystemId);
        }
开发者ID:barrett2474,项目名称:CMS2,代码行数:33,代码来源:AddControlSystemRevisionHistoryDialog.xaml.cs


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