Example #1
0
        public ActionResult DeleteConfirmed(int id)
        {
            CtrlActStat course = unitOfWork.CtrlActStatRepository.GetByID(id);

            unitOfWork.CtrlActStatRepository.Delete(id);
            unitOfWork.Save();
            return(RedirectToAction("Index"));
        }
Example #2
0
        public ActionResult Edit(
            //[Bind(Include = "Id,UserName,LastLogin,LastAction")]
            CtrlActStat statistica)
        {
            try
            {
                if (ModelState.IsValid)
                {
                    unitOfWork.CtrlActStatRepository.Update(statistica);
                    unitOfWork.Save();
                    return(RedirectToAction("Index"));
                }
            }
            catch (DataException /* dex */)
            {
                //Log the error (uncomment dex variable name after DataException and add a line here to write a log.)
                ModelState.AddModelError("", "Unable to save changes. Try again, and if the problem persists, see your system administrator.");
            }

            return(View(statistica));
        }
Example #3
0
        // GET: /Statistica/Edit/5

        public ActionResult Edit(int id)
        {
            CtrlActStat statistica = unitOfWork.CtrlActStatRepository.GetByID(id);

            return(View(statistica));
        }
Example #4
0
        // GET: /Statistica/Details/5

        public ViewResult Details(int id)
        {
            CtrlActStat statistica = unitOfWork.CtrlActStatRepository.GetByID(id);

            return(View(statistica));
        }