Exemple #1
0
        public ActionResult ShowUnchecked()
        {
            var lots = service.GetAllByPredicate(l => l.IsChecked == false);
            var list = new ListLotViewModel();

            list.lots = new List <LotViewModel>();
            foreach (LotEntity lot in lots)
            {
                list.lots.Add(lot.ToLotViewModel());
            }
            list.lots    = list.lots.OrderBy(e => e.EndDate).ToList();
            ViewBag.lots = list;
            return(View());
        }
Exemple #2
0
        public ActionResult Index(string word)
        {
            IEnumerable <LotEntity> lots = null;

            if (word != null)
            {
                lots = service.GetAllByPredicate(l => l.IsChecked == true && l.Name.Contains(word));
            }
            else
            {
                lots = service.GetAllByPredicate(l => l.IsChecked == true);
            }
            var list = new ListLotViewModel();

            list.lots = new List <LotViewModel>();
            foreach (LotEntity lot in lots)
            {
                list.lots.Add(lot.ToLotViewModel());
            }
            ViewBag.lots = list;
            return(View());
        }