Exemple #1
0
        private void btnUpdate_Click(object sender, EventArgs e)
        {
            FrmDepartment frm = new FrmDepartment();

            this.Hide();
            frm.ShowDialog();
            this.Visible = true;
        }
        private void btnNew_Click(object sender, EventArgs e)
        {
            FrmDepartment frm = new FrmDepartment();

            this.Hide();
            frm.ShowDialog();
            this.Visible             = true;
            list                     = DepartmentBLL.GetDepartments();
            dataGridView1.DataSource = list;
        }
 private void btnUpdate_Click(object sender, EventArgs e)
 {
     if (detail.ID == 0)
     {
         MessageBox.Show("Select a department from the table");
     }
     else
     {
         FrmDepartment frm = new FrmDepartment();
         frm.isUpdate = true;
         frm.detail   = detail;
         this.Hide();
         frm.ShowDialog();
         this.Visible             = true;
         list                     = DepartmentBLL.GetDepartments();
         dataGridView1.DataSource = list;
     }
 }