Exemplo n.º 1
0
        public List <StudentList> getDriversForEvent(int driver1, int driver2)
        {
            List <StudentList> drivers = new List <StudentList>();
            var driv = dataContext.sp_GetDriversForEvent(driver1, driver2);

            foreach (var x in driv)
            {
                StudentList driver = new StudentList();
                driver.Student_ID = x.Student_ID;
                driver.FirstName  = x.FirstName;
                driver.LastName   = x.LastName;
                driver.Name       = x.FirstName + " " + x.LastName;
                if (x.CertifiedDriver == true)
                {
                    driver.Drivertype = "Certified";
                }
                else
                {
                    driver.Drivertype = "Approved";
                }
                drivers.Add(driver);
            }
            return(drivers);
        }