本文整理汇总了C#中CmsWebServiceClient.GetControlSystemAsync方法的典型用法代码示例。如果您正苦于以下问题:C# CmsWebServiceClient.GetControlSystemAsync方法的具体用法?C# CmsWebServiceClient.GetControlSystemAsync怎么用?C# CmsWebServiceClient.GetControlSystemAsync使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CmsWebServiceClient
的用法示例。
在下文中一共展示了CmsWebServiceClient.GetControlSystemAsync方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: ControlSystemViewModel
public ControlSystemViewModel(ControlSystemView view, int controlSystemId)
{
mControlSystemId = controlSystemId;
CompositionInitializer.SatisfyImports(this);
View = view;
SaveCommand = new DelegateCommand<object>(SaveCommandHandler, CanModifyHandler);
DeleteCommand = new DelegateCommand<object>(DeleteCommandHandler, CanDeleteHandler);
ExportCommand = new DelegateCommand<object>(ExportCommandHandler, x => false);
var cmsWebServiceClient = new CmsWebServiceClient(Utils.WcfBinding, Utils.WcfEndPoint);
cmsWebServiceClient.GetControlSystemCompleted +=
(s, e) =>
{
ControlSystem = e.Result;
LoadData();
};
cmsWebServiceClient.GetControlSystemAsync(controlSystemId);
}
示例2: SaveControlSystem
private void SaveControlSystem(Action<bool> saved)
{
var cmsWebServiceClient = new CmsWebServiceClient(Utils.WcfBinding, Utils.WcfEndPoint);
cmsWebServiceClient.SaveControlSystemCompleted +=
(s, e) =>
{
if (e.Result.HasErrors)
{
View.ValidationPopup.Show(Utils.BuildValidationResultFromServerErrors("Save Failed", e.Result.ServerErrorMessages));
IsInSavingMode = false;
}
else
{
EventAggregator.GetEvent<PrismEvents.RefreshNavigationEvent>().Publish(new QuickControlSystem());
cmsWebServiceClient.GetControlSystemCompleted += (s1, e1) =>
{
ControlSystem = e1.Result;
LoadData();
RaiseLoaded();
Utils.ResetOriginalValues(View);
Utils.ResetOriginalValues((UserControl) View.ComponentsTab.Content);
Utils.ResetOriginalValues((UserControl) View.InterlocksTab.Content);
Utils.ResetOriginalValues((UserControl) View.DocumentsTab.Content);
Utils.ResetOriginalValues((UserControl) View.RelatedIssuesTab.Content);
//Clear all changes on the Tab
Utils.ClearAllChangeEvents(EventAggregator, ControlSystem);
//This will make sure that all componentes have Ids assigned after save
View.RevisionHistory.LoadRevisionHistory(CommonUtils.TabId.Control, ControlSystem.Id);
IsInSavingMode = false;
};
cmsWebServiceClient.GetControlSystemAsync(mControlSystemId);
}
if (saved != null)
{
saved(!e.Result.HasErrors);
}
};
cmsWebServiceClient.SaveControlSystemAsync(ControlSystem, CMS.User.Id);
}