Exemplo n.º 1
0
 public ActionResult Create(HighlightViewModel viewModel)
 {
     var req = viewModel.MapTo<SaveHighlightRequest>();
     var resp = _highlightService.SaveHighlight(req);
     TempData["IsSuccess"] = resp.IsSuccess;
     TempData["Message"] = resp.Message;
     if (resp.IsSuccess)
     {
         return RedirectToAction("Display");
     }
     return RedirectToAction("Create");
 }
        public ActionResult UpdateHighlight(HighlightViewModel viewModel)
        {
            var req = viewModel.MapTo <SaveHighlightRequest>();

            req.UserId         = UserProfile().UserId;
            req.ControllerName = "Der Input Form";
            req.ActionName     = string.Format("Update Highlight HighlightType:{0}", viewModel.TypeId);

            var resp = _highlightService.SaveHighlight(req);

            return(Json(resp));
        }