private void btnSearch_Click(object sender, RoutedEventArgs e) { //查询商品操作 : if (this.gatherInfoVM.VendorInfo == null || !this.gatherInfoVM.VendorInfo.SysNo.HasValue || string.IsNullOrEmpty(this.gatherInfoVM.VendorInfo.VendorBasicInfo.VendorNameLocal)) { Window.Alert(ResGatherNew.AlertMsg_VendorSelect); return; } filter = gatherInfoVM.ConvertVM <GatherSettlementInfoVM, GatherSettleItemsQueryFilter>(); filter.VendorSysNo = gatherInfoVM.VendorInfo.SysNo; SettledProductsGrid.Bind(); }
private void LoadGatherInfo() { serviceFacade.LoadGatherSettlementInfo(GatherSysNo, (obj, args) => { if (args.FaultsHandle()) { return; } GetherInfoVM = EntityConverter <GatherSettlementInfo, GatherSettlementInfoVM> .Convert(args.Result, (s, t) => { t.StockID = s.SourceStockInfo.SysNo.ToString(); t.StockName = s.SourceStockInfo.StockName; t.VendorInfo.VendorBasicInfo.PaySettleCompany = s.VendorInfo.VendorBasicInfo.PaySettleCompany; txtPaySettleCompany.Text = EnumConverter.GetDescription(t.VendorInfo.VendorBasicInfo.PaySettleCompany); }); this.DataContext = GetherInfoVM; SettledProductsGrid.Bind(); ShowActionButtons(GetherInfoVM.SettleStatus.Value); }); }