private void button14_Click(object sender, EventArgs e) { string _datagridname = get_report_dataviewname(); PrintDataGrid.Print_DataGridView(dataGridView6, "" , tabControl_management.TabPages[tabControl_management.SelectedIndex].Text); }
private void button10_Click(object sender, EventArgs e) { string str = "Report time: "; string r = ""; if (tabControl_management.TabPages[tabControl_management.SelectedIndex].Name == "tabPage_adhoc_rep") { r = dateTimePicker1.Value.ToString("dd/MM/yyyy") + " to " + dateTimePicker2.Value.ToString("dd/MM/yyyy"); } else if (tabControl_management.TabPages[tabControl_management.SelectedIndex].Name == "tabPage_alarm_rep") { r = dateTimePicker3.Value.ToString("dd/MM/yyyy") + " to " + dateTimePicker4.Value.ToString("dd/MM/yyyy"); } else if (tabControl_management.TabPages[tabControl_management.SelectedIndex].Name == "tabPage_log_rep") { r = dateTimePicker5.Value.ToString("dd/MM/yyyy") + " to " + dateTimePicker6.Value.ToString("dd/MM/yyyy"); r += "\r\n" + "User: "******"" ? "All" : comboBox_users.Text); } else if (tabControl_management.TabPages[tabControl_management.SelectedIndex].Name == "tabPage_cms_daily_rep") { r = dateTimePicker8.Value.ToString("dd/MM/yyyy"); r += "\r\n" + "CMS: " + comboBox1.Text; } else if (tabControl_management.TabPages[tabControl_management.SelectedIndex].Name == "tabPage_cms_occ_rep") { r = dateTimePicker9.Value.ToString("dd/MM/yyyy"); r += "\r\n" + "CMS: " + comboBox2.Text; } else if (tabControl_management.TabPages[tabControl_management.SelectedIndex].Name == "tabPage_combine") { r = dateTimePicker13.Value.ToString("dd/MM/yyyy"); r += "\r\n" + "Area: " + comboBox_area.Text; } else if (tabControl_management.TabPages[tabControl_management.SelectedIndex].Name == "tabPage_vms_month_rep") { r = dateTimePicker11.Value.ToString("MM/yyyy"); } str += r; string _datagridname = get_report_dataviewname(); PrintDataGrid.Print_DataGridView((DataGridView)this.Controls.Find(_datagridname, true)[0], str , tabControl_management.TabPages[tabControl_management.SelectedIndex].Text); }
private void button10_Click(object sender, EventArgs e) { PrintDataGrid.Print_DataGridView(dataGridView7, "", "Alarm List"); }