private void button2_Click(object sender, EventArgs e)
        {
            E1 emp = new E1();

            this.Hide();
            emp.Show();
        }
Пример #2
0
        private void button1_Click(object sender, EventArgs e)
        {
            conn.sqlConnection1.Open();
            SqlCommand    cmd = new SqlCommand("Select * from Emp_Login", conn.sqlConnection1);
            SqlDataReader dr  = cmd.ExecuteReader();

            while (dr.Read())
            {
                if (textBox1.Text == dr["Emp_username"].ToString() && textBox2.Text == dr["Emp_password"].ToString())
                {
                    E1 emp = new E1(this);
                    this.Hide();
                    emp.Show();
                }
                else
                {
                    MessageBox.Show("Incorrect Username or Password!", "ERROR", MessageBoxButtons.OK, MessageBoxIcon.Error);
                }
            }
            conn.sqlConnection1.Close();
        }
Пример #3
0
 public Eusername(E1 e11)
 {
     emp = e11;
     InitializeComponent();
 }