Пример #1
0
        public virtual ActionResult EditPlanVersionApprovalRequest(int planVersionId, string operationNumber, int year)
        {
            var model = SupervisionPlanRepository.GetPlanVersionModel(planVersionId);

            var stages = new List <string> {
                "SP_DRAFT", "SP_MOD"
            };

            ViewBag.IsInDraftOrModified = stages.Any(s => s.Equals(model.ValidationStage.Code, StringComparison.InvariantCultureIgnoreCase));
            ViewBag.OperationNumber     = operationNumber;
            ViewBag.Year = year;
            return(View(model));
        }
Пример #2
0
        public virtual ActionResult DetailsPlanVersionApprovalRequest(int planVersionId, string operationNumber, int year, MessageSendRequestCode state = 0, string messageK2 = null)
        {
            var model  = SupervisionPlanRepository.GetPlanVersionModel(planVersionId);
            var stages = new List <string> {
                "SP_DRAFT", "SP_MOD"
            };

            ViewBag.IsInDraftOrModified = stages.Any(s => s.Equals(model.ValidationStage.Code, StringComparison.InvariantCultureIgnoreCase));
            ViewBag.OperationNumber     = operationNumber;
            ViewBag.Year = year;

            if (state != 0)
            {
                MessageConfiguration message = MessageHandler.SetMessageSendRequest(state, false, 2, messageK2);
                ViewData["message"] = message;
            }

            return(View(model));
        }