Beispiel #1
0
        public ActionResult Indicator2()
        {
            AppDropDownsService              ServiceDDL     = new AppDropDownsService();
            IEnumerable <ProgramAreaList>    ProgramArea    = ServiceDDL.GetProgramAreaList();
            IEnumerable <ProposalStatusList> ProposalStatus = ServiceDDL.GetProposalStatusList();
            IEnumerable <GrantTypeList>      GrantType      = ServiceDDL.GetGrantTypeList();

            IEnumerable <CompetitionCodeList> CompletionCode = ServiceDDL.GetCompetitionCodeList();

            IEnumerable <ProposalStatusList>            Status = ServiceDDL.GetProposalStatusList();
            IEnumerable <RegionList>                    Region = ServiceDDL.GetRegionList();
            IEnumerable <IndicatorLabelContentCategory> IndicatorCategoryList =
                ServiceDDL.IndicatorLabelContentCategoryList();

            ViewData["ProgramArea"]    = ProgramArea;
            ViewData["ProposalStatus"] = ProposalStatus;
            ViewData["GrantType"]      = GrantType;

            ViewData["CompletionCode"] = CompletionCode;

            ViewData["Status"] = Status;
            ViewData["Region"] = Region;

            ViewData["IndicatorCategoryList"] = IndicatorCategoryList;

            ViewData["results"] = null;
            return(View());
        }
Beispiel #2
0
        public ActionResult Indicator2(FinReportFilter frepf, int?ID, List <String> Area, List <String> gtype,
                                       List <String> compete,
                                       List <String> status, List <String> oblast, List <String> period,
                                       List <String> amount, List <String> indicatorcategory)
        {
            LReportsRepository rep = new LReportsRepository();


            //IndRepHolder inp = new IndRepHolder();
            // inp.Column = "Akmola obl";
            // inp.Row ="ECD";
            // inp.Val = 1;



            AppDropDownsService ServiceDDL = new AppDropDownsService();

            #region drops
            IEnumerable <ProgramAreaList>               ProgramArea           = ServiceDDL.GetProgramAreaList();
            IEnumerable <ProposalStatusList>            ProposalStatus        = ServiceDDL.GetProposalStatusList();
            IEnumerable <GrantTypeList>                 GrantType             = ServiceDDL.GetGrantTypeList();
            IEnumerable <CompetitionCodeList>           CompletionCode        = ServiceDDL.GetCompetitionCodeList();
            IEnumerable <ProposalStatusList>            Status                = ServiceDDL.GetProposalStatusList();
            IEnumerable <RegionList>                    Region                = ServiceDDL.GetRegionList();
            IEnumerable <IndicatorLabelContentCategory> IndicatorCategoryList =
                ServiceDDL.IndicatorLabelContentCategoryList();


            ViewData["ProgramArea"] = ProgramArea;
            //take only ECD and Youth.
            IEnumerable <ProgramAreaList> ProgramArea2 = ProgramArea.Where(s => s.ProgramAreaText == "ECD" || s.ProgramAreaText == "Youth");
            ViewData["ProgramArea2"]          = ProgramArea2;
            ViewData["ProposalStatus"]        = ProposalStatus;
            ViewData["GrantType"]             = GrantType;
            ViewData["CompletionCode"]        = CompletionCode;
            ViewData["Status"]                = Status;
            ViewData["Region"]                = Region;
            ViewData["IndicatorCategoryList"] = IndicatorCategoryList;
            #endregion
            //if (frepf != null)
            //{


            IQueryable <Project> prj = rep.GetResults3(frepf, ID, Area, gtype, compete, status, period, oblast, amount);
            //1. gets resulting project list after filtering.


            List <Project> prjList = prj.ToList();
            ViewData["prj"] = prj;


            //  List<IndRepHolder> zz = rep.IndicatorsByRoundArea(prj);
            List <IndRepHolder> zz  = rep.IndicatorsByCompetitionContentCategory(prj);
            List <IndRepHolder> zz2 = rep.IndicatorsByRegionContentCategory(prj);


            ViewData["LIndRep"]  = zz;
            ViewData["LIndRep2"] = zz2;

            if (prjList != null)
            {
                //2. generates/calculates VS amounts.
                Dictionary <IndicatorContainerType, Dictionary <IndicatorLabelContentCategory, List <IndicatorRepContainer> > > results = IndicatorReportCore(
                    prj, frepf, Area, gtype, compete, status, oblast, period, amount, indicatorcategory);

                ViewData["results2"] = results;
            }



            //add List Filters.  //enable Report View enabled if not null.

            if (frepf.isIndicator != null && frepf.isIndicator.Value == true)
            {
                frepf.isIndicator = true;
            }
            else
            {
                frepf.isIndicator = false;
            }

            if (Area != null)
            {
                frepf.IsArea = true;
            }
            if (gtype != null)
            {
                frepf.IsGrantType = true;
            }
            if (compete != null)
            {
                frepf.IsCompetitionCode = true;
            }
            if (status != null)
            {
                frepf.IsStatus = true;
            }
            if (period != null)
            {
                frepf.IsPeriod = true;
            }
            //=====

            return(View(frepf));
        }
        public ActionResult outcome(FinReportFilter frepf, int?ID, List <String> Area, List <String> gtype,
                                    List <String> compete,
                                    List <String> status, List <String> oblast, List <String> period,
                                    List <String> amount, List <String> indicatorcategory)
        {
            AppDropDownsService ServiceDDL = new AppDropDownsService();

            #region drops
            IEnumerable <ProgramAreaList>               ProgramArea           = ServiceDDL.GetProgramAreaList();
            IEnumerable <ProposalStatusList>            ProposalStatus        = ServiceDDL.GetProposalStatusList();
            IEnumerable <GrantTypeList>                 GrantType             = ServiceDDL.GetGrantTypeList();
            IEnumerable <CompetitionCodeList>           CompletionCode        = ServiceDDL.GetCompetitionCodeList();
            IEnumerable <ProposalStatusList>            Status                = ServiceDDL.GetProposalStatusList();
            IEnumerable <RegionList>                    Region                = ServiceDDL.GetRegionList();
            IEnumerable <IndicatorLabelContentCategory> IndicatorCategoryList =
                ServiceDDL.IndicatorLabelContentCategoryList();
            ViewData["ProgramArea"]           = ProgramArea;
            ViewData["ProposalStatus"]        = ProposalStatus;
            ViewData["GrantType"]             = GrantType;
            ViewData["CompletionCode"]        = CompletionCode;
            ViewData["Status"]                = Status;
            ViewData["Region"]                = Region;
            ViewData["IndicatorCategoryList"] = IndicatorCategoryList;
            #endregion
            //if (frepf != null)
            //{
            LReportsRepository rep = new LReportsRepository();


            IQueryable <Project> prj = rep.GetResults3(frepf, ID, Area, gtype, compete, status, period, oblast, amount);
            //1. gets resulting project list after filtering.


            List <Project> prjList = prj.ToList();
            ViewData["prj"] = prj;



            //add List Filters.  //enable Report View enabled if not null.
            if (Area != null)
            {
                frepf.IsArea = true;
            }
            if (gtype != null)
            {
                frepf.IsGrantType = true;
            }
            if (compete != null)
            {
                frepf.IsCompetitionCode = true;
            }
            if (status != null)
            {
                frepf.IsStatus = true;
            }
            if (period != null)
            {
                frepf.IsPeriod = true;
            }
            //=====

            return(View(frepf));
        }