public override void savebtn_Click(object sender, EventArgs e)
 {
     if (rolesTxt.Text == "")
     {
         rolesErrorLabel.Visible = true;
     }
     else
     {
         rolesErrorLabel.Visible = false;
     }
     if (rolesErrorLabel.Visible)
     {
         MainClass.showMessage("Fields with * are mandatory", "Error");
     }
     else
     {
         if (edit == 0)
         {
             insertion.insertRole(rolesTxt.Text);
             MainClass.resetDisable(leftpanel);
             RetrivalData.getRoles(dataGridView1, RoleIDGV, RoleGV);
         }
         else if (edit == 1)
         {
             Updates.updateRole(rolesTxt.Text, roleID);
             MainClass.resetDisable(leftpanel);
             RetrivalData.getRoles(dataGridView1, RoleIDGV, RoleGV);
         }
     }
 }
 public override void deletebtn_Click(object sender, EventArgs e)
 {
     if (delStatus == 1)
     {
         DialogResult dr = MessageBox.Show("Want to delete this record?", "Question.", MessageBoxButtons.YesNo, MessageBoxIcon.Question);
         if (dr == DialogResult.Yes)
         {
             Deletion.deleteData("st_deleteRole", "@rid", roleID);
             MainClass.resetDisable(leftpanel);
             RetrivalData.getRoles(dataGridView1, RoleIDGV, RoleGV);
         }
     }
 }
 public override void viewbtn_Click(object sender, EventArgs e)
 {
     RetrivalData.getRoles(dataGridView1, RoleIDGV, RoleGV);
 }