Ejemplo n.º 1
0
 public void Update(Doktor model)
 {
     using (DoktorRepository doktorRepo = new DoktorRepository())
     {
         try
         {
             doktorRepo.Update(model);
         }
         catch
         {
             throw;
         }
     }
 }
Ejemplo n.º 2
0
 public void Add(Doktor model)
 {
     using (DoktorRepository doktorRepo = new DoktorRepository())
     {
         try
         {
             doktorRepo.Add(model);
         }
         catch
         {
             throw;
         }
     }
 }
Ejemplo n.º 3
0
        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;
                }
            }
        }
Ejemplo n.º 4
0
        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;
                }
            }
        }
Ejemplo n.º 5
0
        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;
                }
            }
        }
Ejemplo n.º 6
0
        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;
                }
            }
        }
Ejemplo n.º 7
0
 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));
        }
Ejemplo n.º 9
0
        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;
                }
            }
        }
Ejemplo n.º 10
0
        public List <Doktor> DoktorGetir(int ID)
        {
            DoktorRepository temp = new DoktorRepository();

            return(temp.DoktorGetir(ID));
        }