• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C# CmsWebServiceClient类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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


示例16: GetIssueRiskRelatedObjects

 public static Task<bool> GetIssueRiskRelatedObjects()
 {
     var task = new TaskCompletionSource<bool>();
     if (CMS.Cache.IssueRiskRelatedObjects == null)
     {
         CMS.Cache.IssueRiskRelatedObjects = new IssueRiskRelatedObjects();
         var cee = new CmsWebServiceClient(Utils.WcfBinding, Utils.WcfEndPoint);
         DateTime now = DateTime.Now;
         System.Diagnostics.Debug.WriteLine("InterlockRiskRelatedObjectsCache First {0}", now.ToString("G"));
         //ReportLinks
         cee.GetIssueRiskRelatedObjectsCompleted += (s, e) =>
         {
             CMS.Cache.IssueRiskRelatedObjects = e.Result;
             var elapsed = DateTime.Now - now;
             System.Diagnostics.Debug.WriteLine("InterlockRiskRelatedObjectsCache: {0}", elapsed.TotalSeconds);
             task.SetResult(true);
         };
         cee.GetIssueRiskRelatedObjectsAsync();
     }
     else
     {
         task.SetResult(true);
         return task.Task; //Already loaded
     }
     return task.Task;
 }
开发者ID:barrett2474,项目名称:CMS2,代码行数:26,代码来源:CacheLoader.cs


示例17: LoadAreasCache

        public static Task LoadAreasCache()
        {
            var task = new TaskCompletionSource<bool>();
            if (CMS.Cache.Areas == null)
            {
                CMS.Cache.Areas = new ObservableCollection<Area>();
                var cee = new CmsWebServiceClient(Utils.WcfBinding, Utils.WcfEndPoint);
                DateTime now = DateTime.Now;
                System.Diagnostics.Debug.WriteLine("LoadAreasCache First {0}", now.ToString("G"));

                //AREAS
                cee.GetAreasCompleted += (s1, e1) =>
                {
                    CMS.Cache.Areas = new ObservableCollection<Area>(e1.Result.OrderBy(x => x.AreaNumber));
                    var elapsed = DateTime.Now - now;
                    System.Diagnostics.Debug.WriteLine("LoadAreasCache: {0}", elapsed.TotalSeconds);
                    task.SetResult(true);
                };
                cee.GetAreasAsync();
            }
            else
            {
                System.Diagnostics.Debug.WriteLine("-----------------------------------------------------------");
                System.Diagnostics.Debug.WriteLine("LoadAreasCache: ALREADY LOADED !!!");
                System.Diagnostics.Debug.WriteLine("-----------------------------------------------------------");
                task.SetResult(true);
                return task.Task; //Already loaded
            }

            return task.Task;
        }
开发者ID:barrett2474,项目名称:CMS2,代码行数:31,代码来源:CacheLoader.cs


示例18: AddDocumentRevisionHistoryDialog

        public AddDocumentRevisionHistoryDialog(int documentId)
        {
            InitializeComponent();

            mHistory.DocumentId = documentId;
            mModel = new DocumentRevisionHistoryViewModel(mHistory);

            DataContext = mModel;

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

            mCmsWebServiceClient.GetDocumentRelatedIssuesCompleted +=
                (s1, e1) =>
                    {
                        //Get list of issue ids assigned to the pipe
                        List<IssueRelatedDocument> 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.GetDocumentRelatedIssuesAsync(documentId);
        }
开发者ID:barrett2474,项目名称:CMS2,代码行数:30,代码来源:AddDocumentRevisionHistoryDialog.xaml.cs


示例19: AddExistingMobilePlantComponentProperty

        private void AddExistingMobilePlantComponentProperty(NodeView nodeView)
        {
            int electricalEquipmentComponentTypeId = nodeView.Id;
            CmsWebServiceClient cmsWebServiceClient = new CmsWebServiceClient(Utils.WcfBinding, Utils.WcfEndPoint);

            cmsWebServiceClient.GetMobilePlantComponentTypeCompleted +=
                (s, e) =>
                {
                    AddEditExistingMobilePlantComponentPropertyDialog dialog = new AddEditExistingMobilePlantComponentPropertyDialog(e.Result);
                    dialog.Show();

                    dialog.Closed += (s1, e1) =>
                    {

                        if (dialog.DialogResult.HasValue && dialog.DialogResult.Value)
                        {
                            EventHandler<AddMobilePlantComponentTypePropertyCompletedEventArgs> addCompleted = null;
                            addCompleted = (s2, eventArgs) =>
                            {
                                MobilePlantComponentTypeProperty pcpt = eventArgs.Result;

                                if (pcpt != null)
                                {
                                    NodeView child = new NodeView(nodeView)
                                    {
                                        Id = pcpt.Id,
                                        Name = dialog.MobilePlantComponentTypeProperty.MobilePlantProperty.Name,
                                        Description = dialog.MobilePlantComponentTypeProperty.MobilePlantProperty.Description,
                                        Icon = "/CmsEquipmentDatabase;component/Images/Configuration.png",
                                        Type = NodeType.MobilePlantComponentTypeProperty,
                                        HasChildren = false,
                                        SortField = dialog.MobilePlantComponentTypeProperty.Ordinal.ToString()
                                    };
                                    if (nodeView.ChildrenLoaded)
                                    {
                                        nodeView.Children.Add(child);
                                        nodeView.Sort();
                                    }
                                }

                                cmsWebServiceClient.AddMobilePlantComponentTypePropertyCompleted -= addCompleted;

                            };

                            cmsWebServiceClient.AddMobilePlantComponentTypePropertyCompleted += addCompleted;

                            MobilePlantComponentTypeProperty electricalEquipmentComponentTypeProperty = new MobilePlantComponentTypeProperty
                            {
                                MobilePlantComponentTypeId = electricalEquipmentComponentTypeId,
                                MobilePlantPropertyId = dialog.MobilePlantComponentTypeProperty.MobilePlantPropertyId,
                                Ordinal = dialog.MobilePlantComponentTypeProperty.Ordinal
                            };

                            cmsWebServiceClient.AddMobilePlantComponentTypePropertyAsync(electricalEquipmentComponentTypeProperty);
                        }
                    };
                };

            cmsWebServiceClient.GetMobilePlantComponentTypeAsync(electricalEquipmentComponentTypeId);
        }
开发者ID:barrett2474,项目名称:CMS2,代码行数:60,代码来源:MobilePlantConfigControl.xaml.cs


示例20: InstrumentPropertiesViewModel

        public InstrumentPropertiesViewModel(InstrumentComponent instrumentEquipmentComponent)
        {
            mInstrumentComponent = instrumentEquipmentComponent;
            Models = new List<Model>();

            LastInspectedCommand = new DelegateCommand<object>(LastInspectedHandler, CanModify);
            NextInspectionCommand = new DelegateCommand<object>(NextInspectionHandler, CanModify);

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

            cmsWebServiceClient.GetManufacturersCompleted +=
                (s, e) =>
                    {
                        mManufacturers = e.Result;
                        RaisePropertyChanged("Manufacturers");
                        RaisePropertyChanged("Manufacturer");

                        if (mInstrumentComponent.ManufacturerId.HasValue)
                        {
                            LoadModels(mInstrumentComponent.ManufacturerId.Value);
                        }
                        else if (Loaded != null)
                        {
                            Loaded();
                            Loaded = null;
                        }
                    };
            cmsWebServiceClient.GetManufacturersAsync((int)CommonUtils.EquipmentTypeCode.INSTR);
        }
开发者ID:barrett2474,项目名称:CMS2,代码行数:29,代码来源:InstrumentPropertiesViewModel.cs



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# CoalTraffic类代码示例发布时间:2022-05-24
下一篇:
C# CmsProcessable类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap