Esempio n. 1
0
        // GET: Vechicle/Create
        public ActionResult Create()
        {
            ViewBag.Type       = TypesHelpers.DropDownList();
            ViewBag.Categories = CategoryHelpers.DropDownList();

            return(View());
        }
Esempio n. 2
0
        // GET: Vechicle/Edit/5
        public ActionResult Edit(int id)
        {
            try
            {
                var vechicle = _vechicleService.GetEditView(id);

                ViewBag.Type       = TypesHelpers.DropDownList(vechicle.Type);
                ViewBag.Categories = CategoryHelpers.DropDownList(vechicle.Categories);

                return(View(vechicle));
            }
            catch
            {
                return(HttpNotFound());
            }
        }