public ActionResult Create([Bind(Include = "Id,EczaneId,BaslamaTarihi,BitisTarihi,Aciklama")] EczaneNobetMuafiyet eczaneNobetMuafiyet)
        {
            if (ModelState.IsValid)
            {
                _eczaneNobetMuafiyetService.Insert(eczaneNobetMuafiyet);
                return(RedirectToAction("Index"));
            }
            var user = _userService.GetByUserName(User.Identity.Name);

            var eczaneler = _eczaneService.GetListByUser(user)
                            .Where(s => s.KapanisTarihi == null)
                            .OrderBy(s => s.Adi);

            ViewBag.EczaneId = new SelectList(eczaneler, "Id", "Adi", eczaneNobetMuafiyet.EczaneId);
            return(View(eczaneNobetMuafiyet));
        }
Beispiel #2
0
 public void Update(EczaneNobetMuafiyet eczaneNobetMuafiyet)
 {
     _eczaneNobetMuafiyetDal.Update(eczaneNobetMuafiyet);
 }
Beispiel #3
0
 public void Insert(EczaneNobetMuafiyet eczaneNobetMuafiyet)
 {
     _eczaneNobetMuafiyetDal.Insert(eczaneNobetMuafiyet);
 }