Exemple #1
0
        public virtual ActionResult Index()
        {
            FindingRecomendationsReportModel fRReportModel = new FindingRecomendationsReportModel();
            var ListPMRCycles           = ClientPMRForCycleModel.GetAllCyclesSeptemberAndMarchCycles(Lang).OrderByDescending(x => x.PmrCycleId).ToList();
            var ListContry              = ClientGenericRepository.GetCountries(Lang).OrderBy(x => x.Name).ToList();
            var ListContryDepartment    = ClientGenericRepository.GetCountryDepartments(Lang).OrderBy(x => x.Name).ToList();
            var ListSectorDepartment    = ClientGenericRepository.GetSectorDepartment(Lang).OrderBy(x => x.Name).ToList();
            var ListDivision            = ClientGenericRepository.GetDivisions(Lang).OrderBy(x => x.Name).ToList();
            var ListDelayTypes          = _ClientDelayAchievementModelRepository.GetTypesDelay(Lang).OrderBy(x => x.Name).ToList();
            var ListClassification      = ClientMasterDataModelRepository.GetMasterDataModels("PMI_CLASSIFICATION").OrderBy(x => x.Name).ToList();
            var ListDraftClassification = ClientMasterDataModelRepository.GetMasterDataModels("PMI_CLASSIFICATION").OrderBy(x => x.Name).ToList();

            ListDraftClassification[0].ConvergenceMasterDataId = 1;
            ListDraftClassification[1].ConvergenceMasterDataId = 2;
            ListDraftClassification[2].ConvergenceMasterDataId = 3;
            ListDraftClassification[3].ConvergenceMasterDataId = 4;

            ViewBag.ListPMRCycle            = new SelectList(ListPMRCycles, "PMRCycleId", "PmrCycleName");
            ViewBag.ListContry              = new MultiSelectList(ListContry, "ConvergenceMasterDataId", "Name");
            ViewBag.ListContryDepartment    = new MultiSelectList(ListContryDepartment, "ConvergenceMasterDataId", "Name");
            ViewBag.ListSectorDepartment    = new MultiSelectList(ListSectorDepartment, "ConvergenceMasterDataId", "Name");
            ViewBag.ListDivision            = new MultiSelectList(ListDivision, "ConvergenceMasterDataId", "Name");
            ViewBag.ListDelayTyeps          = new MultiSelectList(ListDelayTypes, "ConvergenceMasterDataId", "Name");
            ViewBag.ListClassification      = new MultiSelectList(ListClassification, "ConvergenceMasterDataId", "NameEn");
            ViewBag.ListDraftClassification = new MultiSelectList(ListDraftClassification, "ConvergenceMasterDataId", "NameEn");

            return(View());
        }
        private List <PmrCycleModel> GetListCycles()
        {
            idOperation = ClientForForGenericReports
                          .GetOperationIDForOperationNumber(IDBContext.Current.Operation);

            return(ClientPMRForCycleModel.GetCyclesForPMR(
                       IDBContext.Current.CurrentLanguage, idOperation ?? 0)
                   .OrderByDescending(x => x.PmrCycleId).ToList());
        }
        private string GetPmrCycleName(int pmrCycleId)
        {
            var pmrCycles = ClientPMRForCycleModel
                            .GetPMRCycles(IDBContext.Current.CurrentLanguage)
                            .OrderByDescending(x => x.StartDate)
                            .ToList();

            return(pmrCycles
                   .Where(pc => pc.PmrCycleId == pmrCycleId)
                   .Select(p => p.PmrCycleName)
                   .FirstOrDefault());
        }
        private PMRPublicReportModel CreateModel(PMRPublicFilterModel filterModel)
        {
            PMRPublicReportModel result = new PMRPublicReportModel();
            string language             = IDBContext.Current.CurrentLanguage;

            _filterBusinesslogic = new PMRPublicBusinessLogic();

            result.CountryDepartments =
                _filterBusinesslogic.FilterCountryDepartments(
                    ClientForGenericReports.GetCountryDepartments(language));

            result.PMRCycles = ClientPMRForCycleModel
                               .GetPMRCycles(language).OrderByDescending(x => x.StartDate).ToList();

            // don't include DRAFT validation stages, no necessary to list them
            result.PMRValidationStages =
                _filterBusinesslogic.FilterPMRValidationStages(
                    ClientForGenericReports.GetPMRValidationStages(language));

            result.OperationOverallStages =
                ClientForGenericReports.GetOperationOverallStages(language)
                .OrderBy(x => x.Name).ToList();

            result.Countries = _filterBusinesslogic.FilterCountries(
                ClientForGenericReports.GetCountries(language));

            LoadSectorsAndDivisions(result);

            List <TriStateFilter> triState = new List <TriStateFilter>();

            triState.Add(new TriStateFilter {
                Name = Localization.GetText("All"), Value = -1
            });
            triState.Add(new TriStateFilter {
                Name = Localization.GetText("Yes"), Value = 1
            });
            triState.Add(new TriStateFilter {
                Name = Localization.GetText("No"), Value = 0
            });

            result.IsActive    = triState;
            result.IsAuthorize = triState;

            result.Table = ClientForPMRPublic.GetPMRPublicTableData(filterModel);

            return(result);
        }
Exemple #5
0
        public virtual ActionResult IndexReport()
        {
            FindingRecomendationsReportModel fRReportModel = new FindingRecomendationsReportModel();
            var ListPMRCycles        = ClientPMRForCycleModel.GetAllCyclesSeptemberAndMarchCycles(Lang).OrderByDescending(x => x.PmrCycleId).ToList();
            var ListContry           = ClientGenericRepository.GetCountries(Lang).OrderBy(x => x.Name).ToList();
            var ListContryDepartment = ClientGenericRepository.GetCountryDepartments(Lang).OrderBy(x => x.Name).ToList();
            var ListSectorDepartment = ClientGenericRepository.GetSectorDepartment(Lang).OrderBy(x => x.Name).ToList();
            var ListDivision         = ClientGenericRepository.GetDivisions(Lang).OrderBy(x => x.Name).ToList();
            var ListStage            = _ClientFindingRecommendationModelRepository.GetStages(Lang).OrderBy(x => x.Name).ToList();
            var ListClassification   = ClientMasterDataModelRepository.GetMasterDataModels("PMI_CLASSIFICATION").OrderBy(x => x.Name).ToList();
            var ListDimesion         = _ClientFindingRecommendationModelRepository.GetDimensions(Lang).OrderBy(x => x.Name).ToList();
            var contIndices          = 1;

            foreach (var itemDimension in ListDimesion)
            {
                itemDimension.Name = contIndices.ToString() + ". " + itemDimension.Name;
                itemDimension.ConvergenceMasterDataId = Convert.ToInt32(itemDimension.ConvergenceMasterDataId.ToString() + contIndices.ToString());
                contIndices++;
            }

            var ListCategories          = _ClientFindingRecommendationModelRepository.GetCategories(Lang).OrderBy(x => x.Name).ToList();
            var ListDraftClassification = ClientMasterDataModelRepository.GetMasterDataModels("PMI_CLASSIFICATION").OrderBy(x => x.Name).ToList();

            ListDraftClassification[0].ConvergenceMasterDataId = 1;
            ListDraftClassification[1].ConvergenceMasterDataId = 2;
            ListDraftClassification[2].ConvergenceMasterDataId = 3;
            ListDraftClassification[3].ConvergenceMasterDataId = 4;

            ViewBag.ListPMRCycle            = new SelectList(ListPMRCycles, "PMRCycleId", "PmrCycleName");
            ViewBag.ListContry              = new MultiSelectList(ListContry, "ConvergenceMasterDataId", "Name");
            ViewBag.ListContryDepartment    = new MultiSelectList(ListContryDepartment, "ConvergenceMasterDataId", "Name");
            ViewBag.ListSectorDepartment    = new MultiSelectList(ListSectorDepartment, "ConvergenceMasterDataId", "Name");
            ViewBag.ListDivision            = new MultiSelectList(ListDivision, "ConvergenceMasterDataId", "Name");
            ViewBag.ListStage               = new MultiSelectList(ListStage, "ConvergenceMasterDataId", "Name");
            ViewBag.ListClassification      = new MultiSelectList(ListClassification, "ConvergenceMasterDataId", "NameEn");
            ViewBag.ListDimesion            = new MultiSelectList(ListDimesion, "ConvergenceMasterDataId", "Name");
            ViewBag.ListCategories          = new MultiSelectList(ListCategories, "ConvergenceMasterDataId", "Name");
            ViewBag.ListDraftClassification = new MultiSelectList(ListDraftClassification, "ConvergenceMasterDataId", "NameEn");

            return(View());
        }
        public virtual ActionResult PMROperationReportCreate(string OperationNumber)
        {
            ViewBag.OperationNumber = OperationNumber;
            this.idOperation        = ClientForForGenericReports.GetOperationIDParentForOperationNumber(OperationNumber);

            if (idOperation != null && idOperation != 0)
            {
                int OperationID;
                OperationID = Convert.ToInt32(this.idOperation);
                PMROperationReportModel ModelOperationReport = new PMROperationReportModel()
                {
                    OperationId = OperationID
                };

                try
                {
                    ModelOperationReport.PMRCycles = ClientPMRForCycleModel.GetCyclesForPMR(Lang, OperationID).OrderByDescending(x => x.PmrCycleId).ToList();

                    ViewBag.ListPMRCycle = new MultiSelectList(ModelOperationReport.PMRCycles, "PmrCycleId", "PmrCycleName");
                    bool ParentOperation = ClientPMRForCycleModel.ValidateOperationParent(OperationID);
                    ModelOperationReport.FinancialDataAggregation = ParentOperation;

                    ModelOperationReport.ReportTypes.Add("Complete", Localization.GetText("Complete"));
                    ModelOperationReport.ReportTypes.Add("Custom", Localization.GetText("Custom"));
                    ModelOperationReport.ReportTypes.Add("Results Matrix", Localization.GetText("Results Matrix"));

                    ViewBag.ListReportsType = new SelectList(ModelOperationReport.ReportTypes, "Key", "Value");

                    return(View(ModelOperationReport));
                }
                catch (Exception e)
                {
                    return(HttpNotFound(e.Message));
                }
            }

            return(HttpNotFound());
        }
Exemple #7
0
        public virtual ActionResult PMRAggregateReportCreate()
        {
            PMRAggregateReportModel ModelOperationReport = new PMRAggregateReportModel();

            var ListPMRCycles         = ClientPMRForCycleModel.GetAllCyclesSeptemberAndMarchCycles(Lang).OrderByDescending(x => x.PmrCycleId).ToList();
            var ListContry            = ClientForGenericReports.GetCountries(Lang).OrderBy(x => x.Name).ToList();
            var ListContryDepartment  = ClientForGenericReports.GetCountryDepartments(Lang).OrderBy(x => x.Name).ToList();
            var ListSectorDepartment  = ClientForGenericReports.GetSectorDepartment(Lang).OrderBy(x => x.Name).ToList();
            var ListDivision          = ClientForGenericReports.GetDivisions(Lang).OrderBy(x => x.Name).ToList();
            var ListEsgTrakingOptions = new Dictionary <bool, string>();

            ListEsgTrakingOptions.Add(true, Localization.GetText("Yes"));
            ListEsgTrakingOptions.Add(false, Localization.GetText("No"));

            ViewBag.ListPMRCycle          = new SelectList(ListPMRCycles, "PMRCycleId", "PmrCycleName");
            ViewBag.ListContry            = new MultiSelectList(ListContry, "ConvergenceMasterDataId", "Name");
            ViewBag.ListContryDepartment  = new MultiSelectList(ListContryDepartment, "ConvergenceMasterDataId", "Name");
            ViewBag.ListSectorDepartment  = new MultiSelectList(ListSectorDepartment, "ConvergenceMasterDataId", "Name");
            ViewBag.ListDivision          = new MultiSelectList(ListDivision, "ConvergenceMasterDataId", "Name");
            ViewBag.ListESGTrakingOptions = new SelectList(ListEsgTrakingOptions, "key", "value");

            return(View());
        }