private void BtnBilgiGuncelle_Click(object sender, EventArgs e) { if (FrmHastaKayit.TCKontrol(MskTC.Text)) { SqlCommand komut2 = new SqlCommand("update Tbl_Yoneticiler set YoneticiAd=@p1, YoneticiSoyad=@p2, YoneticiSifre=@p3 where YoneticiTC=@p4", bgl.baglanti()); komut2.Parameters.AddWithValue("@p1", TxtAd.Text); komut2.Parameters.AddWithValue("@p2", TxtSoyad.Text); komut2.Parameters.AddWithValue("@p3", TxtSifre.Text); komut2.Parameters.AddWithValue("@p4", MskTC.Text); komut2.ExecuteNonQuery(); bgl.baglanti().Close(); MessageBox.Show("Bilgileriniz güncellendi.", "Bilgi", MessageBoxButtons.OK, MessageBoxIcon.Information); } }
private void BtnYoneticiEkle_Click(object sender, EventArgs e) { if (FrmHastaKayit.TCKontrol(MskTC.Text)) { SqlCommand komut2 = new SqlCommand("insert into Tbl_Yoneticiler(YoneticiTC,YoneticiAd,YoneticiSoyad,YoneticiSifre) values (@p1, @p2, @p3, @p4)", bgl.baglanti()); komut2.Parameters.AddWithValue("@p2", TxtAd.Text); komut2.Parameters.AddWithValue("@p3", TxtSoyad.Text); komut2.Parameters.AddWithValue("@p4", TxtSifre.Text); komut2.Parameters.AddWithValue("@p1", MskTC.Text); komut2.ExecuteNonQuery(); bgl.baglanti().Close(); MessageBox.Show("Yönetici Eklendi", "Bilgi", MessageBoxButtons.OK, MessageBoxIcon.Information); TabloGuncelle(); } }
private void BtnEkle_Click(object sender, EventArgs e) { if (FrmHastaKayit.TCKontrol(MskTC.Text)) { SqlCommand komut = new SqlCommand("insert into Tbl_Doktorlar(DoktorAd,DoktorSoyad,Bransid,DoktorTC,DoktorSifre) values(@d1,@d2,(SELECT Bransid FROM Tbl_Branslar WHERE BransAd='" + CmbBrans.Text + "'),@d4,@d5)", bgl.baglanti()); komut.Parameters.AddWithValue("@d1", TxtAd.Text); komut.Parameters.AddWithValue("@d2", TxtSoyad.Text); komut.Parameters.AddWithValue("@d4", MskTC.Text); komut.Parameters.AddWithValue("@d5", TxtSifre.Text); komut.ExecuteNonQuery(); bgl.baglanti().Close(); MessageBox.Show("Doktor eklendi.", "Bilgi", MessageBoxButtons.OK, MessageBoxIcon.Information); TabloGuncelle(); } }
private void BtnBilgiGuncelle_Click(object sender, EventArgs e) { if (FrmHastaKayit.TCKontrol(MskTC.Text)) { SqlCommand komut2 = new SqlCommand("update Tbl_Hastalar set HastaAd=@p1, HastaSoyad=@p2, HastaTelefon=@p3, HastaSifre=@p4, HastaCinsiyet=@p5 where HastaTC=@p6", bgl.baglanti()); komut2.Parameters.AddWithValue("@p1", TxtAd.Text); komut2.Parameters.AddWithValue("@p2", TxtSoyad.Text); komut2.Parameters.AddWithValue("@p3", MskTelefon.Text); komut2.Parameters.AddWithValue("@p4", TxtSifre.Text); komut2.Parameters.AddWithValue("@p5", CmbCinsiyet.Text); komut2.Parameters.AddWithValue("@p6", MskTC.Text); komut2.ExecuteNonQuery(); bgl.baglanti().Close(); MessageBox.Show("Bilgileriniz güncellendi.", "Bilgi", MessageBoxButtons.OK, MessageBoxIcon.Information); } }
private void BtnGuncelle_Click(object sender, EventArgs e) { if (FrmHastaKayit.TCKontrol(MskTC.Text)) { SqlCommand komut = new SqlCommand("update Tbl_Doktorlar set DoktorAd=@d2, DoktorSoyad=@d3, Bransid=(SELECT Bransid FROM Tbl_Branslar WHERE BransAd=@d4), DoktorTC=@d5, DoktorSifre=@d6 where Doktorid=@d1", bgl.baglanti()); komut.Parameters.AddWithValue("@d1", TxtDoktorid.Text); komut.Parameters.AddWithValue("@d2", TxtAd.Text); komut.Parameters.AddWithValue("@d3", TxtSoyad.Text); komut.Parameters.AddWithValue("@d4", CmbBrans.Text); komut.Parameters.AddWithValue("@d5", MskTC.Text); komut.Parameters.AddWithValue("@d6", TxtSifre.Text); komut.ExecuteNonQuery(); bgl.baglanti().Close(); MessageBox.Show("Doktor bilgisi güncellendi.", "Bilgi", MessageBoxButtons.OK, MessageBoxIcon.Information); TabloGuncelle(); } }
private void button2_Click(object sender, EventArgs e) { FrmHastaKayit fr = new FrmHastaKayit(); fr.Show(); }
private void LnkUyeOl_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e) { FrmHastaKayit fr = new FrmHastaKayit(); fr.Show(); }