Exemple #1
0
 private void toolStripButton8_Click(object sender, EventArgs e)
 {
     if ((this.dataGridView1.DataSource != null) && (MessageBox.Show("确定要删除该报表码?", "询问", MessageBoxButtons.OKCancel, MessageBoxIcon.Question, MessageBoxDefaultButton.Button2) == DialogResult.OK))
     {
         HisReport.DeleteReport(((DataTable)this.dataGridView1.DataSource).DefaultView.ToTable().Rows[this.dataGridView1.CurrentCell.RowIndex]["ReportPath"].ToString());
         this.dataGridView1.DataSource = HisReport.LoadReports();
     }
 }
Exemple #2
0
        public FrmHisReport(long currentUserId, long currentDeptId, string chineseName)
        {
            InitializeComponent();
            _currentUser = new User(currentUserId);
            _currentDept = new Deptment(currentDeptId);

            this.Text = chineseName;
            this.dataGridView1.DataSource = HisReport.LoadReports();
        }
Exemple #3
0
 private void toolStripButton6_Click(object sender, EventArgs e)
 {
     try
     {
         int    rptid   = Convert.ToInt32(((DataTable)this.dataGridView1.DataSource).DefaultView.ToTable().Rows[this.dataGridView1.CurrentCell.RowIndex]["ReportID"]);
         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();
         new FrmNewReport(this._currentUser.EmployeeID.ToString(), this._currentUser.Name, rptid, rptName, rptPath).ShowDialog();
         this.dataGridView1.DataSource = HisReport.LoadReports();
     }
     catch
     {
     }
 }
Exemple #4
0
 private void toolStripButton7_Click(object sender, EventArgs e)
 {
     this.dataGridView1.DataSource = null;
     this.dataGridView1.DataSource = HisReport.LoadReports();
 }
Exemple #5
0
 private void toolStripButton1_Click(object sender, EventArgs e)
 {
     new FrmNewReport(this._currentUser.EmployeeID.ToString(), this._currentUser.Name).ShowDialog();
     this.dataGridView1.DataSource = HisReport.LoadReports();
 }