public void Print(PrintLayoutEventArgs e) { DataGridView gv = tabControl1.SelectedTab.Text == "仪器标准" ? dataGridView1 : gridStockItems; string cb_chck = tabControl1.SelectedTab.Text == "仪器标准" ? "cb_check1" : "cb_check"; Print(gv, cb_chck, e.Layout); }
public void OnPrintEvent(PrintLayoutEventArgs e) { if (PrintEvent != null) { PrintEvent(e); } }
public void Print(Constants.BarCodeLayout Layout) { PrintLayoutEventArgs e = new PrintLayoutEventArgs(); e.Layout = Layout; OnPrintEvent(e); this.Close(); }