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


C# CmsWebServiceClient.GetIssueFinancialVarianceCodesAsync方法代码示例

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


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

示例1: IssueFinancialControlViewModel

        public IssueFinancialControlViewModel(Issue issue, IssueFinancialControl view)
        {
            mView = view;
            mIssue = issue;
            CompositionInitializer.SatisfyImports(this);

            mTimer.Interval = TimeSpan.FromMilliseconds(500);
            mTimer.Tick += RefreshFinancualTableTable;

            CmsWebServiceClient cmsWebServiceClient = new CmsWebServiceClient(Utils.WcfBinding, Utils.WcfEndPoint);
            IssueFinancials = new List<IssueFinancialTableViewModel>();

            AddButtonCommand = new DelegateCommand<object>(AddButtonHandler, CanExecuteAddButtonHandler);
            DeleteButtonCommand = new DelegateCommand<object>(DeleteButtonHandler, CanExecuteDeleteButtonHandler);
            ShowHideBudgetCommand = new DelegateCommand<object>(ShowHideBudgetHandler, x=> true);
            ShowHideBaselineCommand = new DelegateCommand<object>(ShowHideBaselineHandler, x => true);

            IsBusy = true;
            cmsWebServiceClient.GetIssueFinancialVarianceCodesCompleted += (s1, e1) =>
            {
                IssueFinancialVarianceCodes = e1.Result;
                RaisePropertyChanged("IssueFinancialVarianceCodes");

                cmsWebServiceClient.GetIssueFinancialsCompleted += (s, e) =>
                {
                     mIssue.IssueFinancials = e.Result;

                     DatabaseLoader.GetIssueSettings().ContinueWith(getAccrualCutOfDateTask =>
                     {
                         CMS.UiFactory.StartNew(() =>
                         {
                             mIssueSetting = getAccrualCutOfDateTask.Result;

                             foreach (var issueFinancial in mIssue.IssueFinancials)
                             {
                                 var financialTableItem = new IssueFinancialTableViewModel(issueFinancial, IssueFinancialVarianceCodes, view,
                                     CanUserModifyFinancialData(), mIssueSetting);
                                 mIssueFinancials.Add(financialTableItem);
                             }
                             mIssueFinancials = mIssueFinancials.OrderBy(x => x.Date).ToList();
                             RaisePropertyChanged("IssueFinancials");

                             mDictionary = Utils.BuildDictionaryForCollection(mIssue.IssueFinancials.Select(x => x.Id).ToList());
                             mIssue.ModifiedObjects.FinancialsModified = true;
                             RaisePropertyChanged("TotalForecast");

                             ShowHideBaselineOnLoad();
                             IsBusy = false;
                         });
                     });

                };
                cmsWebServiceClient.GetIssueFinancialsAsync(mIssue.Id);

            };
            cmsWebServiceClient.GetIssueFinancialVarianceCodesAsync();
        }
开发者ID:barrett2474,项目名称:CMS2,代码行数:57,代码来源:IssueFinancialControlViewModel.cs

示例2: GetIssueFinancialVarianceCodes

 public static Task<List<IssueFinancialVarianceCode>> GetIssueFinancialVarianceCodes()
 {
     var task = new TaskCompletionSource<List<IssueFinancialVarianceCode>>();
     var cee = new CmsWebServiceClient(Utils.WcfBinding, Utils.WcfEndPoint);
     cee.GetIssueFinancialVarianceCodesCompleted += (s, e) => task.SetResult(e.Result);
     cee.GetIssueFinancialVarianceCodesAsync();
     return task.Task;
 }
开发者ID:barrett2474,项目名称:CMS2,代码行数:8,代码来源:DatabaseLoader.cs

示例3: LoadFinancialVarianceCodess

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

            cmsWebServiceClient.GetIssueFinancialVarianceCodesCompleted += (s1, e1) =>
            {
                foreach (var varianceCode in e1.Result)
                {
                    NodeView child = new NodeView(currentNodeView)
                    {
                        Id = varianceCode.Id,
                        Name = varianceCode.Code,
                        Description = varianceCode.Description,
                        IsActive = varianceCode.IsActive,
                        Icon = "/CmsEquipmentDatabase;component/Images/Configuration.png",
                        Type = NodeType.FinancialVarianceCode,
                        SortField = varianceCode.Ordinal.HasValue ? varianceCode.Ordinal.ToString() : string.Empty,
                        HasChildren = false
                    };
                    currentNodeView.Children.Add(child);
                }
                Utils.HideSpinner(currentNodeView);
                currentNodeView.Sort(true);
            };
            cmsWebServiceClient.GetIssueFinancialVarianceCodesAsync();
        }
开发者ID:barrett2474,项目名称:CMS2,代码行数:26,代码来源:IssueConfigControl.xaml.cs


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