Exemplo n.º 1
0
 public IEnumerable <Driver> GetAllDrivers()
 {
     try
     {
         db.GetDrivers();
         return(db.Drivers.Values);
     }
     catch (Exception)
     {
         throw;
     }
 }
        protected void btnLoadDrivers_Click(object sender, EventArgs e)
        {
            DbTools db = new DbTools();

            GridView1.DataSource = db.GetDrivers().Values;
            GridView1.DataBind();
        }
Exemplo n.º 3
0
 private void FormMain_Load(object sender, EventArgs e)
 {
     db = new DbTools();
     db.GetCountries();
     db.GetDrivers();
     teams = new BindingList <Team>(db.LoadTeams());
     listBoxTeam.DataSource = teams;
 }
Exemplo n.º 4
0
        public IHttpActionResult GetDriver(int id)
        {
            db.GetDrivers();
            if (db.Drivers[id] == null)
            {
                return(NotFound());
            }

            return(Ok(db.Drivers[id]));
        }
 public IEnumerable <Driver> GetAllDrivers()
 {
     return(db.GetDrivers().Values);
 }