Ejemplo n.º 1
0
        // GET: Drivers
        public ActionResult Index()
        {
            sqlconn.Open();
            List <UserDriver> drivers = UserDriverLogic.FindAll(sqlconn);

            sqlconn.Close();
            return(View(drivers));
        }
Ejemplo n.º 2
0
        // GET: Vehicles/Create
        public ActionResult Create()
        {
            sqlconn.Open();
            List <VehicleType>  types  = VehicleTypeXmlMapper.SelectAll();
            List <VehicleBrand> brands = VehicleBrandXmlMapper.SelectAll();

            List <UserDriver> drivers = UserDriverLogic.FindAll(sqlconn);
            List <UserBoss>   bosses  = UserBossLogic.FindAll(sqlconn);

            sqlconn.Close();

            ViewData["vehicleTypes"]  = types;
            ViewData["vehicleBrands"] = brands;
            ViewData["drivers"]       = drivers;
            ViewData["bosses"]        = bosses;

            return(View());
        }