Exemple #1
0
 public void RemoveUser(string userName)
 {
     if (this.GetStatus().Equals("manager"))
     {
         RegistrationDatabase.RemoveUser(userName);
     }
 }
Exemple #2
0
        private void button11_Click(object sender, EventArgs e)
        {
            foreach (DataGridViewRow d_row in dataGridView2.Rows)
            {
                object ischecked = d_row.Cells[0].Value;

                if (ischecked == null)
                {
                }
                else
                {
                    try
                    {
                        RegistrationDatabase.RemoveUser((string)d_row.Cells[4].Value);
                    }
                    catch
                    {
                        System.Windows.Forms.MessageBox.Show("Error in removing student");
                    }
                }
            }
            Form2_Load(sender, e);
        }