Ejemplo n.º 1
0
        // GET: Car/Create
        public ActionResult Create()
        {
            var res  = serviceCarModel.GetMany().ToList();
            var sub  = serviceSubCategory.GetMany().ToList();
            var year = serviceCreation.GetMany().ToList();
            var type = serviceType.GetMany().ToList();

            ViewBag.TypeId         = new SelectList(type, "TypeId", "Name");
            ViewBag.CreationYearId = new SelectList(year, "CreationYearId", "Name");
            ViewBag.SubCategoryId  = new SelectList(sub, "SubCategoryId", "Name");
            ViewBag.CarModelId     = new SelectList(res, "CarModelId", "Name");
            return(View());
        }
Ejemplo n.º 2
0
        // GET: Admin/Stats
        public ActionResult Index()
        {
            List <CreationYear> fls    = myService.GetMany().ToList();
            List <dynamic>      models = new List <dynamic>();

            foreach (var item in fls)
            {
                dynamic x = new
                {
                    label = item.Name,
                    value = item.Cars.Count()
                };

                models.Add(x);
            }

            return(View(models));
        }
Ejemplo n.º 3
0
        // GET: Admin/CreationYear
        public ActionResult Index()
        {
            var res = myService.GetMany().ToList();

            return(View(res));
        }