示例#1
0
        public ActionResult DeleteConfirmed(int id)
        {
            NobetAltGrup nobetAltGrup = _nobetAltGrupService.GetById(id);

            _nobetAltGrupService.Delete(id);
            return(RedirectToAction("Index"));
        }
示例#2
0
        // GET: EczaneNobet/NobetAltGrup/Details/5
        public ActionResult Details(int id)
        {
            if (id < 1)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            NobetAltGrup nobetAltGrup = _nobetAltGrupService.GetById(id);

            if (nobetAltGrup == null)
            {
                return(HttpNotFound());
            }
            return(View(nobetAltGrup));
        }
示例#3
0
        public ActionResult Edit([Bind(Include = "Id,Adi,NobetGrupGorevTipId,BaslamaTarihi,BitisTarihi")] NobetAltGrup nobetAltGrup)
        {
            if (ModelState.IsValid)
            {
                _nobetAltGrupService.Update(nobetAltGrup);
                return(RedirectToAction("Index"));
            }
            var nobetUstGrup = _nobetUstGrupSessionService.GetSession("nobetUstGrup");

            var nobetGrupGorevTipler = _nobetGrupGorevTipService.GetDetaylar(nobetUstGrup.Id).Select(s => s.Id).ToList();

            ViewBag.NobetGrupGorevTipId = new SelectList(_nobetGrupGorevTipService.GetDetaylarByIdList(nobetGrupGorevTipler).Select(s => new MyDrop {
                Id = s.Id, Value = $"{s.NobetGrupAdi}, {s.NobetGorevTipAdi}"
            }), "Id", "Value", nobetAltGrup.NobetGrupGorevTipId);

            return(View(nobetAltGrup));
        }
示例#4
0
        // GET: EczaneNobet/NobetAltGrup/Edit/5
        public ActionResult Edit(int id)
        {
            if (id < 1)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            NobetAltGrup nobetAltGrup = _nobetAltGrupService.GetById(id);

            if (nobetAltGrup == null)
            {
                return(HttpNotFound());
            }
            var nobetUstGrup = _nobetUstGrupSessionService.GetSession("nobetUstGrup");

            var nobetGrupGorevTipler = _nobetGrupGorevTipService.GetDetaylar(nobetUstGrup.Id).Select(s => s.Id).ToList();

            ViewBag.NobetGrupGorevTipId = new SelectList(_nobetGrupGorevTipService.GetDetaylarByIdList(nobetGrupGorevTipler).Select(s => new MyDrop {
                Id = s.Id, Value = $"{s.NobetGrupAdi}, {s.NobetGorevTipAdi}"
            }), "Id", "Value", nobetAltGrup.NobetGrupGorevTipId);

            return(View(nobetAltGrup));
        }
示例#5
0
 public void Update(NobetAltGrup nobetAltGrup)
 {
     _nobetAltGrupDal.Update(nobetAltGrup);
 }
示例#6
0
 public void Insert(NobetAltGrup nobetAltGrup)
 {
     _nobetAltGrupDal.Insert(nobetAltGrup);
 }