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


C# CmsWebServiceClient.GetAllIssueSubTypesAsync方法代码示例

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


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

示例1: AddEditIssueSubTypeModel

        public AddEditIssueSubTypeModel()
        {
            mIssueSubType = new IssueSubType {IsActive = true};
            mIssueSubTypeLoaded = true;

            var cmsWebServiceClient = new CmsWebServiceClient(Utils.WcfBinding, Utils.WcfEndPoint);
            cmsWebServiceClient.GetAllIssueSubTypesCompleted += (s1, e1) =>
            {
                ExistingIssueSubTypes = e1.Result;
                mExistingIssueSubTypesLoaded = true;
                OnDataLoaded();
            };
            cmsWebServiceClient.GetAllIssueSubTypesAsync();

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

示例2: AddIssueViewModel

        public AddIssueViewModel(Issue issue, bool isCopy = false)
        {
            if (issue == null) throw new ArgumentNullException("issue");
            CompositionInitializer.SatisfyImports(this);

            issue.IssueRisks = new List<IssueRisk>();
            mIssue = issue;
            mIsCopy = isCopy;

            mAreas = new ObservableCollection<Area>(CMS.Cache.Areas);
            mIssueCategories = new ObservableCollection<IssueCategory>(CMS.Cache.IssueCategories);

            mIssueTypes = new ObservableCollection<IssueType>(CMS.Cache.IssueTypes);
            mIssueClassifications = new ObservableCollection<IssueClassification>(CMS.Cache.IssueClassifications);
            mIssuePriorities = new ObservableCollection<IssuePriority>(CMS.Cache.IssuePriorities);
            mIssueStatuses = new ObservableCollection<IssueStatus>(CMS.Cache.IssueStatuses);
            mAssignedToUsers = new ObservableCollection<User>();

            if (mIssue.IssueAssignedCategories == null)
            {
                mIssue.IssueAssignedCategories = new List<IssueAssignedCategory>();
            }

            var defaultCategory = CMS.User.Role.RoleApprovalCategories.FirstOrDefault(x => x.IsDefault);

            if (defaultCategory != null)
            {
                mIssue.IssueAssignedCategories.Add(new IssueAssignedCategory
                {
                    Issue = mIssue,
                    IssueCategoryId = defaultCategory.IssueCategoryId,
                    IssueCategory = (from x in mIssueCategories where x.Id == defaultCategory.IssueCategoryId select x).FirstOrDefault()
                });
            }

            RaisePropertyChanged("Categories");
            UpdateAssignToUsers();

            OkButtonCommand = new DelegateCommand<object>(OkButtonHander, CanExecuteOkButtonHandler);
            CancelButtonCommand = new DelegateCommand<object>(CancelButtonHander, CanExecuteOkButtonHandler);
            CategoriesPickerButton = new DelegateCommand<object>(CategoriesPickerButtonHandler, CanExecuteOkButtonHandler);
            PromptCategoriesPickerButton = new DelegateCommand<object>(PromptCategoriesPickerButtonHandler, CanExecuteOkButtonHandler);
            AreasPickerButton = new DelegateCommand<object>(AreasPickerButtonHandler, CanExecuteOkButtonHandler);
            InitialRiskButton = new DelegateCommand<object>(InitialRiskButtonHandler, CanExecuteOkButtonHandler);
            FinalRiskButton = new DelegateCommand<object>(FinalRiskButtonHandler, CanExecuteOkButtonHandler);
            ExistingRiskButton = new DelegateCommand<object>(ExistingRiskButtonHandler, CanExecuteOkButtonHandler);
            KeyStakeholdersButtonClick = new DelegateCommand<object>(KeyStakeholdersPickerButtonHandler, x => true);

            CmsWebServiceClient cmsWebServiceClient = new CmsWebServiceClient(Utils.WcfBinding, Utils.WcfEndPoint);
            cmsWebServiceClient.GetAllIssueTypeSubTypesCompleted += (s, e) =>
            {
                mIssueTypeSubTypes = e.Result;
                mIssueTypeSubTypesLoaded = true;
                OnModelLoaded();
            };
            cmsWebServiceClient.GetAllIssueTypeSubTypesAsync();

            cmsWebServiceClient.GetAllIssueSubTypesCompleted += (s, e) =>
            {
                mAllIssueSubTypes = e.Result;
                mFilteredIssueSubTypes = new ObservableCollection<IssueSubType>(mAllIssueSubTypes);
                mIssueSubTypesLoaded = true;
                OnModelLoaded();
            };
            cmsWebServiceClient.GetAllIssueSubTypesAsync();
        }
开发者ID:barrett2474,项目名称:CMS2,代码行数:66,代码来源:AddIssueViewModel.cs

示例3: LoadIssueSubTypesCache

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

示例4: GetIssueSubTypes

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

            EventHandler<GetAllIssueTypeSubTypesCompletedEventArgs> handler = null;
            handler = (s, e) =>
            {
                mIssueTypeSubTypes = e.Result;
                mIssueTypeSubTypesLoaded = true;
                cmsWebServiceClient.GetAllIssueTypeSubTypesCompleted -= handler;
                OnModelLoaded();
            };
            cmsWebServiceClient.GetAllIssueTypeSubTypesCompleted += handler;
            cmsWebServiceClient.GetAllIssueTypeSubTypesAsync();

            EventHandler<GetAllIssueSubTypesCompletedEventArgs> handler2 = null;
            handler2 = (s, e) =>
            {
                mAllIssueSubTypes = e.Result;
                mFilteredIssueSubTypes = new List<IssueSubType>(mAllIssueSubTypes);
                mIssueSubTypesLoaded = true;
                cmsWebServiceClient.GetAllIssueSubTypesCompleted -= handler2;
                OnModelLoaded();
            };
            cmsWebServiceClient.GetAllIssueSubTypesCompleted += handler2;
            cmsWebServiceClient.GetAllIssueSubTypesAsync();
        }
开发者ID:barrett2474,项目名称:CMS2,代码行数:27,代码来源:IssueControlViewModel.cs

示例5: LoadAllIssueSubTypes

        private void LoadAllIssueSubTypes(NodeView currentNodeView)
        {
            CmsWebServiceClient cmsWebServiceClient = new CmsWebServiceClient(Utils.WcfBinding, Utils.WcfEndPoint);

            cmsWebServiceClient.GetAllIssueSubTypesCompleted += (s1, e1) =>
            {
                foreach (var issueSubType in e1.Result)
                {
                    NodeView child = new NodeView(currentNodeView)
                    {
                        Id = issueSubType.Id,
                        Name = issueSubType.Name,
                        Description = issueSubType.Description,
                        IsActive = issueSubType.IsActive,
                        Icon = "/CmsEquipmentDatabase;component/Images/Configuration.png",
                        Type = NodeType.IssueSubType,
                        SortField = issueSubType.Ordinal.ToString(),
                        HasChildren = false
                    };

                    currentNodeView.Children.Add(child);
                }
                Utils.HideSpinner(currentNodeView);
                currentNodeView.Sort();
            };
            cmsWebServiceClient.GetAllIssueSubTypesAsync();
        }
开发者ID:barrett2474,项目名称:CMS2,代码行数:27,代码来源:IssueConfigControl.xaml.cs


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