Ejemplo n.º 1
0
        public ActionResult Index(VehicleSearchCM form)
        {
            if (ModelState.IsValid)
            {
                SalesIndexVM VM   = new SalesIndexVM();
                var          repo = new VehicleRepositoryADO();
                VM.Vehicles = repo.Search(form, null);
                VM.SetYear();
                VM.SetPrice();

                VM.Form = form;
                return(View(VM));
            }
            else
            {
                SalesIndexVM VM   = new SalesIndexVM();
                var          repo = new VehicleRepositoryADO();
                VM.Vehicles = repo.Search(form, null);
                VM.SetYear();
                VM.SetPrice();

                VM.Form = form;
                return(View(VM));
            }
        }
Ejemplo n.º 2
0
        public ActionResult Index()
        {
            SalesIndexVM    VM   = new SalesIndexVM();
            var             repo = new VehicleRepositoryADO();
            VehicleSearchCM form = new VehicleSearchCM();

            VM.Vehicles = repo.Search(form, null);
            VM.SetYear();
            VM.SetPrice();

            return(View(VM));
        }