// ############################################################
        //
        // GET: /Vehicles/Create
        public ActionResult Create()
        {
            // Prepare the data for the view
            var addForm = new VehicleAddForm();

            // If necessary, provide initial values for the form
            addForm.ModelYear = DateTime.Now.Year;

            // Add the 'select' UI control items
            addForm.Manufacturers = new SelectList(m.GetAllManufacturersAsList(), "Id", "Name");

            return View(addForm);
        }
예제 #2
0
        // ############################################################

        //
        // GET: /Vehicles/Create
        public ActionResult Create()
        {
            // Prepare the data for the view
            var addForm = new VehicleAddForm();

            // If necessary, provide initial values for the form
            addForm.ModelYear = DateTime.Now.Year;

            // Add the 'select' UI control items
            addForm.Manufacturers = new SelectList(m.GetAllManufacturersAsList(), "Id", "Name");

            return(View(addForm));
        }