protected override void tsb_Edit_Click(object sender, EventArgs e)
 {
     if (departmentDataGridView.RowCount > 0)
     {
         try
         {
             frm_EditDepartments frm_editdepartments = new frm_EditDepartments((int)departmentDataGridView.SelectedRows[0].Cells[0].Value,
                 "EDIT");
             if (frm_editdepartments.ShowDialog() == DialogResult.OK)
                 this.SetProperties();
         }
         catch { }
     }
 }
 protected override void bindingNavigatorAddNewItem_Click(object sender, EventArgs e)
 {
     frm_EditDepartments frm_editdepartments = new frm_EditDepartments(0, "INS");
     frm_editdepartments.ShowDialog();
     this.SetProperties();
 }