Exemplo n.º 1
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="status"></param>
        /// <param name="stage"></param>
        /// <param name="userId"></param>
        /// <param name="customFilter"></param>
        /// <returns></returns>
        public IQueryable <OBK_AssessmentDeclarationRegisterView> SafetyAssessmentRegisterList(string status, int stage, Guid userId, DeclarationRegistryFilter customFilter)
        {
            // добавить этап обк (stage)
            var query =
                AppContext.OBK_AssessmentDeclarationRegisterView.Where(e => e.ExecutorId == userId && e.StageCode == stage.ToString());

            return(query);
        }
Exemplo n.º 2
0
        public ActionResult ListRegister([DataSourceRequest] DataSourceRequest request, string type, int stage, DeclarationRegistryFilter customFilter = null)
        {
            var stageName = GetName(stage);

            ActionLogger.WriteInt(stageName + ": Получение списка заявлений");
            var list =
                new SafetyAssessmentRepository().SafetyAssessmentRegisterList(type, stage,
                                                                              UserHelper.GetCurrentEmployee().Id, customFilter);
            var result = list.ToDataSourceResult(request);

            return(Json(result));
        }
        public ActionResult ListRegister([DataSourceRequest] DataSourceRequest request, DeclarationRegistryFilter customFilter = null)
        {
            var list = repo.OBK_AssessmentDeclaration__OBK_ExpertCouncil
                       //.Where(x => x.OBK_AssessmentDeclaration.OBK_AssessmentStage.FirstOrDefault(s => s.OBK_Ref_Stage.Code == "15").OBK_Ref_StageStatus.Code == "OPReportOnEC")
                       .Select(x => new ECDeclarationListMV
            {
                Id              = x.DeclarationId,
                StageId         = x.OBK_AssessmentDeclaration.OBK_AssessmentStage.FirstOrDefault(s => s.OBK_Ref_Stage.Code == "15").Id,
                ExpertCouncilId = x.ExpertCouncilId,
                Number          = x.OBK_AssessmentDeclaration.Number,
                FirstSendDate   = x.OBK_AssessmentDeclaration.FirstSendDate,
                DeclarantName   = x.OBK_AssessmentDeclaration.OBK_Contract.OBK_Declarant.NameRu,
                //CountryName = repo.OBK_Dictionaries.FirstOrDefault(d => d.Id == x.OBK_AssessmentDeclaration).Name,
                ContractNumber = x.OBK_AssessmentDeclaration.OBK_Contract.Number,
                ContractDate   = x.OBK_AssessmentDeclaration.OBK_Contract.StartDate,
                Result         = x.Result,
                ResultName     = x.Result == 1
                            ? "Продолжить проведение ОБиК"
                            : x.Result == 2 ? "Отказать в дальнейшем проведении ОБиК" : "",
                Comment = x.Comment
            });

            return(Json(list.ToDataSourceResult(request)));
        }