예제 #1
0
        private void buttonCancel_Click(object sender, EventArgs e)
        {
            this.Hide();
            RunnerMenu rm = new RunnerMenu();

            rm.Show();
        }
예제 #2
0
        private void buttonExit_Click(object sender, EventArgs e)
        {
            RunnerMenu rm = new RunnerMenu();

            rm.Show();
            this.Hide();
        }
예제 #3
0
        private void buttonSave_Click(object sender, EventArgs e)
        {
            try
            {
                throw new Exception("Данные изменены!");
            }
            catch (Exception ex) { MessageBox.Show("" + ex.Message, "Успешно", MessageBoxButtons.OK, MessageBoxIcon.Information); }
            this.Hide();
            RunnerMenu rm = new RunnerMenu();

            rm.Show();
        }
예제 #4
0
 private void buttonIn_Click(object sender, EventArgs e)
 {
     if (textBoxEmail.Text == "" && textBoxPassword.Text == "")
     {
         MessageBox.Show("Введите данные", "Ошибка", MessageBoxButtons.OK, MessageBoxIcon.Information);
     }
     else
     {
         bool key = false;
         foreach (User user in Program.mskills.User)
         {
             if (textBoxEmail.Text == user.Email && textBoxPassword.Text == user.Password)
             {
                 key            = true;
                 users.login    = user.Email;
                 users.password = user.Password;
                 users.type     = user.RoleId;
             }
         }
         if (!key)
         {
             MessageBox.Show("Проверьте данные", "Пользователь не найден", MessageBoxButtons.OK, MessageBoxIcon.Information);
             textBoxEmail.Text    = "";
             textBoxPassword.Text = "";
         }
         else
         {
             if (users.type == "R")
             {
                 Close();
                 RunnerMenu runnerMenu = new RunnerMenu();
                 runnerMenu.Show();
                 this.Hide();
             }
             else if (users.type == "A")
             {
                 Close();
                 AdminMenu administratorMenu = new AdminMenu();
                 administratorMenu.Show();
                 this.Hide();
             }
             else if (users.type == "C")
             {
                 Close();
                 CoordinatorMenu coordinatorMenu = new CoordinatorMenu();
                 coordinatorMenu.Show();
                 this.Hide();
             }
         }
     }
 }