Beispiel #1
0
        private void button1_Click(object sender, EventArgs e)
        {
            con.Open();
            string sql = "SELECT * FROM Pracownik WHERE Login = '******' AND Haslo = '" + textBox2.Text + "'";

            cmd = new SqlCommand(sql, con);
            SqlDataReader dr = cmd.ExecuteReader();

            if (dr.HasRows)
            {
                con.Close();
                //Klient klient = new Klient(start, con, textBox1.Text);
                Pracownik prac = new Pracownik(start, textBox1.Text);
                this.Hide();
                prac.Show();
            }
            else
            {
                MessageBox.Show("Błąd");
            }
            con.Close();
        }
Beispiel #2
0
 private void button1_Click(object sender, EventArgs e)
 {
     this.Hide();
     prac.Show();
 }