// // GET: /PhieuNhap/ public ActionResult Index(DateTime?TimeStart, DateTime?TimeEnd) { var data = new dbQLKhoEntities().PhieuNhaps.ToList(); if (TimeStart.HasValue) { data = data.Where(q => q.ThoiGian.Value >= TimeStart.Value).ToList(); } if (TimeEnd.HasValue) { data = data.Where(q => q.ThoiGian.Value <= TimeEnd.Value).ToList(); } return(View(data)); }