private void R_Registerbutton_Click(object sender, EventArgs e)
 {
     if ((string.IsNullOrEmpty(RegisterConfirmPasswordTextbox.Text) || string.IsNullOrEmpty(RegisterUserNameTextbox.Text) || string.IsNullOrEmpty(RegisterPasswordTextbox.Text)) || (!student_Radio.Checked && !teacherRadio.Checked && !AdminRadio.Checked))
     {
         MessageBox.Show("Please Provide All The Information For Registration", "Invalid Operation", MessageBoxButtons.OK, MessageBoxIcon.Warning);
     }
     else
     {
         info = sd.GetUserName(username);
         //int student,teacher,admin=0;
         if (info.UserName == username)
         {
             MessageBox.Show("UserName Already Exists");
         }
         else
         {
             info.UserName = RegisterUserNameTextbox.Text;
             string password, confirmpassword;
             password        = RegisterPasswordTextbox.Text;
             confirmpassword = RegisterConfirmPasswordTextbox.Text;
             if (password == confirmpassword)
             {
                 if (AdminRadio.Checked)
                 {
                     int admin;
                     admin       = 1;
                     info.Status = admin;
                 }
                 else
                 {
                     if (teacherRadio.Checked)
                     {
                         int teacher;
                         teacher     = 2;
                         info.Status = teacher;
                     }
                     else
                     {
                         if (student_Radio.Checked)
                         {
                             int student;
                             student     = 3;
                             info.Status = student;
                         }
                         else
                         {
                             MessageBox.Show("set user status...");
                         }
                     }
                 }
                 info.UserPassword = RegisterPasswordTextbox.Text;
                 cm.Insert(info);
                 MessageBox.Show("Registration Complete", "Congratulation", MessageBoxButtons.OK, MessageBoxIcon.Asterisk);
             }
             else
             {
                 textLabel.Text = "Password Does Not Match";
             }
         }
     }
 }