public AddEditDistributionListModel(int distributionListTypeId) { mDistributionList = new DistributionList(); CmsWebServiceClient cmsWebServiceClient = new CmsWebServiceClient(Utils.WcfBinding, Utils.WcfEndPoint); mDistributionListLoaded = true;//need to set to true so event fires for inserts only. cmsWebServiceClient.GetDistributionListTypeCompleted += cmsWebServiceClient_GetDistributionListTypeCompleted; cmsWebServiceClient.GetDistributionListTypeAsync(distributionListTypeId); OkButtonCommand = new DelegateCommand<object>(OkButtonHander, CanExecuteOkButtonHandler); CancelButtonCommand = new DelegateCommand<object>(CancelButtonHander, CanExecuteOkButtonHandler); }
public AddEditDistributionListTypeModel(int distributionListTypeId) { if (DesignerProperties.IsInDesignTool) { return; } CmsWebServiceClient cmsWebServiceClient = new CmsWebServiceClient(Utils.WcfBinding, Utils.WcfEndPoint); cmsWebServiceClient.GetDistributionListTypeCompleted += cmsWebServiceClient_GetDistributionListTypeCompleted; cmsWebServiceClient.GetDistributionListTypeAsync(distributionListTypeId); OkButtonCommand = new DelegateCommand<object>(OkButtonHander, CanExecuteOkButtonHandler); CancelButtonCommand = new DelegateCommand<object>(CancelButtonHander, CanExecuteOkButtonHandler); }
private void cmsWebServiceClient_GetDistributionListCompleted(object sender, GetDistributionListCompletedEventArgs e) { mDistributionList = e.Result; mDistributionListLoaded = true; CmsWebServiceClient cmsWebServiceClient = new CmsWebServiceClient(Utils.WcfBinding, Utils.WcfEndPoint); cmsWebServiceClient.GetDistributionListTypeCompleted += cmsWebServiceClient_GetDistributionListTypeCompleted; cmsWebServiceClient.GetDistributionListTypeAsync(mDistributionListTypeId); }