public ActionResult Details([Bind(Include = "ngaybatdau,ngayketthuc")] ThongKeKhoViewModel kho) { List <Kho> list = new List <Kho>(); if (ModelState.IsValid) { list = db.Khoes.Where(c => c.NgayGhi >= kho.ngaybatdau && c.NgayGhi <= kho.ngayketthuc).ToList(); } kho.khos = list; return(View(kho)); }
// GET: Khoes/Details/5 public ActionResult Details() { ThongKeKhoViewModel kho = new ThongKeKhoViewModel(); return(View(kho)); }