public ActionResult Create()
 {
     ViewBag.KaroseriList = new SelectList(KaroseriDataAccess.GetAll(), "KaroseriId", "Description");
     ViewBag.MerkBusList  = new SelectList(MerkBusDataAccess.GetAll(), "MerkId", "Description");
     ViewBag.TypeBusList  = new SelectList(TypeBusDataAccess.GetByMerkBus(""), "TypeId", "Description");
     return(View());
 }
        public ActionResult Edit(int id)
        {
            FleetViewModel model = FleetDataAccess.GetById(id);

            ViewBag.KaroseriList = new SelectList(KaroseriDataAccess.GetAll(), "KaroseriId", "Description");
            ViewBag.MerkBusList  = new SelectList(MerkBusDataAccess.GetAll(), "MerkId", "Description");
            ViewBag.TypeBusList  = new SelectList(TypeBusDataAccess.GetByMerkBus(model.MerkId), "TypeId", "Description");
            return(View(model));
        }
示例#3
0
        public ActionResult List()
        {
            List <MerkBusViewModel> model = MerkBusDataAccess.GetAll();

            return(View(model));
        }
示例#4
0
 public ActionResult Edit(int id)
 {
     ViewBag.MerkBusList = new SelectList(MerkBusDataAccess.GetAll(), "MerkId", "Description");
     return(View(TypeBusDataAccess.GetById(id)));
 }
示例#5
0
 public ActionResult Create()
 {
     ViewBag.MerkBusList = new SelectList(MerkBusDataAccess.GetAll(), "MerkId", "Description");
     return(View());
 }