private void bt_Next_Click(object sender, EventArgs e) { if (this.tb_RptName.Text.Trim() == "" || this.tb_ConnStr.Text.Trim() == "" || this.tb_rptPath.Text.Trim() == "" || this.tb_Sql.Text.Trim() == "") { MessageBox.Show("请输入完整数据!"); return; } if (!Directory.Exists(this.tb_rptPath.Text.Trim())) { MessageBox.Show("报表文件存放路径不正确!"); return; } if (!IsNew) { AddReport(); } else { UpdateReport(); } this.Hide(); FrmReportManager fm = new FrmReportManager(this.tb_RptName.Text.Trim(), this.tb_rptPath.Text.Trim(), this.tb_ConnStr.Text.Trim(), this.tb_Sql.Text.Trim()); fm.ShowDialog(); }
private void toolStripButton2_Click(object sender, EventArgs e) { try { string RptName = ((DataTable)this.dataGridView1.DataSource).DefaultView.ToTable().Rows[this.dataGridView1.CurrentCell.RowIndex]["ReportName"].ToString(); string RptPath = ((DataTable)this.dataGridView1.DataSource).DefaultView.ToTable().Rows[this.dataGridView1.CurrentCell.RowIndex]["ReportPath"].ToString(); FrmReportManager fm = new FrmReportManager(RptName, RptPath); fm.ShowDialog(); //LoadReports(); } catch { } }