public void addstudentInfo(studentInfo u) { tema2psEntities entities = new tema2psEntities(); entities.studentInfoes.Add(u); entities.SaveChanges(); }
public void addClientInfo(clientInfo u) { tema2psEntities entities = new tema2psEntities(); entities.clientInfoes.Add(u); entities.SaveChanges(); }
public void addcourse(course u) { tema2psEntities entities = new tema2psEntities(); entities.courses.Add(u); entities.SaveChanges(); }
public void addUser(user u) { tema2psEntities entities = new tema2psEntities(); entities.users.Add(u); entities.SaveChanges(); }
public void addenrollment(enrollment u) { tema2psEntities entities = new tema2psEntities(); entities.enrollments.Add(u); entities.SaveChanges(); }
public void deletecourseID(int id) { tema2psEntities entities = new tema2psEntities(); foreach (course uDB in entities.courses) { if (uDB.id == id) { entities.courses.Remove(uDB); } } entities.SaveChanges(); }
public void deleteUserByID(int id) { tema2psEntities entities = new tema2psEntities(); foreach (user uDB in entities.users) { if (uDB.id == id) { entities.users.Remove(uDB); } } entities.SaveChanges(); }
public void deleteclientInfoByID(int id) { tema2psEntities entities = new tema2psEntities(); foreach (clientInfo uDB in entities.clientInfoes) { if (uDB.id == id) { entities.clientInfoes.Remove(uDB); } } entities.SaveChanges(); }
public void deleteenrollmentID(int id) { tema2psEntities entities = new tema2psEntities(); foreach (enrollment uDB in entities.enrollments) { if (uDB.id == id) { entities.enrollments.Remove(uDB); } } entities.SaveChanges(); }
public user getUser(int id) { tema2psEntities entities = new tema2psEntities(); user u = new user(); foreach (user uDB in entities.users) { if (uDB.id == id) { u = uDB; } } return(u); }
public enrollment getenrollmentbyID(int id) { tema2psEntities entities = new tema2psEntities(); enrollment u = new enrollment(); foreach (enrollment uDB in entities.enrollments) { if (uDB.id == id) { u = uDB; } } return(u); }
public int getMaxID() { tema2psEntities entities = new tema2psEntities(); int id = 0; foreach (enrollment u in entities.enrollments) { if (u.id > id) { id = u.id; } } return(id); }
public clientInfo getClientInfobyID(int id) { tema2psEntities entities = new tema2psEntities(); clientInfo u = new clientInfo(); foreach (clientInfo uDB in entities.clientInfoes) { if (uDB.id == id) { u = uDB; } } return(u); }
public int getMaxID() { tema2psEntities entities = new tema2psEntities(); int id = 0; foreach (clientInfo u in entities.clientInfoes) { if (u.id > id) { id = u.id; } } return(id); }
public void updatecourse(course u) { tema2psEntities entities = new tema2psEntities(); foreach (course uDB in entities.courses) { if (uDB.id == u.id) { uDB.name = u.name; uDB.description = u.description; } } entities.SaveChanges(); }
public course getcoursebyID(int id) { tema2psEntities entities = new tema2psEntities(); course u = new course(); foreach (course uDB in entities.courses) { if (uDB.id == id) { u = uDB; } } return(u); }
public studentInfo getStudentInfoByID(int id) { tema2psEntities entities = new tema2psEntities(); studentInfo u = new studentInfo(); foreach (studentInfo uDB in entities.studentInfoes) { if (uDB.id == id) { u = uDB; } } return(u); }
public void updateUser(user u) { tema2psEntities entities = new tema2psEntities(); foreach (user uDB in entities.users) { if (uDB.id == u.id) { uDB.username = u.username; uDB.password = u.password; uDB.type = u.type; } } entities.SaveChanges(); }
public void updateclientInfo(studentInfo u) { tema2psEntities entities = new tema2psEntities(); foreach (studentInfo uDB in entities.studentInfoes) { if (uDB.id == u.id) { uDB.userID = u.userID; uDB.identificationNR = u.identificationNR; uDB.groupNR = u.groupNR; } } entities.SaveChanges(); }
public void updateenrollment(enrollment u) { tema2psEntities entities = new tema2psEntities(); foreach (enrollment uDB in entities.enrollments) { if (uDB.id == u.id) { uDB.userID = u.userID; uDB.courseID = u.courseID; uDB.grade = u.grade; } } entities.SaveChanges(); }
public void updateclientInfo(clientInfo u) { tema2psEntities entities = new tema2psEntities(); foreach (clientInfo uDB in entities.clientInfoes) { if (uDB.id == u.id) { uDB.adress = u.adress; uDB.CNP = u.CNP; uDB.identityCardNumber = u.identityCardNumber; uDB.userID = u.userID; uDB.name = u.name; } } entities.SaveChanges(); }
public List <studentInfo> GetstudentInfos() { tema2psEntities entities = new tema2psEntities(); return(entities.studentInfoes.ToList()); }
public List <clientInfo> GetClientInfos() { tema2psEntities entities = new tema2psEntities(); return(entities.clientInfoes.ToList()); }
public List <enrollment> GetEnrollments() { tema2psEntities entities = new tema2psEntities(); return(entities.enrollments.ToList()); }
public List <course> Getcourses() { tema2psEntities entities = new tema2psEntities(); return(entities.courses.ToList()); }
public List <user> GetUsers() { tema2psEntities entities = new tema2psEntities(); return(entities.users.ToList()); }