public void addstudentInfo(studentInfo u)
        {
            tema2psEntities entities = new tema2psEntities();

            entities.studentInfoes.Add(u);
            entities.SaveChanges();
        }
コード例 #2
0
        public void addClientInfo(clientInfo u)
        {
            tema2psEntities entities = new tema2psEntities();

            entities.clientInfoes.Add(u);
            entities.SaveChanges();
        }
コード例 #3
0
        public void addcourse(course u)
        {
            tema2psEntities entities = new tema2psEntities();

            entities.courses.Add(u);
            entities.SaveChanges();
        }
コード例 #4
0
        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();
        }
コード例 #6
0
        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();
        }
コード例 #7
0
        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();
        }
コード例 #8
0
        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();
        }
コード例 #10
0
        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);
        }
コード例 #13
0
        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);
        }
コード例 #14
0
        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);
        }
コード例 #15
0
        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();
        }
コード例 #16
0
        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);
        }
コード例 #18
0
        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();
        }
コード例 #21
0
        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());
        }
コード例 #23
0
        public List <clientInfo> GetClientInfos()
        {
            tema2psEntities entities = new tema2psEntities();

            return(entities.clientInfoes.ToList());
        }
        public List <enrollment> GetEnrollments()
        {
            tema2psEntities entities = new tema2psEntities();

            return(entities.enrollments.ToList());
        }
コード例 #25
0
        public List <course> Getcourses()
        {
            tema2psEntities entities = new tema2psEntities();

            return(entities.courses.ToList());
        }
コード例 #26
0
        public List <user> GetUsers()
        {
            tema2psEntities entities = new tema2psEntities();

            return(entities.users.ToList());
        }