public static void UpdateClass(string TeacherId, string StudentId, string Date, int Hour, int Id)
        {
            string com = "update Classes set TeacherId = '" + TeacherId + "' and StudentId = '" + StudentId + "', ClassDate = '" + Date + "' , ClassHour = '" + Hour + "' where  ClassCode=" + Id + "";

            OLEDBHelper.Execute(com);
        }
        public static void DeleteClass(int Id)
        {
            string com = "Delete From Classes where  ClassCode = " + Id + "";

            OLEDBHelper.Execute(com);
        }
        public static DataTable GetAllClasses()
        {
            string com = "select * from Classes";

            return(OLEDBHelper.GetTable(com));
        }
        public static DataTable GetAllClassesForTeacher(string Id)
        {
            string com = "select * from Classes where TeacherId = '" + Id + "'";

            return(OLEDBHelper.GetTable(com));
        }
Пример #5
0
        public static void DeleteStudent(int Id)
        {
            string com = "Delete From Students where  StudentId = '" + Id + "'";

            OLEDBHelper.Execute(com);
        }
        public static void AddClass(string TeacherId, string StudentId, string Date, int Hour)
        {
            string com = "insert into Classes (TeacherId , StudentId , ClassDate, ClassHour) VALUES ('" + TeacherId + "', '" + StudentId + "' , '" + Date + "'  , '" + Hour + "')";

            OLEDBHelper.Execute(com);
        }
Пример #7
0
        public static DataTable GetAllStudents()
        {
            string com = "select * from Students";

            return(OLEDBHelper.GetTable(com));
        }
Пример #8
0
        public static void UpdateStudent(string Name, string Last, string Phone, int Id)
        {
            string com = "update Students set StudentName = '" + Name + "' , StudentLast = '" + Last + "', StudentPhone = '" + Phone + "' where  StudentId='" + Id + "'";

            OLEDBHelper.Execute(com);
        }
Пример #9
0
        public static void AddStudent(string Name, string Last, string Phone)
        {
            string com = "insert into Students (StudentName , StudentLast , StudentPhone) VALUES ('" + Name + "', '" + Last + "' , '" + Phone + "')";

            OLEDBHelper.Execute(com);
        }
        public static void DeleteTeacher(int Id)
        {
            string com = "Delete From Teachers where TeacherId =" + Id + "";

            OLEDBHelper.Execute(com);
        }
        public static void UpdateTeacher(string Name, string Last, string Phone, int Id)
        {
            string com = "update Teachers set TeacherName = '" + Name + "' , TeacherLast = '" + Last + "' , TeacherPhone = '" + Phone + "' where  TeacherId=" + Id + "";

            OLEDBHelper.Execute(com);
        }
        public static DataTable GetAllTeachers()
        {
            string com = "select * from Teachers";

            return(OLEDBHelper.GetTable(com));
        }
        public static void AddTeacher(string Name, string Last, string Phone)
        {
            string com = "insert into Teachers (TeacherName , TeacherLast , TeacherPhone) VALUES ('" + Name + "', '" + Last + "' , '" + Phone + "')";

            OLEDBHelper.Execute(com);
        }