private void itemButton商品代码_ButtonClick(object sender, DevExpress.XtraEditors.Controls.ButtonPressedEventArgs e) { FrmQueryProduct frm = new FrmQueryProduct(); if (frm.ShowDialog() == DialogResult.OK) { var list = gridControl发货计划明细.DataSource as List <V_ICSEOUTBILLENTRYMODEL>; var row = list[gridView发货计划明细.GetDataSourceRowIndex(gridView发货计划明细.FocusedRowHandle)]; row.FMODEL = frm.SelectData.FMODEL; row.FITEMID = frm.SelectData.FID; row.FPRODUCTNAME = frm.SelectData.FPRODUCTNAME; row.FPRODUCTTYPE = frm.SelectData.FPRODUCTTYPE; row.FPRODUCTCODE = frm.SelectData.FPRODUCTCODE; row.FUNITNAME = frm.SelectData.FUNITNAME; row.FUNITID = frm.SelectData.FUNITID; row.FORDERUNIT = frm.SelectData.FORDERUNIT; row.FWEIGHT = frm.SelectData.FWEIGHT; row.FVOLUME = frm.SelectData.FVOLUME; row.FRATE = frm.SelectData.FRATE; row.FCOLORNO = row.FCOLORNO; row.FREMARK = row.FREMARK; row.FBATCHNO = row.FBATCHNO; gridControl发货计划明细.DataSource = list; gridControl发货计划明细.RefreshDataSource(); onCalcWeightTotal(); } }
private void itemButton商品代码_ButtonClick(object sender, DevExpress.XtraEditors.Controls.ButtonPressedEventArgs e) { FrmQueryProduct frm = new FrmQueryProduct(); if (frm.ShowDialog() == DialogResult.OK) { var list = gridControl采购订单明细.DataSource as List <V_ICPOBILLENTRYMODEL>; var row = list[gridView发货计划明细.GetDataSourceRowIndex(gridView发货计划明细.FocusedRowHandle)]; row.FMODEL = frm.SelectData.FMODEL; row.FITEMID = frm.SelectData.FID; row.FPRODUCTNAME = frm.SelectData.FPRODUCTNAME; row.FPRODUCTTYPE = frm.SelectData.FPRODUCTTYPE; row.FPRODUCTCODE = frm.SelectData.FPRODUCTCODE; row.FUNITNAME = frm.SelectData.FUNITNAME; row.FUNITID = frm.SelectData.FUNITID; row.FORDERUNIT = frm.SelectData.FSRCUNIT; //row.FWEIGHT = frm.SelectData.FWEIGHT; //row.FVOLUME = frm.SelectData.FVOLUME; //row.FRATE = frm.SelectData.FRATE; row.FCOLORNO = frm.SelectData.FCOLORNO; row.FREMARK = ""; row.FBATCHNO = ""; row.Flevel = "1"; row.Funit = frm.SelectData.FUNITNAME; row.FSRCMODEL = frm.SelectData.FSRCMODEL; row.FORDERUNIT = frm.SelectData.FSRCUNIT; row.FMODEL = frm.SelectData.FMODEL; row.FSRCMODEL = frm.SelectData.FSRCMODEL; row.FSRCCODE = frm.SelectData.FSRCCODE; row.FSRCQTY = 0; row.FSRCMODEL = frm.SelectData.FSRCMODEL; gridView发货计划明细.ActiveEditor.EditValue = frm.SelectData.FPRODUCTCODE; list = list.OrderBy(x => x.GG).ToList().OrderBy(x => x.GG).ToList(); gridControl采购订单明细.DataSource = list; gridControl采购订单明细.RefreshDataSource(); onCalcWeightTotal(); } }