private void FrmDoktorPaneli_Load(object sender, EventArgs e) { //Kayıtlı Doktorları Getirme DataTable dt1 = new DataTable(); SqlDataAdapter da1 = new SqlDataAdapter("select * from TBL_Doktorlar", bgl.baglanti()); da1.Fill(dt1); dataGridView1.DataSource = dt1; //Branşları ComboBox a Getirme SqlCommand komut2 = new SqlCommand("select BransAd from TBL_Branslar", bgl.baglanti()); SqlDataReader dr2 = komut2.ExecuteReader(); while (dr2.Read()) { cmbbrans.Items.Add(dr2[0]); } bgl.baglanti().Close(); dataGridView1.Columns[0].HeaderText = "Randevu ID"; dataGridView1.Columns[1].HeaderText = "Doktor Adı"; dataGridView1.Columns[2].HeaderText = "Doktor Soyadı"; dataGridView1.Columns[3].HeaderText = "Doktor Branşı"; dataGridView1.Columns[4].HeaderText = "Doktor TC"; dataGridView1.Columns[5].HeaderText = "Doktor Şifre"; dataGridView1.Columns[0].Visible = false; FrmDuyurular fr = new FrmDuyurular(); fr.DatagridviewSetting(dataGridView1); }
private void FrmSekreterDetay_Load(object sender, EventArgs e) { lbltc.Text = TCnumara; //Ad Soyad SqlCommand komut1 = new SqlCommand("select SekreterAdSoyad from TBL_Sekreterler where SekreterTC=@p1", bgl.baglanti()); komut1.Parameters.AddWithValue("@p1", lbltc.Text); SqlDataReader dr1 = komut1.ExecuteReader(); while (dr1.Read()) { lbladsoyad.Text = dr1[0].ToString(); } bgl.baglanti().Close(); //Branşları Datagride Aktarma DataTable dt1 = new DataTable(); SqlDataAdapter da = new SqlDataAdapter("select * from TBL_Branslar order by BransAd ASC", bgl.baglanti()); da.Fill(dt1); dataGridView1.DataSource = dt1; //Doktorları listeye aktarma DataTable dt2 = new DataTable(); SqlDataAdapter da2 = new SqlDataAdapter("select (DoktorAd+' '+DoktorSoyad)as'Doktorlar',DoktorBrans from TBL_Doktorlar", bgl.baglanti()); da2.Fill(dt2); dataGridView2.DataSource = dt2; //Branşı comboboxa aktarma SqlCommand komut2 = new SqlCommand("select BransAd from TBL_Branslar order by BransAd ASC", bgl.baglanti()); SqlDataReader dr2 = komut2.ExecuteReader(); while (dr2.Read()) { cmbbrans.Items.Add(dr2[0]); } bgl.baglanti().Close(); //datagridview tasarım dataGridView1.Columns[0].HeaderText = "Branş No"; dataGridView1.Columns[1].HeaderText = "Branş Adı"; FrmDuyurular fr = new FrmDuyurular(); fr.DatagridviewSetting(dataGridView1); fr.DatagridviewSetting(dataGridView2); }
private void FrmHastaDetay_Load(object sender, EventArgs e) { lbltc.Text = tc; //Ad Soyad Çekme SqlCommand komut = new SqlCommand("select HastaAd,HastaSoyad from TBL_Hastalar where HastaTC=@p1", bgl.baglanti()); komut.Parameters.AddWithValue("@p1", lbltc.Text); SqlDataReader dr = komut.ExecuteReader(); while (dr.Read()) { lbladsoyad.Text = dr[0] + " " + dr[1]; } bgl.baglanti().Close(); //Randevu Geçmişi DataTable dt = new DataTable(); SqlDataAdapter da = new SqlDataAdapter("select * from TBL_Randevular where HastaTC=" + tc, bgl.baglanti()); da.Fill(dt); dataGridView1.DataSource = dt; //Branşları Çekme SqlCommand komut2 = new SqlCommand("select BransAd from TBL_Branslar", bgl.baglanti()); SqlDataReader dr2 = komut2.ExecuteReader(); while (dr2.Read()) { cmbbrans.Items.Add(dr2[0]); } bgl.baglanti().Close(); //datagridview tasarım dataGridView1.Columns[0].HeaderText = "Randevu No"; dataGridView1.Columns[1].HeaderText = "Randevu Tarihi"; dataGridView1.Columns[2].HeaderText = "Randevu Saat"; dataGridView1.Columns[3].HeaderText = "Randevu Branşı"; dataGridView1.Columns[4].HeaderText = "Doktor"; dataGridView1.Columns[5].HeaderText = "Randevu Durumu"; dataGridView1.Columns[6].HeaderText = "Hasta TC"; dataGridView1.Columns[7].HeaderText = "Hasta Şikayet"; FrmDuyurular fr = new FrmDuyurular(); fr.DatagridviewSetting(dataGridView1); fr.DatagridviewSetting(dataGridView2); }
private void FrmBrans_Load(object sender, EventArgs e) { //Branşları Datagride Aktarma DataTable dt1 = new DataTable(); SqlDataAdapter da = new SqlDataAdapter("select * from TBL_Branslar", bgl.baglanti()); da.Fill(dt1); dataGridView1.DataSource = dt1; //datagridview tasarım dataGridView1.Columns[0].HeaderText = "Branş No"; dataGridView1.Columns[1].HeaderText = "Branş Adı"; FrmDuyurular fr = new FrmDuyurular(); fr.DatagridviewSetting(dataGridView1); //btnekle.BackColor = Color.FromArgb(255, 174, 173); }
private void Btnolustur_Click(object sender, EventArgs e) { SqlCommand komut = new SqlCommand("insert into TBL_Duyurular (Duyuru) values (@d1)", bgl.baglanti()); komut.Parameters.AddWithValue("@d1", rchtxtduyuru.Text); if (rchtxtduyuru.Text == "") { MessageBox.Show("Lütfen boş duyuru oluşturmayınız!", "Uyarı", MessageBoxButtons.OK, MessageBoxIcon.Warning); } else { komut.ExecuteNonQuery(); MessageBox.Show("Duyuru Oluşturuldu"); FrmDuyurular fr = new FrmDuyurular(); fr.btnyenile_Click(sender, e); } bgl.baglanti().Close(); }
private void Cmbdoktor_SelectedIndexChanged(object sender, EventArgs e) { DataTable dt = new DataTable(); SqlDataAdapter da = new SqlDataAdapter("select * from TBL_Randevular where RandevuBrans='" + cmbbrans.Text + "'" + "and RandevuDoktor='" + cmbdoktor.Text + "'and RandevuDurum=0", bgl.baglanti()); da.Fill(dt); dataGridView2.DataSource = dt; dataGridView2.Columns[0].HeaderText = "Randevu No"; dataGridView2.Columns[1].HeaderText = "Randevu Tarihi"; dataGridView2.Columns[2].HeaderText = "Randevu Saat"; dataGridView2.Columns[3].HeaderText = "Randevu Branşı"; dataGridView2.Columns[4].HeaderText = "Doktor"; dataGridView2.Columns[5].HeaderText = "Randevu Durumu"; dataGridView2.Columns[6].HeaderText = "Hasta TC"; dataGridView2.Columns[7].HeaderText = "Hasta Şikayet"; FrmDuyurular fr = new FrmDuyurular(); fr.DatagridviewSetting(dataGridView2); }
private void FrmRandevuListesi_Load(object sender, EventArgs e) { DataTable dt = new DataTable(); SqlDataAdapter da = new SqlDataAdapter("select *from TBL_Randevular order by Randevuid DESC", bgl.baglanti()); da.Fill(dt); dataGridView1.DataSource = dt; dataGridView1.Columns[0].HeaderText = "Randevu No"; dataGridView1.Columns[1].HeaderText = "Randevu Tarihi"; dataGridView1.Columns[2].HeaderText = "Randevu Saat"; dataGridView1.Columns[3].HeaderText = "Randevu Branşı"; dataGridView1.Columns[4].HeaderText = "Doktor"; dataGridView1.Columns[5].HeaderText = "Randevu Durumu"; dataGridView1.Columns[6].HeaderText = "Hasta TC"; dataGridView1.Columns[7].HeaderText = "Hasta Şikayet"; FrmDuyurular fr = new FrmDuyurular(); fr.DatagridviewSetting(dataGridView1); }
private void FrmDoktorDetay_Load(object sender, EventArgs e) { lbltc.Text = TC; //Doktor Ad Soyad SqlCommand komut = new SqlCommand("select DoktorAd,DoktorSoyad from TBL_Doktorlar where DoktorTC=@p1", bgl.baglanti()); komut.Parameters.AddWithValue("@p1", lbltc.Text); SqlDataReader dr = komut.ExecuteReader(); while (dr.Read()) { lbladsoyad.Text = dr[0] + " " + dr[1]; } bgl.baglanti().Close(); //Randevular DataTable dt = new DataTable(); SqlDataAdapter da = new SqlDataAdapter("select * from TBL_Randevular where RandevuDoktor='" + lbladsoyad.Text + "'", bgl.baglanti()); da.Fill(dt); dataGridView1.DataSource = dt; dataGridView1.Columns[0].HeaderText = "Randevu No"; dataGridView1.Columns[1].HeaderText = "Randevu Tarihi"; dataGridView1.Columns[2].HeaderText = "Randevu Saat"; dataGridView1.Columns[3].HeaderText = "Randevu Branşı"; dataGridView1.Columns[4].HeaderText = "Doktor"; dataGridView1.Columns[5].HeaderText = "Randevu Durumu"; dataGridView1.Columns[6].HeaderText = "Hasta TC"; dataGridView1.Columns[7].HeaderText = "Hasta Şikayet"; dataGridView1.Columns[4].Visible = false; FrmDuyurular fr = new FrmDuyurular(); fr.DatagridviewSetting(dataGridView1); }
private void Btnduyurular_Click(object sender, EventArgs e) { FrmDuyurular fr = new FrmDuyurular(); fr.Show(); }