Exemple #1
0
        public async Task <IActionResult> ApproveDocuments([FromBody] List <string> documents)
        {
            Result result = new Result();

            if (documents != null)
            {
                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.ApproveDocuments(documents, userRole, userId);

                TempData["resultMsg"] = result.Message;
                TempData["isSuccess"] = result.Success ? "1" : "0";
            }
            return(Json(result));
        }