public ActionResult Index() { ViewBag.Head = "Manage Vehicle Type"; ViewBag.Form = "Vehicle Type List"; IEnumerable <VehicleType> model = _rep.Get(); return(View(model)); }
// constructor public VehicleModel() { ProcedureNameHandling.GetSP = "GetCountry"; countries = _basicRep.Get(); countrieslist = countries.ToCountrySelectListItems(CountryID); ProcedureNameHandling.GetSP = "GetStatus"; status = _basicRep.Get(); statuslist = status.ToStatusSelectListItems(StatusID); VehicleTypeRepository _vehicletyperep = new VehicleTypeRepository(); vehicletype = _vehicletyperep.Get(); vehicletypelist = vehicletype.ToVehicleTypeSelectListItems(VehicleTypeID); VehicleBusinessTypeRepository _vehiclebusinesstyperep = new VehicleBusinessTypeRepository(); vehiclebusinesstype = _vehiclebusinesstyperep.Get(); vehiclebusinesstypelist = vehiclebusinesstype.ToVehicleBusinessTypeSelectListItems(VehicleBusinessTypeID); VehicleCompanyRepository _vehiclecompanyrep = new VehicleCompanyRepository(); vehiclecompany = _vehiclecompanyrep.Get(); vehiclecompanylist = vehiclecompany.ToVehicleCompanySelectListItems(VehicleCompanyID); ProcedureNameHandling.GetSP = "GetColor"; color = _basicRep.Get(); colorlist = color.ToColorSelectListItems(ColorID); }
// CONSTRUCTOR -- public ThirdPartyVehicle() { VehicleTypeRepository _vehicletyperep = new VehicleTypeRepository(); vehicletypeVar = _vehicletyperep.Get(); vehicletypelist = vehicletypeVar.ToVehicleTypeSelectListItems(VehicleType); VehicleBusinessTypeRepository _vehiclebusinesstyperep = new VehicleBusinessTypeRepository(); vehiclebusinesstypeVar = _vehiclebusinesstyperep.Get(); vehiclebusinesstypelist = vehiclebusinesstypeVar.ToVehicleBusinessTypeSelectListItems(VehicleBusinessType); VehicleCompanyRepository _vehiclecompanyrep = new VehicleCompanyRepository(); vehiclecompanyVar = _vehiclecompanyrep.Get(); vehiclecompanylist = vehiclecompanyVar.ToVehicleCompanySelectListItems(VehicleCompany); }
public IActionResult GetTypeInfo(int id) { VehicleType type = repo.Get(id); return(View(type) ?? (IActionResult)NotFound()); }