示例#1
0
        public IActionResult Index()
        {
            _ = new List <CtVet1b>();
            int reportDtYear  = Convert.ToInt32(User.Claims.ToList().FirstOrDefault(x => x.Type == "reportDtYear").Value);
            int reportDtMonth = Convert.ToInt32(User.Claims.ToList().FirstOrDefault(x => x.Type == "reportDtMonth").Value);

            string idRo = User.Claims.ToList().FirstOrDefault(x => x.Type == "KIDro").Value;

            string repMoFilter = Request.Query.FirstOrDefault(p => p.Key == "repMO").Value.ToString();
            string divFilter   = Request.Query.FirstOrDefault(p => p.Key == "KIDdiv").Value.ToString();
            string spcFilter   = Request.Query.FirstOrDefault(p => p.Key == "KIDspc").Value.ToString();
            string disFilter   = Request.Query.FirstOrDefault(p => p.Key == "KIDdis").Value.ToString();

            List <CtVet1b> vet1aList = CtVet1bDAL.GetAll_CtVet1bF(
                User.Claims.ToList().FirstOrDefault(x => x.Type == "KIDro").Value,
                reportDtYear,
                reportDtMonth,
                repMoFilter,
                divFilter,
                spcFilter,
                disFilter
                ).ToList();

            ViewBag.Page    = "CtVet1b";
            ViewBag.RepList = spDAL.ReportToToday();

            ViewBag.repMOList = FilterTools.repMOList(reportDtYear,
                                                      reportDtMonth,
                                                      repMoFilter);
            ViewBag.KIDdivList = FilterTools.KIDdivList(idRo, divFilter);
            ViewBag.KIDspcList = FilterTools.KIDspcList(spcFilter);
            ViewBag.KIDdisList = FilterTools.KIDdisList(disFilter);

            return(View(vet1aList));
        }
示例#2
0
        public IActionResult Index()
        {
            int    reportDtYear  = Convert.ToInt32(User.Claims.ToList().FirstOrDefault(x => x.Type == "reportDtYear").Value);
            int    reportDtMonth = Convert.ToInt32(User.Claims.ToList().FirstOrDefault(x => x.Type == "reportDtMonth").Value);
            string KIDro         = User.Claims.ToList().FirstOrDefault(x => x.Type == "KIDro").Value;

            //string PlanYFilter = Request.Query.FirstOrDefault(p => p.Key == "PlanY").Value.ToString();
            string divFilter = Request.Query.FirstOrDefault(p => p.Key == "KIDdiv").Value.ToString();
            string trtFilter = Request.Query.FirstOrDefault(p => p.Key == "KIDtrt").Value.ToString();
            string spcFilter = Request.Query.FirstOrDefault(p => p.Key == "KIDspc").Value.ToString();
            string disFilter = Request.Query.FirstOrDefault(p => p.Key == "KIDdis").Value.ToString();

            List <CtVetPlan> l = ctVetPlanDAL.GetAll_CtVetPlan(KIDro, DateTime.Today.Year.ToString(),
                                                               divFilter, trtFilter, spcFilter, disFilter).ToList();

            ViewBag.KIDdivList = FilterTools.KIDdivList(User.Claims.ToList().FirstOrDefault(x => x.Type == "KIDro").Value, divFilter);
            //ViewBag.PlanYearList = FilterTools.PlanYearList(PlanYFilter);
            ViewBag.PlanYearList = spDAL.PlanYearList();
            ViewBag.KIDtrtList   = FilterTools.TrtList(trtFilter);
            ViewBag.KIDspcList   = FilterTools.KIDspcList(spcFilter);
            ViewBag.KIDdisList   = FilterTools.KIDdisList(disFilter);
            ViewBag.Page         = "CtVetPlan";
            //ViewBag.RepList  = spDAL.ReportToToday();

            return(View(l));
        }