private void frmInPlanCL_Load(object sender, EventArgs e) { if (ScanCodeRemapping.NormalTable.Contains(0x003A)) { ScanCodeRemapping.NormalTable.Remove(0x003A); } this.txtInfo.Text = "计划号:" + Global.storage.jhh + "\r\n"; this.txtInfo.Text += "准发号:" + Global.storage.zfh + "\r\n"; this.txtInfo.Text += "品名:" + Global.storage.pm + "\r\n"; this.txtInfo.Text += "合同号:" + Global.storage.hth; LoadData(); dgCl.TableStyles.Clear(); DataGridTableStyle clStyle = new DataGridTableStyle(); clStyle.MappingName = dtCl.TableName; CheckCellEventHandler cellEvent = new CheckCellEventHandler(CheckCellColor); clStyle.GridColumnStyles.Add(new ColumnStyle(0, "DJ", "等级", 40, "", cellEvent)); clStyle.GridColumnStyles.Add(new ColumnStyle(1, "CLH", "材料号", 100, "", cellEvent)); //clStyle.GridColumnStyles.Add(new ColumnStyle(2, "KW", "库位", 50, "", cellEvent)); clStyle.GridColumnStyles.Add(new ColumnStyle(2, "JZ", "净重", 50, "", cellEvent)); clStyle.GridColumnStyles.Add(new ColumnStyle(3, "MZ", "毛重", 50, "", cellEvent)); clStyle.GridColumnStyles.Add(new ColumnStyle(4, "GG", "规格", 150, "", cellEvent)); dgCl.TableStyles.Add(clStyle); if (dtCl.Rows.Count > 0) { dgCl.Select(0); } }
private void frmClear_Load(object sender, EventArgs e) { showConnect(); if (ScanCodeRemapping.NormalTable.Contains(0x003A)) { ScanCodeRemapping.NormalTable.Remove(0x003A); } dtClear = new DataTable(); dtClear.Columns.Add("CLH"); dtClear.Columns.Add("KW"); dtClear.Columns.Add("STATUS"); dgClear.DataSource = dtClear; dgClear.TableStyles.Clear(); dgClear.TableStyles.Clear(); CheckCellEventHandler cellEvent = new CheckCellEventHandler(CheckCellColor); DataGridTableStyle clearStyle = new DataGridTableStyle(); clearStyle.MappingName = dtClear.TableName; clearStyle.GridColumnStyles.Add(new ColumnStyle(0, "KW", "库位", 100, "", cellEvent)); clearStyle.GridColumnStyles.Add(new ColumnStyle(1, "CLH", "材料号", 120, "", cellEvent)); dgClear.TableStyles.Add(clearStyle); }
public void LoadData() { string sql = "select ZPH,CLH,MZ,KW,WCFlag,"; sql += "Height + '×' + Width + '×' + Long GG,SCANTIME from ExportStorageAcceptOrder "; sql += "where ZPH='" + m_zph + "'"; dtCl = App.ExecuteQuery(sql); curRow = -1; dgCl.DataSource = dtCl; dgCl.TableStyles.Clear(); DataGridTableStyle clStyle = new DataGridTableStyle(); clStyle.MappingName = dtCl.TableName; CheckCellEventHandler cellEvent = new CheckCellEventHandler(CheckCellColor); clStyle.GridColumnStyles.Add(new ColumnStyle(0, "CLH", "材料号", 120, "", cellEvent)); clStyle.GridColumnStyles.Add(new ColumnStyle(1, "KW", "库位", 70, "", cellEvent)); clStyle.GridColumnStyles.Add(new ColumnStyle(2, "MZ", "毛重", 70, "", cellEvent)); clStyle.GridColumnStyles.Add(new ColumnStyle(3, "GG", "规格", 70, "", cellEvent)); dgCl.TableStyles.Add(clStyle); RefreshJS(); }
private void frmFrameIn_Load(object sender, EventArgs e) { if (ScanCodeRemapping.NormalTable.Contains(0x003A)) { ScanCodeRemapping.NormalTable.Remove(0x003A); } Global.storage.kjh = ""; string sql = "select CLH,WZ,substring(KW,4,len(KW)-3) KW,Height+'×'+Width+'×'+Long GG,MZ,WCFlag,SCANTIME,ZFH,TDH,Make,CH,QA,'0' ExFlag from FrameDetail where 1=2"; dtCl = SqlCe.ExecuteQuery(sql); dgCl.DataSource = dtCl; dgCl.TableStyles.Clear(); DataGridTableStyle clStyle = new DataGridTableStyle(); clStyle.MappingName = dtCl.TableName; CheckCellEventHandler cellEvent = new CheckCellEventHandler(CheckCellColor); clStyle.GridColumnStyles.Add(new ColumnStyle(0, "CLH", "材料号", 110, "", cellEvent)); clStyle.GridColumnStyles.Add(new ColumnStyle(1, "KW", "库位", 50, "", cellEvent)); clStyle.GridColumnStyles.Add(new ColumnStyle(2, "ZFH", "准发号", 100, "", cellEvent)); clStyle.GridColumnStyles.Add(new ColumnStyle(3, "WZ", "库别", 40, "", cellEvent)); clStyle.GridColumnStyles.Add(new ColumnStyle(4, "GG", "规格", 40, "", cellEvent)); clStyle.GridColumnStyles.Add(new ColumnStyle(5, "MZ", "毛重", 50, "", cellEvent)); clStyle.GridColumnStyles.Add(new ColumnStyle(6, "CH", "层号", 50, "", cellEvent)); curRow = -1; dgCl.TableStyles.Add(clStyle); }
private void frmIn_Load(object sender, EventArgs e) { if (ScanCodeRemapping.NormalTable.Contains(0x003A)) { ScanCodeRemapping.NormalTable.Remove(0x003A); } LoadData(); dgCl.TableStyles.Clear(); DataGridTableStyle clStyle = new DataGridTableStyle(); clStyle.MappingName = dtCl.TableName; CheckCellEventHandler cellEvent = new CheckCellEventHandler(CheckCellColor); clStyle.GridColumnStyles.Add(new ColumnStyle(0, "CLH", "材料号", 110, "", cellEvent)); clStyle.GridColumnStyles.Add(new ColumnStyle(1, "KW", "库位", 60, "", cellEvent)); clStyle.GridColumnStyles.Add(new ColumnStyle(2, "GG", "规格", 160, "", cellEvent)); clStyle.GridColumnStyles.Add(new ColumnStyle(3, "MZ", "毛重", 50, "", cellEvent)); clStyle.GridColumnStyles.Add(new ColumnStyle(4, "ZFH", "准发号", 100, "", cellEvent)); clStyle.GridColumnStyles.Add(new ColumnStyle(5, "JHH", "计划号", 100, "", cellEvent)); dgCl.TableStyles.Add(clStyle); }
public void LoadData() { lblInfo.Text = "提单号:" + Global.storage.jhh + "\r\n"; string value = ""; //string sql = "select B.JHH,B.ZFH,B.CLH,B.CLH2,B.MZ,B.JZ,substring(B.KW,4,8) KW,"; //sql += "B.Height+'×'+B.Width+'×'+B.Long GG,"; //sql+="B.WCFlag,B.SCANTIME from "; //sql += "ExportStorageOrder A,ExportStorageAcceptOrder B where A.ZFH=B.ZFH and A.JHH=B.JHH and (B.WCFlag is null or B.WCFlag<>2) "; switch (Global.storage.cltype) { case 0: lblInfo.Text += "准发号:" + Global.storage.zfh + "\r\n"; value = Global.storage.zfh; break; case 1: lblInfo.Text += "炉号:" + Global.storage.lh; value = Global.storage.lh; break; case 2: lblInfo.Text += "合同号:" + Global.storage.hth; value = Global.storage.hth; break; case 3: lblInfo.Text += "扎批号:" + Global.storage.zph; value = Global.storage.zph; break; default: break; } //dtCl = SqlCe.ExecuteQuery(sql); dtCl = Storage.GetExpCL(Global.storage.cltype, value); curRow = -1; dgCl.DataSource = dtCl; dgCl.TableStyles.Clear(); DataGridTableStyle clStyle = new DataGridTableStyle(); clStyle.MappingName = dtCl.TableName; CheckCellEventHandler cellEvent = new CheckCellEventHandler(CheckCellColor); clStyle.GridColumnStyles.Add(new ColumnStyle(0, "CLH", "材料号", 100, "", cellEvent)); clStyle.GridColumnStyles.Add(new ColumnStyle(1, "KW", "库位", 70, "", cellEvent)); clStyle.GridColumnStyles.Add(new ColumnStyle(2, "MZ", "毛重", 60, "", cellEvent)); clStyle.GridColumnStyles.Add(new ColumnStyle(3, "JZ", "净重", 60, "", cellEvent)); clStyle.GridColumnStyles.Add(new ColumnStyle(4, "GG", "规格", 170, "", cellEvent)); dgCl.TableStyles.Add(clStyle); }
public void LoadData() { string sql = "select B.JHH,B.ZFH,B.CLH,B.CLH2,B.MZ,B.JZ,substring(B.KW,4,len(B.KW)-3) KW,"; sql += "B.Height+'×'+B.Width+'×'+B.Long GG,"; sql += "B.WCFlag,B.SCANTIME from "; sql += "ExportStorageOrder A,ExportStorageAcceptOrder B where A.ZFH=B.ZFH and A.JHH=B.JHH and (B.WCFlag is null or B.WCFlag<>2) and B.KW<>'' "; sql += "and B.CKB='" + Global.sKb + "' and (A.JHH like '7%' or A.JHH like '8%' or A.JHH like '9%') "; sql += "and A.JHH='" + m_jhh + "' "; lblInfo.Text = "计划号:" + m_jhh + "\r\n"; switch (m_cltype) { case 0: sql += "and A.ZFH='" + m_zfh + "'"; lblInfo.Text += "准发号:" + m_zfh; break; case 1: sql += "and B.LH='" + m_lh + "'"; lblInfo.Text += "炉号:" + m_lh; break; case 2: sql += "and A.HTH='" + m_hth + "'"; lblInfo.Text += "合同号:" + m_hth; break; case 3: lblInfo.Text += "扎批号:" + m_zph; sql += "and substring(B.CLH,1,6)='" + m_zph + "'"; break; default: break; } dtOut = SqlCe.ExecuteQuery(sql); curRow = -1; dgOut.DataSource = dtOut; dgOut.TableStyles.Clear(); DataGridTableStyle outStyle = new DataGridTableStyle(); outStyle.MappingName = dtOut.TableName; CheckCellEventHandler cellEvent = new CheckCellEventHandler(CheckCellColor); outStyle.GridColumnStyles.Add(new ColumnStyle(0, "CLH", "材料号", 100, "", cellEvent)); outStyle.GridColumnStyles.Add(new ColumnStyle(1, "KW", "库位", 60, "", cellEvent)); outStyle.GridColumnStyles.Add(new ColumnStyle(2, "MZ", "毛重", 60, "", cellEvent)); outStyle.GridColumnStyles.Add(new ColumnStyle(3, "JZ", "净重", 60, "", cellEvent)); outStyle.GridColumnStyles.Add(new ColumnStyle(4, "GG", "规格", 170, "", cellEvent)); dgOut.TableStyles.Add(outStyle); RefreshJS(); }
public void LoadData() { string sql = "select B.JHH,B.ZFH,B.CLH,B.CLH2,B.MZ,B.JZ,substring(B.KW,4,8) KW,"; sql += "B.Height+'×'+B.Width+'×'+B.Long GG,"; sql += "B.WCFlag,B.SCANTIME from "; sql += "ExportStorageOrder A,ExportStorageAcceptOrder B where A.ZFH=B.ZFH and A.JHH=B.JHH and (B.WCFlag is null or B.WCFlag<>2) "; switch (m_cltype) { case 0: lblZfh.Text += "准发号:" + m_zfh; sql += "and A.ZFH='" + m_zfh + "'"; break; case 1: lblZfh.Text += "炉号:" + m_lh; sql += "and B.LH='" + m_lh + "'"; break; case 2: lblZfh.Text += "合同号:" + m_hth; sql += "and A.HTH='" + m_hth + "'"; break; case 3: lblZfh.Text += "扎批号:" + m_zph; sql += "and substring(B.CLH,1,6)='" + m_zph + "'"; break; default: break; } dtCl = SqlCe.ExecuteQuery(sql); curRow = -1; dgCl.DataSource = dtCl; dgCl.TableStyles.Clear(); DataGridTableStyle clStyle = new DataGridTableStyle(); clStyle.MappingName = dtCl.TableName; CheckCellEventHandler cellEvent = new CheckCellEventHandler(CheckCellColor); clStyle.GridColumnStyles.Add(new ColumnStyle(0, "CLH", "材料号", 100, "", cellEvent)); clStyle.GridColumnStyles.Add(new ColumnStyle(1, "KW", "库位", 70, "", cellEvent)); clStyle.GridColumnStyles.Add(new ColumnStyle(2, "GG", "规格", 170, "", cellEvent)); clStyle.GridColumnStyles.Add(new ColumnStyle(3, "JZ", "净重", 60, "", cellEvent)); clStyle.GridColumnStyles.Add(new ColumnStyle(4, "MZ", "毛重", 60, "", cellEvent)); dgCl.TableStyles.Add(clStyle); }
private void LoadData() { Global.coils.Clear(); #if InterfaceTest newFrameLayout(6); #else newFrameLayout(Global.curFrame.MaxRow); #endif if (Global.curFrame.KZ == "重")//入库作业 { //loadFrameLayout10(Global.curFrame.KJH); } loadFrameLayout20(Global.curFrame.KJH, Global.curFrame.KZ); curPoint = new CoilPoint(Global.curFrame.KJH, -1, -1); //PrintField(); this.dataGrid2.DataSource = dtFrame; CheckCellEventHandler cellEvent = new CheckCellEventHandler(CheckCellColor); DataGridTableStyle tablestyle = new DataGridTableStyle(); tablestyle.GridColumnStyles.Add(new ColumnStyle(0, "X", "X", 28, "", cellEvent)); tablestyle.GridColumnStyles.Add(new ColumnStyle(1, "L", "L", 206, "", cellEvent)); //tablestyle.GridColumnStyles.Add(new ColumnStyle(2, "R", "R", 103, "", cellEvent)); this.dataGrid2.TableStyles.Add(tablestyle); if (Global.curFrame.MaxRow == 6) { SetGridRowHeight(dataGrid2, 0, 45); SetGridRowHeight(dataGrid2, 1, 45); SetGridRowHeight(dataGrid2, 2, 45); SetGridRowHeight(dataGrid2, 3, 40); SetGridRowHeight(dataGrid2, 4, 40); SetGridRowHeight(dataGrid2, 5, 40); SetGridRowHeight(dataGrid2, 6, 38); SetGridRowHeight(dataGrid2, 7, 38); dataGrid2.Invalidate(); } }
private void frmWtd_Load(object sender, EventArgs e) { dtWtd = Storage.GetWtd(Global.sKb); dgWtd.DataSource = dtWtd; dgWtd.TableStyles.Clear(); DataGridTableStyle wtdStyle = new DataGridTableStyle(); wtdStyle.MappingName = dtWtd.TableName; CheckCellEventHandler cellEvent = new CheckCellEventHandler(CheckCellColor); wtdStyle.GridColumnStyles.Add(new ColumnStyle(0, "wtdh", "委托单", 90, "", cellEvent)); wtdStyle.GridColumnStyles.Add(new ColumnStyle(1, "hpmc", "货名", 110, "", cellEvent)); wtdStyle.GridColumnStyles.Add(new ColumnStyle(2, "zjs", "件数", 90, "", cellEvent)); wtdStyle.GridColumnStyles.Add(new ColumnStyle(3, "zzl", "重量", 90, "", cellEvent)); dgWtd.TableStyles.Add(wtdStyle); curRow = -1; }
//bool key = false; //int pageSize = 0; //每页显示行数 //int nMax = 0; //总记录数 //int pageCount = 0; //页数=总记录数/每页显示行数 //int pageCurrent = 0; //当前页号 //int nCurrent = 0; //当前记录行 private void LoadPlan() { string sql = "select SX,HCH,KJH,CLH,MDD from TaskOrder "; if (Global.curFrame != null) { if (Global.curFrame.HCH != "") { sql += "where HCH='" + Global.curFrame.HCH + "'"; } else { sql += "where 1=2 "; } } dtJhzy = SqlCe.ExecuteQuery(sql); dgSxChange.DataSource = dtJhzy; dgSxChange.TableStyles.Clear(); DataGridTableStyle SxchangeStyle = new DataGridTableStyle(); SxchangeStyle.MappingName = dtJhzy.TableName; CheckCellEventHandler cellEvent = new CheckCellEventHandler(CheckCellColor); SxchangeStyle.GridColumnStyles.Add(new ColumnStyle(0, "SX", "顺序", 50, "", cellEvent)); SxchangeStyle.GridColumnStyles.Add(new ColumnStyle(1, "KJH", "框架号", 60, "", cellEvent)); SxchangeStyle.GridColumnStyles.Add(new ColumnStyle(2, "CLH", "材料号", 120, "", cellEvent)); SxchangeStyle.GridColumnStyles.Add(new ColumnStyle(3, "MDD", "目的地", 120, "", cellEvent)); dgSxChange.TableStyles.Add(SxchangeStyle); if (Global.curFrame.HCH != "") { lblTitle.Text = Global.curFrame.HCH + "#行车作业指令"; } curRow = -1; }
private void frmOutPlanCL_Load(object sender, EventArgs e) { //frmOutPlanZF frmOutPlanZF = (frmOutPlanZF)Global.frmCurrent; //m_zfh = frmOutPlanZF.m_zfh; //m_jhh = frmOutPlanZF.m_jhh; lblInfo.Text = "计划号:" + Global.storage.jhh + "\r\n"; lblInfo.Text += "准发号:" + Global.storage.zfh + "\r\n"; //string sql = "select ZFH,CLH,MZ,JZ,substring(KW,4,8) KW,"; //sql += "Height+'×'+Width+'×'+Long GG,"; //sql += "WCFlag,SCANTIME from "; //sql += "ExportStorageAcceptOrder where (WCFlag is null or WCFlag<>2) "; //sql += "and ZFH='" + m_zfh + "' and JHH='"+ m_jhh +"' "; //dtCl = SqlCe.ExecuteQuery(sql); dtCl = Storage.GetExpCL(Global.storage.jhh, Global.storage.make, Global.storage.zfh); curRow = -1; dgCl.DataSource = dtCl; dgCl.TableStyles.Clear(); DataGridTableStyle clStyle = new DataGridTableStyle(); clStyle.MappingName = dtCl.TableName; CheckCellEventHandler cellEvent = new CheckCellEventHandler(CheckCellColor); clStyle.GridColumnStyles.Add(new ColumnStyle(0, "CLH", "材料号", 110, "", cellEvent)); //clStyle.GridColumnStyles.Add(new ColumnStyle(1, "KW", "库位", 70, "", cellEvent)); clStyle.GridColumnStyles.Add(new ColumnStyle(1, "MZ", "毛重", 50, "", cellEvent)); clStyle.GridColumnStyles.Add(new ColumnStyle(2, "JZ", "净重", 50, "", cellEvent)); clStyle.GridColumnStyles.Add(new ColumnStyle(3, "GG", "规格", 170, "", cellEvent)); dgCl.TableStyles.Add(clStyle); }
private void frmWtdIn_Load(object sender, EventArgs e) { if (ScanCodeRemapping.NormalTable.Contains(0x003A)) { ScanCodeRemapping.NormalTable.Remove(0x003A); } txtWtdInf.Text = Global.storage.jhh; RefreshData(); DataGridTableStyle wtdclStyle = new DataGridTableStyle(); wtdclStyle.MappingName = dtCl.TableName; CheckCellEventHandler cellEvent = new CheckCellEventHandler(CheckCellColor); wtdclStyle.GridColumnStyles.Add(new ColumnStyle(0, "lbl", "材料号", 80, "", cellEvent)); wtdclStyle.GridColumnStyles.Add(new ColumnStyle(1, "KW", "库位", 55, "", cellEvent)); wtdclStyle.GridColumnStyles.Add(new ColumnStyle(2, "js", "件数", 45, "", cellEvent)); wtdclStyle.GridColumnStyles.Add(new ColumnStyle(3, "zl", "重量", 50, "", cellEvent)); dgWtdCl.TableStyles.Add(wtdclStyle); }
private void frmClear_Load(object sender, EventArgs e) { showConnect(); if (ScanCodeRemapping.NormalTable.Contains(0x003A)) { ScanCodeRemapping.NormalTable.Remove(0x003A); } LoadData(); dgClear.TableStyles.Clear(); CheckCellEventHandler cellEvent = new CheckCellEventHandler(CheckCellColor); DataGridTableStyle clearStyle = new DataGridTableStyle(); clearStyle.MappingName = dtClear.TableName;////映射style对应数据源的表名,很重要,否则无数据显示 clearStyle.GridColumnStyles.Add(new ColumnStyle(0, "CH", "层号", 80, "", cellEvent)); clearStyle.GridColumnStyles.Add(new ColumnStyle(1, "CLH", "材料号", 140, "", cellEvent)); dgClear.TableStyles.Add(clearStyle); }
private void LoadData() { Global.coils.Clear(); #if InterfaceTest newFrameLayout(10); #else newFrameLayout(Global.curFrame.MaxRow); #endif if (Global.curFrame.KZ == "重")//入库作业 { //loadFrameLayout10(Global.curFrame.KJH); } loadFrameLayout20(Global.curFrame.KJH, Global.curFrame.KZ); curPoint = new CoilPoint(Global.curFrame.KJH, -1, -1); //PrintField(); this.dataGrid1.DataSource = dtFrame; CheckCellEventHandler cellEvent = new CheckCellEventHandler(CheckCellColor); DataGridTableStyle tablestyle = new DataGridTableStyle(); tablestyle.GridColumnStyles.Add(new ColumnStyle(0, "X", "X", 28, "", cellEvent)); tablestyle.GridColumnStyles.Add(new ColumnStyle(1, "L", "L", 103, "", cellEvent)); tablestyle.GridColumnStyles.Add(new ColumnStyle(2, "R", "R", 103, "", cellEvent)); this.dataGrid1.TableStyles.Add(tablestyle); if (Global.curFrame.MaxRow == 8) { SetGridRowHeight(dataGrid1, 0, 38); SetGridRowHeight(dataGrid1, 1, 38); SetGridRowHeight(dataGrid1, 2, 38); SetGridRowHeight(dataGrid1, 3, 38); SetGridRowHeight(dataGrid1, 4, 38); SetGridRowHeight(dataGrid1, 5, 38); SetGridRowHeight(dataGrid1, 6, 38); SetGridRowHeight(dataGrid1, 7, 38); dataGrid1.Invalidate(); } else if (Global.curFrame.MaxRow == 9) { SetGridRowHeight(dataGrid1, 0, 34); SetGridRowHeight(dataGrid1, 1, 33); SetGridRowHeight(dataGrid1, 2, 34); SetGridRowHeight(dataGrid1, 3, 33); SetGridRowHeight(dataGrid1, 4, 34); SetGridRowHeight(dataGrid1, 5, 33); SetGridRowHeight(dataGrid1, 6, 34); SetGridRowHeight(dataGrid1, 7, 34); SetGridRowHeight(dataGrid1, 8, 34); dataGrid1.Invalidate(); } else if (Global.curFrame.MaxRow == 10) { SetGridRowHeight(dataGrid1, 0, 31); SetGridRowHeight(dataGrid1, 1, 30); SetGridRowHeight(dataGrid1, 2, 31); SetGridRowHeight(dataGrid1, 3, 30); SetGridRowHeight(dataGrid1, 4, 30); SetGridRowHeight(dataGrid1, 5, 30); SetGridRowHeight(dataGrid1, 6, 30); SetGridRowHeight(dataGrid1, 7, 30); SetGridRowHeight(dataGrid1, 8, 30); SetGridRowHeight(dataGrid1, 9, 30); dataGrid1.Invalidate(); } else if (Global.curFrame.MaxRow == 12) { SetGridRowHeight(dataGrid1, 0, 25); SetGridRowHeight(dataGrid1, 1, 25); SetGridRowHeight(dataGrid1, 2, 25); SetGridRowHeight(dataGrid1, 3, 25); SetGridRowHeight(dataGrid1, 4, 25); SetGridRowHeight(dataGrid1, 5, 25); SetGridRowHeight(dataGrid1, 6, 25); SetGridRowHeight(dataGrid1, 7, 25); SetGridRowHeight(dataGrid1, 8, 25); SetGridRowHeight(dataGrid1, 9, 25); SetGridRowHeight(dataGrid1, 10, 25); SetGridRowHeight(dataGrid1, 11, 25); dataGrid1.Invalidate(); } }
public ColumnStyle(int column, string MappingName, string HeaderText, int Width, CheckCellEventHandler eventHandler) { _col = column; this.MappingName = MappingName; this.HeaderText = HeaderText; this.Width = Width; this.CheckCellContains += eventHandler; }
public void LoadData() { switch (Global.storage.expflag) { case "tl": lblTitle.Text = "铁路出厂-材料"; lblInfo.Text = "提单号:" + Global.storage.jhh + "\r\n"; lblInfo.Text += "到站:" + Global.storage.jhdd + "\r\n"; break; case "zc": lblTitle.Text = "装船出厂-材料"; lblInfo.Text = "提单号:" + Global.storage.jhh + "\r\n"; lblInfo.Text += "关单号:" + Global.storage.gdh + "\r\n"; break; case "zk": lblTitle.Text = "转库出库-材料"; lblInfo.Text = "计划号:" + Global.storage.jhh + "\r\n"; lblInfo.Text += "入库别:" + Global.storage.jhdd + "\r\n"; break; case "zt": lblTitle.Text = "自提出厂-材料"; lblInfo.Text = "提单号:" + Global.storage.jhh + "\r\n"; lblInfo.Text += "收货单位:" + Global.storage.shdw + "\r\n"; break; } string value = ""; switch (Global.storage.cltype) { case 0: lblInfo.Text += "准发号:" + Global.storage.zfh; value = Global.storage.zfh; break; case 1: lblInfo.Text += "炉号:" + Global.storage.lh; value = Global.storage.lh; break; case 2: lblInfo.Text += "合同号:" + Global.storage.hth; value = Global.storage.hth; break; case 3: lblInfo.Text += "轧批号:" + Global.storage.zph; value = Global.storage.zph; break; default: break; } dtCl = Storage.GetExpCL(Global.storage.jhh, Global.storage.make, Global.storage.cltype, value); curRow = -1; dgCl.DataSource = dtCl; dgCl.TableStyles.Clear(); DataGridTableStyle clStyle = new DataGridTableStyle(); clStyle.MappingName = dtCl.TableName; CheckCellEventHandler cellEvent = new CheckCellEventHandler(CheckCellColor); clStyle.GridColumnStyles.Add(new ColumnStyle(0, "CLH", "材料号", 110, "", cellEvent)); //clStyle.GridColumnStyles.Add(new ColumnStyle(1, "KW", "库位", 70, "", cellEvent)); clStyle.GridColumnStyles.Add(new ColumnStyle(1, "MZ", "毛重", 60, "", cellEvent)); clStyle.GridColumnStyles.Add(new ColumnStyle(2, "JZ", "净重", 60, "", cellEvent)); clStyle.GridColumnStyles.Add(new ColumnStyle(3, "GG", "规格", 170, "", cellEvent)); dgCl.TableStyles.Add(clStyle); }
public void LoadData() { switch (Global.storage.expflag) { case "tl": lblInfo.Text = "提单号:" + Global.storage.jhh + "\r\n"; lblInfo.Text += "到站:" + Global.storage.jhdd + "\r\n"; break; case "zc": lblInfo.Text = "提单号:" + Global.storage.jhh + "\r\n"; lblInfo.Text += "关单号:" + Global.storage.gdh + "\r\n"; break; case "zk": lblInfo.Text = "计划号:" + Global.storage.jhh + "\r\n"; lblInfo.Text += "入库别:" + Global.storage.jhdd + "\r\n"; break; case "zt": lblInfo.Text = "提单号:" + Global.storage.jhh + "\r\n"; lblInfo.Text += "收货单位:" + Global.storage.shdw + "\r\n"; break; } string value = ""; switch (Global.storage.cltype) { case 0: lblInfo.Text += "准发号:" + Global.storage.zfh; value = Global.storage.zfh; break; case 1: lblInfo.Text += "炉号:" + Global.storage.lh; value = Global.storage.lh; break; case 2: lblInfo.Text += "合同号:" + Global.storage.hth; value = Global.storage.hth; break; case 3: lblInfo.Text += "扎批号:" + Global.storage.zph; value = Global.storage.zph; break; default: break; } dtOut = Storage.GetExpCLkb(Global.sKb, Global.storage.cph, Global.storage.jhh, Global.storage.make, Global.storage.cltype, value); curRow = -1; dgOut.DataSource = dtOut; dgOut.TableStyles.Clear(); DataGridTableStyle outStyle = new DataGridTableStyle(); outStyle.MappingName = dtOut.TableName; CheckCellEventHandler cellEvent = new CheckCellEventHandler(CheckCellColor); outStyle.GridColumnStyles.Add(new ColumnStyle(0, "CLH", "材料号", 100, "", cellEvent)); outStyle.GridColumnStyles.Add(new ColumnStyle(1, "KW", "库位", 60, "", cellEvent)); outStyle.GridColumnStyles.Add(new ColumnStyle(2, "MZ", "毛重", 60, "", cellEvent)); outStyle.GridColumnStyles.Add(new ColumnStyle(3, "JZ", "净重", 60, "", cellEvent)); outStyle.GridColumnStyles.Add(new ColumnStyle(4, "GG", "规格", 150, "", cellEvent)); dgOut.TableStyles.Add(outStyle); RefreshJS(); }