private void button1_Click(object sender, EventArgs e) { if (textBox1.Text == "Loginasadmin(Alexie01, Alexie1981) = true" || textBox1.Text == "Loginasuser(Casa, 1981) = true") { Lista_de_cumparaturi f8 = new Lista_de_cumparaturi(); //ActiveForm.Hide(); this.Hide(); Hide(); f8.ShowDialog(); } else if (textBox1.Text == "EXIT" || textBox1.Text == "exit" || textBox1.Text == "Exit") { this.Hide(); } else { if (MessageBox.Show("Unkwon command !", "Error", MessageBoxButtons.OK, MessageBoxIcon.Warning) == System.Windows.Forms.DialogResult.No) { Application.ExitThread(); } textBox1.Text = ""; textBox1.Focus(); } }
private void button2_Click(object sender, EventArgs e) { if (txt_Username.Text == "Casa" && txt_Userpassword.Text == "1981") { Lista_de_cumparaturi f5 = new Lista_de_cumparaturi(); this.Hide(); f5.ShowDialog(); } }
private void button2_Click(object sender, EventArgs e) { //(Owner as Lista_de_cumparaturi).toolStripLabel1.Text = ""; if (txt_Adminname.Text == "Alexie01" && txt_Adminpassword.Text == "Alexie1981") { Lista_de_cumparaturi f4 = new Lista_de_cumparaturi(); this.Hide(); f4.ShowDialog(); } else { if (MessageBox.Show("Username or password incorrect !", "Error", MessageBoxButtons.OK, MessageBoxIcon.Warning) == System.Windows.Forms.DialogResult.No) { Application.ExitThread(); } } }