private void btnUpdate_Click(object sender, EventArgs e)
        {
            FrmPermission frm = new FrmPermission();

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

            this.Hide();
            frm.ShowDialog();
            this.Visible = true;
            FillAllData();
            ClearFilters();
        }
 private void btnUpdate_Click(object sender, EventArgs e)
 {
     if (detail.PermissionID == 0)
     {
         MessageBox.Show("Please select a permission from table!");
     }
     else if (detail.State == PermissionStates.Approved || detail.State == PermissionStates.Disapproved)
     {
         MessageBox.Show("You cannot update any approved or disapproved permissions!");
     }
     else
     {
         FrmPermission frm = new FrmPermission();
         frm.isUpdated = true;
         frm.detail    = detail;
         this.Hide();
         frm.ShowDialog();
         this.Visible = true;
         FillAllData();
         ClearFilters();
     }
 }