private void InitData() { postIncomeFacade = new PostIncomeFacade(CurrentPage); otherFacade = new OtherDomainDataFacade(CurrentPage); if (currentMode == MaintanMode.Create) { currentPostIncome = new PostIncomeVM(); } this.BaseInfo.DataContext = currentPostIncome; }
/// <summary> /// 创建 /// </summary> public void Create(PostIncomeVM vm, Action callback) { var data = vm.ConvertVM <PostIncomeVM, PostIncomeInfo>(); string relativeUrl = "/InvoiceService/PostIncome/Create"; data.CompanyCode = CPApplication.Current.CompanyCode; restClient.Create <PostIncomeInfo>(relativeUrl, data, (obj, args) => { if (args.FaultsHandle()) { return; } callback(); }); }
/// <summary> /// 修改 /// </summary> public void Update(PostIncomeVM vm, Action callback) { var req = new UpdatePostIncomeReq() { PostIncome = vm.ConvertVM <PostIncomeVM, PostIncomeInfo>(), ConfirmedSOSysNo = vm.ConfirmedSOSysNoList }; string relativeUrl = "/InvoiceService/PostIncome/Update"; restClient.Update(relativeUrl, req, (obj, args) => { if (args.FaultsHandle()) { return; } callback(); }); }
public UCPostIncomeMaintain(PostIncomeVM postIncomeVM, MaintanMode maintainMode) : this() { this.currentMode = maintainMode; this.currentPostIncome = postIncomeVM; }