| | |
| | | using DevExpress.XtraEditors; |
| | | using Gs.DevApp.DevFrm.Sales; |
| | | using Gs.DevApp.Entity; |
| | | using Gs.DevApp.ToolBox; |
| | | using Gs.DevApp.UserControl; |
| | |
| | | MsgHelper.ShowError("提示:" + ex.Message); |
| | | } |
| | | }; |
| | | |
| | | //选择需要的明细 |
| | | btnSelect.Click += (s, e) => |
| | | { |
| | | if (string.IsNullOrEmpty(this.txt_salesId.GetId())) |
| | | { |
| | | Gs.DevApp.ToolBox.MsgHelper.ShowError("请先选择销售订单!"); |
| | | this.txt_salesId.Focus(); |
| | | return; |
| | | } |
| | | var frm = new Frm_SalesDeliverSelect(this.txt_salesId.GetId()); |
| | | //赋值给明细表 |
| | | frm.UpdateParent += (ss, ee) => |
| | | { |
| | | try |
| | | { |
| | | var lst = ee.DynamicList; |
| | | DataTable _Table = (DataTable)gcMx1.DataSource; |
| | | foreach (dynamic dym in lst) |
| | | { |
| | | DataRow _row = _Table.NewRow(); |
| | | _row["salesDetailId"] = dym.salesDetailId; |
| | | _row["billNo"] = dym.billNo; |
| | | _row["itemNo"] = dym.itemNo; |
| | | _row["itemName"] = dym.itemName; |
| | | _row["itemModel"] = dym.itemModel; |
| | | _row["dwXs"] = dym.dwXs; |
| | | _row["dwJj"] = dym.dwJj; |
| | | _row["jjSl"] = dym.jjSl; |
| | | _row["deliveryDate"] = dym.deliveryDate; |
| | | _row["xsSl"] = dym.xsSl; |
| | | _row["isFree"] = dym.isFree; |
| | | _row["hzlx"] = dym.hzlx; |
| | | _row["hz"] = dym.hz; |
| | | _row["xxbz"] = dym.xxbz; |
| | | _row["fhsx"] = dym.fhsx; |
| | | _row["fhxx"] = dym.fhxx; |
| | | _row["jsOrg"] = dym.jsOrg; |
| | | _row["gyOrg"] = dym.gyOrg; |
| | | _row["kcOrg"] = dym.kcOrg; |
| | | _Table.Rows.Add(_row); |
| | | } |
| | | gcMx1.BindingContext = new BindingContext(); |
| | | gcMx1.DataSource = _Table; |
| | | gcMx1.ForceInitialize(); |
| | | gvMx1.CloseEditor(); |
| | | gvMx1.PostEditor(); |
| | | gvMx1.UpdateCurrentRow(); |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | Gs.DevApp.ToolBox.MsgHelper.ShowError(ex.Message); |
| | | } |
| | | }; |
| | | frm.ShowDialog(); |
| | | }; |
| | | } |
| | | private void GridView1_ColumnFilterChanged(object sender, EventArgs e) |
| | | { |