Exemplo n.º 1
0
        public ActionResult Fix(FixReviewNoteViewModel form, HttpPostedFileBase file)
        {
            if (ModelState.IsValid)
            {
                var originalReviewNote = _context.Todos.Find(form.Id);
                originalReviewNote.FixNote = form.FixNote;
                originalReviewNote.AssignedToId = _currentUser.User.Id;
                originalReviewNote.FixedDate = DateTime.UtcNow;
                _context.SaveChanges();

                return RedirectToAction("Index", "Reviews", new { id = originalReviewNote.ScoId });
            }
            return View(form);
        }
Exemplo n.º 2
0
        public ActionResult Fix(int id, int scoId)
        {
            var todo = _context.Todos.Find(id);
            var courseModule = _context.CourseScos.Find(scoId);

            var vm = new FixReviewNoteViewModel
            {
                Id = todo.Id,
                ScoId = todo.ScoId ?? -1,
                Slide = todo.Slide,
                Subject = todo.Subject,
                Details = todo.Body,
                Resource = todo.Resource,
                FixNote = todo.FixNote,
                CourseScoName = courseModule.Title,
                CatalogueNumber = courseModule.CatalogueNumber


            };
            return View(vm);
        }