示例#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());
        }
        public ActionResult Indicator(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> location)
        {
            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();

            ViewData["ProgramArea"]    = ProgramArea;
            ViewData["ProposalStatus"] = ProposalStatus;
            ViewData["GrantType"]      = GrantType;
            ViewData["CompletionCode"] = CompletionCode;
            ViewData["Status"]         = Status;
            ViewData["Region"]         = Region;



            if (frepf != null)
            {
                LReportsRepository rep = new LReportsRepository();
                // IQueryable<Project> prj = rep.GetResults(frepf);
                IQueryable <Project> prj = rep.GetResults2(frepf, ID, Area, gtype, compete,
                                                           status, oblast, period, amount, location);
                List <Project> prjList = prj.ToList();

                if (prj != null)
                {
                    // List<LabelByCount> test =  rep.IndicatorByBaseline(prj, 2);
                    ViewData["report31"] = rep.IndicatorByBaseline(prj);
                    ViewData["report32"] = rep.IndicatorByBenchmark(prj);
                    ViewData["report33"] = rep.IndicatorByFinal(prj);
                    ViewData["prj"]      = prj;
                }

                return(View(frepf));
            }
            else
            {
                return(View());
            }
        }
示例#3
0
        public ActionResult Index()
        {
            AppDropDownsService              ServiceDDL     = new AppDropDownsService();
            IEnumerable <ProgramAreaList>    ProgramArea    = ServiceDDL.GetProgramAreaList();
            IEnumerable <ProposalStatusList> ProposalStatus = ServiceDDL.GetProposalStatusList();

            ViewData["ProgramArea"]    = ProgramArea;
            ViewData["ProposalStatus"] = ProposalStatus;
            return(View());
        }
        //
        // GET: /Filter2/

        public ActionResult Index()
        {
            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 <ProjLocationList>    PrLoc          = ServiceDDL.GetProjectLocationList();

            ViewData["ProgramArea"]    = ProgramArea;
            ViewData["ProposalStatus"] = ProposalStatus;
            ViewData["GrantType"]      = GrantType;
            ViewData["CompletionCode"] = CompletionCode;
            ViewData["Status"]         = Status;
            ViewData["Region"]         = Region;
            ViewData["ProjLoc"]        = PrLoc;
            return(View());
        }
        public ActionResult BudgetAnalysis()
        {
            AppDropDownsService ServiceDDL = new AppDropDownsService();

            ViewData["CompletionCode"] = ServiceDDL.GetCompetitionCodeList();
            ViewData["ProgramArea"]    = ServiceDDL.GetProgramAreaList();
            ViewData["GrantType"]      = ServiceDDL.GetGrantTypeList();
            ViewData["Status"]         = ServiceDDL.GetProposalStatusList();
            ViewData["results"]        = null;
            ViewData["Region"]         = ServiceDDL.GetRegionList();
            return(View());
        }
        public ActionResult AppDropDowns()
        {
            ViewData["EventType"]           = appddservice.GetEventTypeList();
            ViewData["OrgLegalStatus"]      = appddservice.GetLegalStatusList();
            ViewData["GrantType"]           = appddservice.GetGrantTypeList();
            ViewData["ProgramArea"]         = appddservice.GetProgramAreaList();
            ViewData["CompetitionCode"]     = appddservice.GetCompetitionCodeList();
            ViewData["ProposalStatus"]      = appddservice.GetProposalStatusList();
            ViewData["SSPRoles"]            = staffservice.GetALLSSPRoles();
            ViewData["Regions"]             = appddservice.GetRegionList();
            ViewData["GetBudgetCatList"]    = appddservice.GetCatList();
            ViewData["ProjectLocationList"] = appddservice.GetProjectLocationList();

            return(View());
        }
示例#7
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));
        }
        public ActionResult BudgetAnalysis(FinReportFilter frepf, int?ID, List <String> Area, List <String> gtype, List <String> compete,
                                           List <String> status, List <String> period, List <String> amount, List <String> oblast)
        {
            AppDropDownsService ServiceDDL = new AppDropDownsService();

            ViewData["CompletionCode"] = ServiceDDL.GetCompetitionCodeList();
            ViewData["ProgramArea"]    = ServiceDDL.GetProgramAreaList();
            ViewData["GrantType"]      = ServiceDDL.GetGrantTypeList();
            ViewData["Status"]         = ServiceDDL.GetProposalStatusList();
            ViewData["Region"]         = ServiceDDL.GetRegionList();
            //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;


            if (prjList != null)
            {
                //2. generates/calculates VS amounts.
                if (!frepf.isListOnly.Value)
                {
                    Dictionary <ContainerType, Dictionary <AmountTypes, List <VsContainer> > > results = FinReportCore(prj, frepf, Area, gtype, compete, status, period, oblast);
                    ViewData["results2"] = results;
                }
            }

            //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;
            }
            if (oblast != null)
            {
                frepf.isRegion = true;
            }


            //=====

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

            ViewData["CompletionCode"]  = ServiceDDL.GetCompetitionCodeList();
            ViewData["ProgramArea"]     = ServiceDDL.GetProgramAreaList();
            ViewData["GrantType"]       = ServiceDDL.GetGrantTypeList();
            ViewData["Status"]          = ServiceDDL.GetProposalStatusList();
            ViewData["Region"]          = ServiceDDL.GetRegionList();
            ViewData["BudgetCatList"]   = ServiceDDL.GetCatList();
            ViewData["LfIndicatorList"] = ServiceDDL.GetLfIndicatorList();

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


            List <Project> prjList = prj.ToList();

            ViewData["prj"] = prj;



            if (prjList != null)
            {
                var query = prjList
                            .GroupBy(g => new //GROUP BY GrantType, ProgramArea Field1, Field2 and SUM AmtRequested.
                {
                    g.LFIndicator.LFIndicatorID,
                })
                            .Select(group => new VsContainer() //Select all Grouped into VersusContainer.
                {
                    ProjId      = group.Select(i => i.ProjectID).ToList(),
                    Field1      = group.Key.LFIndicatorID,
                    iAmount     = prjList.Count(),
                    dAmount     = group.Select(i => i.ProjectID).Count(),
                    Field1Title = "# of grants with " + group.Select(i => i.LFIndicator.LFIndicatorList.CodeText).FirstOrDefault()
                });

                List <VsContainer> vsc = query.ToList();   //test.
                ViewData["vsc"] = vsc;
            }


            //add List Filters.  //enable Report View enabled if not null.
            if (lfIndicators != null)
            {
                frepf.isLFIndicator = true;
            }
            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;
            }
            if (oblast != null)
            {
                frepf.isRegion = true;
            }
            //=====

            return(View(frepf));
        }