private void button1_Click(object sender, EventArgs e) { if (textBox1.Text == "director" && textBox2.Text == "director") { Director_1 adm = new Director_1(); adm.Show(); } else if (textBox1.Text == "engineer" && textBox2.Text == "engineer") { Engineer_1 adm = new Engineer_1(); adm.Show(); } else if (textBox1.Text == "manager" && textBox2.Text == "manager") { Manager_1 adm = new Manager_1(); adm.Show(); } else { textBox1.Text = ""; textBox2.Text = ""; MessageBox.Show("Неверный логин или пароль!"); } }
//Кнопка НАЗАД private void button2_Click(object sender, EventArgs e) { Engineer_1 adm = new Engineer_1(); adm.Show(); this.Hide(); }