private void gridAll_CellClick(object sender, DataGridViewCellEventArgs e)
 {
     if (!txtID.Enabled)
     {
         ButtonControl(true, true, false, false, true, false);
         string   selecteduserid = gridAll.Rows[e.RowIndex].Cells[1].Value.ToString();
         clsAdmin selecteduser   = admin.Current_User(selecteduserid);
         txtID.Text    = selecteduser.UserID;
         txtName.Text  = selecteduser.Name;
         txtPhone.Text = selecteduser.PhoneNumber;
     }
 }
 private void frmMain_Load(object sender, EventArgs e)
 {
     if (permission == 1)
     {
         MenuControl(true, true, true, true, true);
         admin = new clsAdmin();
         admin = admin.Current_User(userID);
         MessageBox.Show("Hello, " + admin.Name);
     }
     if (permission == 2)
     {
         MenuControl(false, false, true, true, true);
         agent = new clsAgent();
         agent = agent.Current_User(userID);
         MessageBox.Show("Hello, " + agent.Name);
     }
     if (permission == 3)
     {
         MenuControl(false, false, false, false, false);
         user = new clsGeneralUser();
         user = user.Current_User(userID);
         MessageBox.Show("Hello, " + user.Name);
     }
 }