Esempio n. 1
0
        public async Task <IActionResult> ReworkDocument(LogsViewModel model)
        {
            Result result = new Result();

            try
            {
                string userDept = HttpContext.Session.GetString(SessionHelper.USER_DEPT);
                var    userRole = HttpContext.Session.GetString(SessionHelper.ROLES);
                var    userId   = HttpContext.Session.GetString(SessionHelper.USER_ID);
                result = await _approvalService.ReworkDocument(model.DocId, userRole, userId, model.Comment);

                TempData["resultMsg"] = result.Message;
                TempData["isSuccess"] = result.Success ? "1" : "0";
            }
            catch (Exception e)
            {
                _logger.LogError("Error Exception on AddFieldModal: " + e.Message.ToString());
            }
            result.IsRedirect  = true;
            result.RedirectUrl = "Approval/MyApproval";
            return(Json(result));
        }