public IActionResult Index() { _ = new List <BioPrep>(); //string v = Request.Query.Count string repMoFilter = Request.Query.FirstOrDefault(p => p.Key == "repMO").Value.ToString(); string VetPrepFilter = Request.Query.FirstOrDefault(p => p.Key == "VetPrep").Value.ToString(); 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); //if(Request.Query.Count==0) List <BioPrep> BioPrepList = BioPrepDAL.GetAll_BioPrepF( User.Claims.ToList().FirstOrDefault(x => x.Type == "KIDro").Value, reportDtYear, reportDtMonth, repMoFilter, VetPrepFilter ).ToList(); ViewBag.Page = "BioPrep"; ViewBag.RepList = spDAL.ReportToToday(); //SelectList l = FilterTools.repMOList(reportDtYear,reportDtMonth); //foreach(var i in l) // if(i.Value == repMoFilter) {i.Selected = true;break;} ViewBag.repMOList = FilterTools.repMOList(reportDtYear, reportDtMonth, repMoFilter); //SelectList vpl = FilterTools.VetPrepList(VetPrepFilter); //foreach(var it in vpl) // if(it.Value.Trim() == VetPrepFilter.Trim()){it.Selected = true; break;} //ViewBag.VetPrepList = vpl; ViewBag.VetPrepList = FilterTools.VetPrepList(VetPrepFilter); ViewBag.RepList = spDAL.ReportToToday(); return(View(BioPrepList)); }