private void hpl_AgentInfoEdit_Click(object sender, RoutedEventArgs e) { //编辑代理信息: VendorAgentInfoVM getSelectAgentVM = this.dataGrid_VendorAgentInfo.SelectedItem as VendorAgentInfoVM; if (null != getSelectAgentVM) { VendorAgentInfoMaintain maintainUC = new VendorAgentInfoMaintain(getSelectAgentVM, this.vendorInfoVM.VendorBasicInfo, false); maintainUC.Dialog = Window.ShowDialog(ResVendorNew.AlertMsg_EditTitle, maintainUC, (obj, args) => { getSelectAgentVM = (VendorAgentInfoVM)args.Data; this.dataGrid_VendorAgentInfo.Bind(); UpdateTotalCommissionFees(); }); } }
private void btnNewAgentInfo_Click(object sender, RoutedEventArgs e) { //新建代理信息 VendorAgentInfoMaintain agentInfo = new VendorAgentInfoMaintain(this.vendorInfoVM.VendorBasicInfo); agentInfo.Dialog = Window.ShowDialog(string.Empty, agentInfo, (obj, args) => { if (DialogResultType.OK == args.DialogResult) { VendorAgentInfoVM getNewAgentInfoVM = args.Data as VendorAgentInfoVM; if (null != getNewAgentInfoVM) { this.vendorInfoVM.VendorAgentInfoList.Add(getNewAgentInfoVM); this.dataGrid_VendorAgentInfo.Bind(); UpdateTotalCommissionFees(); } } }); }