本文整理汇总了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);
}
示例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();
}
示例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;
}
示例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();
}
示例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();
}