public IsBirimi(UygulamaDbContext context) { _context = context; Hastalar = new HastaRepo(context); Randevular = new RandevuRepo(context); Bakimlar = new BakimRepo(context); Sehirler = new SehirRepo(context); Doktorlar = new DoktorRepos(context); Uzmanliklar = new UzmanlikRepo(context); Kullanicilar = new UygulamaKullaniciRepo(context); }
private void btnSil_Click(object sender, EventArgs e) { var silinecekHasta = new HastaRepo().GetByID(SeciliHasta.ID); if (silinecekHasta == null) { MessageBox.Show("Neyi sileyim?"); return; } new HastaRepo().Delete(silinecekHasta); lstListe.DataSource = new HastaRepo().GetALL(); }
private void btnKaydet_Click(object sender, EventArgs e) { var guncellenecekHasta = new HastaRepo().GetByID(SeciliHasta.ID); if (guncellenecekHasta == null) { MessageBox.Show("Neyi güncelleyeyim?"); return; } guncellenecekHasta.Ad = txtAd.Text; guncellenecekHasta.Soyad = txtSoyad.Text; guncellenecekHasta.DogumTarihi = dtpDogumTarihi.Value; guncellenecekHasta.Cinsiyet = (Cinsiyetler)Enum.Parse(typeof(Cinsiyetler), cmbCinsiyet.SelectedItem.ToString()); guncellenecekHasta.KanGrubu = (KanGruplari)Enum.Parse(typeof(KanGruplari), cmbKanGrubu.SelectedItem.ToString()); new HastaRepo().Update(); lstListe.DataSource = new HastaRepo().GetALL(); }