public ActionResult DeleteConfirmed(int id) { NobetGrupGunKuralDetay nobetGrupGunKural = _nobetGrupGunKuralService.GetDetayById(id); _nobetGrupGunKuralService.Delete(id); return(RedirectToAction("Index")); }
// GET: EczaneNobet/NobetGrupGunKural/Details/5 public ActionResult Details(int id) { if (id < 1) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } NobetGrupGunKuralDetay nobetGrupGunKural = _nobetGrupGunKuralService.GetDetayById(id); if (nobetGrupGunKural == null) { return(HttpNotFound()); } return(View(nobetGrupGunKural)); }
// GET: EczaneNobet/NobetGrupGunKural/Edit/5 public ActionResult Edit(int id) { if (id < 1) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } NobetGrupGunKuralDetay nobetGrupGunKural = _nobetGrupGunKuralService.GetDetayById(id); if (nobetGrupGunKural == null) { return(HttpNotFound()); } var user = _userService.GetByUserName(User.Identity.Name); var nobetGruplar = _nobetGrupService.GetListByUser(user); ViewBag.NobetGrupId = new SelectList(nobetGruplar.Select(s => new { s.Id, s.Adi }), "Id", "Adi", nobetGrupGunKural.NobetGrupId); ViewBag.NobetGunKuralId = new SelectList(_nobetGunKuralService.GetList().OrderBy(s => s.Adi).OrderBy(s => s.Adi), "Id", "Adi", nobetGrupGunKural.NobetGunKuralId); return(View(nobetGrupGunKural)); }