public void Update(Doktor model) { using (DoktorRepository doktorRepo = new DoktorRepository()) { try { doktorRepo.Update(model); } catch { throw; } } }
public void Add(Doktor model) { using (DoktorRepository doktorRepo = new DoktorRepository()) { try { doktorRepo.Add(model); } catch { throw; } } }
public List <DoktorDTO> GetByBolumIdHastaneId(int hastaneId, int bolumId) { using (DoktorRepository doktorRepo = new DoktorRepository()) { try { var model = doktorRepo.GetByFilter(x => x.bolumID == bolumId && x.hastaneID == hastaneId, x => x.Bolum, x => x.Favori, x => x.Hastane, x => x.Randevu).ToList(); return(doktorMapper.MapAll(model)); } catch { throw; } } }
public List <DoktorDTO> GetByBolumId(int id) { using (DoktorRepository doktorRepo = new DoktorRepository()) { try { var model = doktorRepo.GetByFilter(x => x.bolumID == id).ToList(); return(doktorMapper.MapAll(model)); } catch { throw; } } }
public DoktorDTO GetById(int id) { using (DoktorRepository doktorRepo = new DoktorRepository()) { try { var model = doktorRepo.GetById(x => x.doktorID == id, x => x.Bolum, x => x.Favori, x => x.Hastane, x => x.Randevu); return(doktorMapper.Map(model)); } catch { throw; } } }
public List <DoktorDTO> Get() { using (DoktorRepository doktorRepo = new DoktorRepository()) { try { var model = doktorRepo.Get(x => x.Bolum, x => x.Favori, x => x.Hastane, x => x.Randevu).ToList(); return(doktorMapper.MapAll(model)); } catch { throw; } } }
public DoktorDTO GetByTcknPassword(string tckn, string password) { using (DoktorRepository doktorRepo = new DoktorRepository()) { try { // girilen tckn ve şifreyi kontrol ederek geri döndürür var model = doktorRepo.GetByFilter(x => x.TCKN == tckn && x.sifre == password, x => x.Bolum, x => x.Favori, x => x.Hastane, x => x.Randevu).ToList(); if (model.Count > 0) { return(doktorMapper.Map(model[0])); } else { return(null); } } catch { throw; } } }
protected override void OnCreate(Bundle savedInstanceState) { TabLayoutResource = Resource.Layout.Tabbar; ToolbarResource = Resource.Layout.Toolbar; // var dbPath = Path.Combine(System.Environment.GetFolderPath(System.Environment.SpecialFolder.Personal), "proje.db"); var dbPath = Path.Combine(System.Environment.GetFolderPath (System.Environment.SpecialFolder.Personal), "proje.db"); ISorularRepository sorularRepository = new SorularRepository(dbPath); IKullaniciRepository kullaniciRepository = new KullaniciRepository(dbPath); IHastaneRepository hastaneRepository = new HastaneRepository(dbPath); IDoktorRepository doktorRepository = new DoktorRepository(dbPath); IHemsireRepository hemsireRepository = new HemsireRepository(dbPath); IOdaRepository odaRepository = new OdalarRepository(dbPath); IKoridorRepository koridorRepository = new KoridorRepository(dbPath); INesneRepository nesneRepository = new NesneRepository(dbPath); base.OnCreate(savedInstanceState); global::Xamarin.Forms.Forms.Init(this, savedInstanceState); LoadApplication(new App(sorularRepository, kullaniciRepository, hastaneRepository, doktorRepository, hemsireRepository, odaRepository, koridorRepository, nesneRepository)); }
public void Delete(int id) { using (DoktorRepository doktorRepo = new DoktorRepository()) { try { var model = doktorRepo.GetById(x => x.doktorID == id, x => x.Bolum, x => x.Hastane, x => x.Randevu, x => x.Favori); RandevuBLL randevuBusiness = new RandevuBLL(); foreach (var rand in model.Randevu.ToList()) { randevuBusiness.Delete(rand.randevuID); // doktorun tüm randevularını ilgili business'daki ilgili metota yönlendirdik. } doktorRepo.Delete(id); } catch { throw; } } }
public List <Doktor> DoktorGetir(int ID) { DoktorRepository temp = new DoktorRepository(); return(temp.DoktorGetir(ID)); }