public SetFormat(List <InvVolumeApp> invVols, List <string> formats) { this.jpxxDal = BLLFactory.CreateInstant <ILYGL_JPXX>("LYGL_JPXX"); this.InitializeWindow(); this.Text = "增值税普通发票(卷票)规格修改"; this.btnSetUpdate.Text = "修改"; DataTable table = this.InitialTableData(invVols, formats); this.csdgVolumns.DataSource = table; }
public SetFormat(List <InvVolumeApp> invVols, string defaultFormat = "NEW76mmX177mm") { this.jpxxDal = BLLFactory.CreateInstant <ILYGL_JPXX>("LYGL_JPXX"); this.InitializeWindow(); this.Text = "增值税普通发票(卷票)规格设置"; this.btnSetUpdate.Text = "设置"; this.btnSyn.Visible = false; DataTable table = this.CreateTableHeader(); foreach (InvVolumeApp app in invVols) { DataRow row = table.NewRow(); row["LBDM"] = app.TypeCode; row["JQSH"] = Convert.ToString(ShareMethods.GetVolumnStartNum(app)).PadLeft(8, '0'); row["JZZH"] = Convert.ToString(ShareMethods.GetVolumnEndNum(app)).PadLeft(8, '0'); row["LGZS"] = app.BuyNumber.ToString(); row["LGRQ"] = app.BuyDate.ToString("yyyy-MM-dd"); row["JPGG"] = defaultFormat; table.Rows.Add(row); } this.csdgVolumns.DataSource = table; }