Example #1
0
        private void btnGeri_Click(object sender, EventArgs e)
        {
            frmLobi frm = new frmLobi();

            this.Close();
            frm.Show();
        }
Example #2
0
        private void btnGiris_Click(object sender, EventArgs e)
        {
            string name = txtName.Text;
            string pass = txtPass.Text;

            cBaglanti       con     = new cBaglanti();
            MySqlConnection connect = new MySqlConnection(con.baglanti);
            MySqlCommand    cmd     = new MySqlCommand("select * from personel where pName='" + name + "' and pPass='******'", connect);

            connect.Open();
            MySqlDataReader dr = cmd.ExecuteReader();

            if (dr.Read())
            {
                this.Hide();
                frmLobi lobi = new frmLobi();
                lobi.Show();
            }
            else
            {
                MessageBox.Show("Hatalı Ad veya Şifre!");
            }
        }