Esempio n. 1
0
 //login coded by Nikhil Ladhani
 static public Employee getLoginDetail(String un, String pwd)
 {
     using (NBAEntities ctx = new NBAEntities())
     {
         login = ctx.Employees.Where(e => e.Username == un && e.Password == pwd).FirstOrDefault();
     }
     return(login);
 }
Esempio n. 2
0
 //add new employee info by Brodie Allen
 static public void addEmployee(Employee emp, Person psn)
 {
     using (NBAEntities ctx = new NBAEntities())
     {
         ctx.Employees.Add(emp);
         ctx.People.Add(psn);
         ctx.SaveChanges();
     }
 }
Esempio n. 3
0
 //add new car info by Nikhil Ladhani
 static public void addNewCarDetails(CarFeature cf, CarModel cm, IndividualCar ic)
 {
     using (NBAEntities ctx = new NBAEntities())
     {
         ctx.CarFeatures.Add(cf);
         ctx.CarModels.Add(cm);
         ctx.IndividualCars.Add(ic);
         ctx.SaveChanges();
     }
 }
Esempio n. 4
0
        static public void addCustomer(Customer cust, Person psn)
        {
            using (NBAEntities ctx = new NBAEntities())
            {
                //emp.EmployeeID = login.EmployeeID;

                ctx.Customers.Add(cust);
                ctx.People.Add(psn);
                ctx.SaveChanges();
            }
        }