Ejemplo n.º 1
0
        private void BtnGirisYap_Click(object sender, EventArgs e)
        {
            SqlCommand cmd = new SqlCommand("Select*from Tbl_Hastalar where HastaTC=@p1 and HastaSifre=@p2", bgl.connection());

            cmd.Parameters.AddWithValue("@p1", MskTC.Text);
            cmd.Parameters.AddWithValue("@p2", TxtSifre.Text);
            SqlDataReader dr = cmd.ExecuteReader();

            if (dr.Read())
            {
                FrmHastaDetay fr = new FrmHastaDetay();
                fr.tc = MskTC.Text;
                fr.Show();
                this.Hide();
            }
            else
            {
                MessageBox.Show("Hatalı TC & Şifre");
            }
            bgl.connection().Close();
        }
Ejemplo n.º 2
0
        private void btngirisyap_Click(object sender, EventArgs e)
        {
            SqlCommand komut = new SqlCommand("Select * From Tbl_Hastalar where HastaTC=@p1 and HastaSifre=@p2", bgl.baglanti());

            komut.Parameters.AddWithValue("@p1", MskTC.Text);
            komut.Parameters.AddWithValue("@p2", txtsifre.Text);
            SqlDataReader dr = komut.ExecuteReader();

            if (dr.Read())
            {
                FrmHastaDetay fr = new FrmHastaDetay();
                fr.tc = MskTC.Text;
                fr.Show();
                this.Hide();
            }
            else
            {
                MessageBox.Show("Hatalı TC veya Şifre");
            }
            bgl.baglanti().Close();
        }
Ejemplo n.º 3
0
        private void BtnGirisYap_Click(object sender, EventArgs e)
        {
            SqlCommand komut = new SqlCommand("select * from Tbl_Hastalar where HastaTC=@p1 and HastaSifre=@p2", bgl.baglanti());

            komut.Parameters.AddWithValue("@p1", MskTC.Text);
            komut.Parameters.AddWithValue("@p2", TxtSifre.Text);
            SqlDataReader dr = komut.ExecuteReader();

            if (dr.Read())
            {
                FrmHastaDetay fr = new FrmHastaDetay();
                fr.tc = MskTC.Text;
                fr.Show();
                this.Hide();
            }
            else
            {
                MessageBox.Show("Hatalı TC & Şifre", "Hata!", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
            bgl.baglanti().Close();
        }
        private void btnHastagiris_Click(object sender, EventArgs e)
        {
            SqlCommand komutGiris = new SqlCommand("Select * From Tbl_Hasta where HastaTc = @p1 and HastaSifre = @p2", baglan.baglanti());

            komutGiris.Parameters.AddWithValue("@p1", mskTcno.Text);
            komutGiris.Parameters.AddWithValue("@p2", txtHastasifre.Text);
            SqlDataReader sifreOku = komutGiris.ExecuteReader();

            if (sifreOku.Read())
            {
                FrmHastaDetay frmHastadetay = new FrmHastaDetay();
                frmHastadetay.tc = mskTcno.Text;
                frmHastadetay.Show();
                this.Hide();
            }
            else
            {
                MessageBox.Show("Hatalı TC Kimlik veya Şifre !", "Uyarı", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
            baglan.baglanti().Close();
        }
Ejemplo n.º 5
0
        private void BtnGiris_Click(object sender, EventArgs e)
        {
            SqlCommand komut = new SqlCommand("Select * from Tbl_Hasta Where HastaTC = @p1 and HastaSifre = @p2", bgl.baglanti());

            komut.Parameters.AddWithValue("@p1", mskTC.Text);
            komut.Parameters.AddWithValue("@p2", TxtSifre.Text);
            SqlDataReader dr = komut.ExecuteReader();

            if (dr.Read())
            {
                FrmHastaDetay fr = new FrmHastaDetay();
                fr.tc = mskTC.Text;
                fr.Show();
                this.Hide();
            }
            else
            {
                MessageBox.Show("Hatalı şifre veya TC No girdiniz.");
            }
            bgl.baglanti().Close();
        }
        private void BtnGirisYap_Click(object sender, EventArgs e)
        {
            SqlCommand cmd = new SqlCommand("Select * from Tbl_Hastalar Where HastaTC = @HastaTC and HastaSifre=@HastaSifre", nw.ConnSql());

            cmd.Parameters.AddWithValue("@HastaTC", mskTC.Text);
            cmd.Parameters.AddWithValue("@HastaSifre", TxtSifre.Text);
            SqlDataReader sdr = cmd.ExecuteReader();

            if (sdr.Read())
            {
                FrmHastaDetay fr = new FrmHastaDetay();
                fr.tc = mskTC.Text;
                fr.Show();
                this.Hide();
            }
            else
            {
                MessageBox.Show("Hatalı 'TC' veya 'Şifre' girişi yapıldı");
            }

            nw.ConnSql().Close();
        }
Ejemplo n.º 7
0
        private void BtnGiris_Click(object sender, EventArgs e)
        {
            FrmHastaDetay Frhd = new FrmHastaDetay();

            Frhd.Show();
        }