예제 #1
0
        public ActionResult Edit(T model)
        {
            _items.Update(model);
            _context.SaveChanges();
            _context.Dispose();

            return(RedirectToAction("../TimeOffs/Index"));
        }
예제 #2
0
        public ActionResult Approve(int id)
        {
            VacationDbContext context = new VacationDbContext();
            BaseTimeOff       timeOff = context.PaidTimeOffs.Find(id);

            timeOff.IsApproved = true;
            context.SaveChanges();
            context.Dispose();

            return(RedirectToAction("../TimeOffs/Index"));
        }