/// <summary> /// 加载扣款项维护信息 /// </summary> public void LoadDeductInfo() { deductFacade.GetSingleDeductBySysNo(getLoadDeductSysNo, (obj, args) => { if (args.FaultsHandle()) { Window.Alert(args.Error.Faults[0].ErrorDescription); return; } deductVm = EntityConverter <Deduct, DeductQueryVM> .Convert(args.Result, (s, t) => { t = new DeductQueryVM { Name = s.Name, DeductType = s.DeductType, AccountType = s.AccountType, DeductMethod = s.DeductMethod, }; }); SetRdbtnIsSelected(); this.DataContext = deductVm; }); }
public UCDeductMaintain(string deductSysNo) { this.getLoadDeductSysNo = deductSysNo; InitializeComponent(); deductVM = new DeductQueryVM(); serviceFacade = new DeductFacade(CPApplication.Current.CurrentPage); this.Loaded += new RoutedEventHandler(UCDeductMaintain_Loaded); }
/// <summary> /// 创建扣款项 /// </summary> /// <param name="newdeductVM"></param> /// <param name="callback"></param> public void AddDeductInfo(DeductQueryVM newdeductVM, EventHandler <RestClientEventArgs <Deduct> > callback) { Deduct deductInfo = EntityConverter <DeductQueryVM, Deduct> .Convert(newdeductVM); string relativeUrl = "/POService/Deduct/CreateDeduct"; restClient.Create <Deduct>(relativeUrl, deductInfo, callback); }
public override void OnPageLoad(object sender, EventArgs e) { deductQueryVM = new DeductQueryVM(); deductFacade = new DeductFacade(this); InitComBoxData(); this.SearchCondition.DataContext = deductQueryVM; base.OnPageLoad(sender, e); }
public override void OnPageLoad(object sender, EventArgs e) { base.OnPageLoad(sender, e); deductVm = new DeductQueryVM(); deductFacade = new DeductFacade(this); getLoadDeductSysNo = this.Request.Param; if (null != getLoadDeductSysNo) { LoadDeductInfo(); } }
void UCDeductMaintain_Loaded(object sender, RoutedEventArgs e) { if (null != getLoadDeductSysNo) { serviceFacade.GetSingleDeductBySysNo(getLoadDeductSysNo, (obj, args) => { if (args.FaultsHandle()) { // Window.Alert(args.Error.Faults[0].ErrorDescription); return; } deductVM = EntityConverter <Deduct, DeductQueryVM> .Convert(args.Result, (s, t) => { t = new DeductQueryVM { Name = s.Name, DeductType = s.DeductType, AccountType = s.AccountType, DeductMethod = s.DeductMethod, }; }); if (this.deductVM.Status == Status.Invalid) { this.btnSave.IsEnabled = false; } else { this.btnSave.IsEnabled = true; } SetRdbtnIsSelected(); this.DataContext = deductVM; }); } }