Exemplo n.º 1
0
 public static List <instation> GetAllInstation()
 {
     using (var context = new PARENTSEntities())
     {
         List <instation> instationList = context.instation.ToList();
         return(instationList);
     }
 }
Exemplo n.º 2
0
 public static List <times> GetAllTimes()
 {
     using (var context = new PARENTSEntities())
     {
         List <times> timesList = context.times.ToList();
         return(timesList);
     }
 }
Exemplo n.º 3
0
 public static List <parents> GetAllParents()
 {
     using (var context = new PARENTSEntities())
     {
         List <parents> ParentsList = context.parents.ToList();
         return(ParentsList);
     }
 }
Exemplo n.º 4
0
 public static parents GetParentById(string id)
 {
     using (var context = new PARENTSEntities())
     {
         parents parentList = context.parents.FirstOrDefault(x => x.id == id);
         return(parentList);
     }
 }
Exemplo n.º 5
0
 public static List <classes> GetAllClasses()
 {
     using (var context = new   PARENTSEntities())
     {
         List <classes> classesList = context.classes.ToList();
         return(classesList);
     }
 }
Exemplo n.º 6
0
 public static List <request> GetAllRequest()
 {
     using (var context = new PARENTSEntities())
     {
         List <request> RequestList = context.request.ToList();
         return(RequestList);
     }
 }
Exemplo n.º 7
0
 public static List <studens> GetAllStudents()
 {
     using (var context = new PARENTSEntities())
     {
         List <studens> studensList = context.studens.ToList();
         return(studensList);
     }
 }
Exemplo n.º 8
0
 public static List <parents> GetParentByCodeInstation(int id)
 {
     using (var context = new PARENTSEntities())
     {
         List <parents> parentList = context.parents.Where(x => x.code_instation == id).ToList();
         return(parentList);
     }
 }
Exemplo n.º 9
0
 public static List <teachers> GetTeachersByCodeInstation(int id)
 {
     using (var context = new PARENTSEntities())
     {
         List <teachers> teachersList = context.teachers.Where(x => x.code_instation == id).ToList();
         return(teachersList);
     }
 }
Exemplo n.º 10
0
 public static List <teachers> GetAllTeachers()
 {
     using (var context = new PARENTSEntities())
     {
         List <teachers> teachersList = context.teachers.ToList();
         return(teachersList);
     }
 }
Exemplo n.º 11
0
 public static List <scheduling> GetSchedulingByCodeInstation(int id)
 {
     using (var context = new PARENTSEntities())
     {
         List <scheduling> schedulingList = context.scheduling.Where(pp => pp.studens.parents.code_instation == id).ToList();
         return(schedulingList);
     }
 }
Exemplo n.º 12
0
 public static instation GetInstationById(int id)
 {
     using (var context = new PARENTSEntities())
     {
         instation instationList = context.instation.FirstOrDefault(x => x.code == id);
         return(instationList);
     }
 }
Exemplo n.º 13
0
 public static List <studens> GetKids(string id)
 {
     using (var context = new PARENTSEntities())
     {
         List <studens> studensList = context.studens.Where(s => s.id_parent == id).ToList();
         return(studensList);
     }
 }
Exemplo n.º 14
0
 public static List <scheduling> GetAllScheduling()
 {
     using (var context = new PARENTSEntities())
     {
         List <scheduling> schedulingList = context.scheduling.ToList();
         return(schedulingList);
     }
 }
Exemplo n.º 15
0
        // מחיקה

        public static void DeleteScheduling(int id)
        {
            using (var context = new PARENTSEntities())
            {
                scheduling scheduling = context.scheduling.Where(p => p.code == id).FirstOrDefault();
                context.scheduling.Remove(scheduling);
                context.SaveChanges();
            }
        }
Exemplo n.º 16
0
        // מחיקה

        public static void DeleteTeachers(string id)
        {
            using (var context = new PARENTSEntities())
            {
                teachers teachers = context.teachers.Where(p => p.id.Equals(id)).FirstOrDefault();
                context.teachers.Remove(teachers);
                context.SaveChanges();
            }
        }
Exemplo n.º 17
0
 //הוספת
 public static string AddTeachers(teachers teachers)
 {
     using (var context = new PARENTSEntities())
     {
         teachers t = context.teachers.Add(teachers);
         context.SaveChanges();
         return(t.id);
     }
 }
Exemplo n.º 18
0
        // מחיקה

        public static void DeleteInstation(int code)
        {
            using (var context = new PARENTSEntities())
            {
                instation instation = context.instation.Where(p => p.code == code).FirstOrDefault();
                context.instation.Remove(instation);
                context.SaveChanges();
            }
        }
Exemplo n.º 19
0
        // מחיקה

        public static void DeleteParents(string id)
        {
            using (var context = new PARENTSEntities())
            {
                parents parents = context.parents.Where(p => p.id.Equals(id)).FirstOrDefault();
                context.parents.Remove(parents);
                context.SaveChanges();
            }
        }
Exemplo n.º 20
0
        // מחיקה

        public static void DeleteStudens(string id)
        {
            using (var context = new PARENTSEntities())
            {
                studens studens = context.studens.Where(p => p.id.Equals(id)).FirstOrDefault();
                context.studens.Remove(studens);
                context.SaveChanges();
            }
        }
Exemplo n.º 21
0
 //הוספת
 public static int AddScheduling(scheduling scheduling)
 {
     using (var context = new PARENTSEntities())
     {
         scheduling s = context.scheduling.Add(scheduling);
         context.SaveChanges();
         return(s.code);
     }
 }
Exemplo n.º 22
0
        public static List <scheduling> GetSchedulingByCodeClass(int id)
        {
            using (var context = new PARENTSEntities())
            {
                List <scheduling> schedulingList = context.scheduling.Where(r => r.code_class == id).OrderBy(w => w.hour_).ToList();

                return(schedulingList);
            }
        }
Exemplo n.º 23
0
        // מחיקה

        public static void DeleteRequest(string id)
        {
            using (var context = new PARENTSEntities())
            {
                request request = context.request.Where(p => p.code.Equals(id)).FirstOrDefault();
                context.request.Remove(request);
                context.SaveChanges();
            }
        }
Exemplo n.º 24
0
 //הוספת
 public static int AddRequest(request request)
 {
     using (var context = new PARENTSEntities())
     {
         request r = context.request.Add(request);
         context.SaveChanges();
         return(r.code);
     }
 }
Exemplo n.º 25
0
 //הוספת
 public static string AddStudens(studens studens)
 {
     using (var context = new PARENTSEntities())
     {
         studens s = context.studens.Add(studens);
         context.SaveChanges();
         return(s.id);
     }
 }
Exemplo n.º 26
0
 //הוספת
 public static int AddClass(classes classes)
 {
     using (var context = new PARENTSEntities())
     {
         classes c = context.classes.Add(classes);
         context.SaveChanges();
         return(c.code);
     }
 }
Exemplo n.º 27
0
 //הוספת
 public static int AddInstation(instation instation)
 {
     using (var context = new PARENTSEntities())
     {
         instation i = context.instation.Add(instation);
         context.SaveChanges();
         return(i.code);
     }
 }
Exemplo n.º 28
0
 //הוספת
 public static string AddParents(parents parents)
 {
     using (var context = new PARENTSEntities())
     {
         parents p = context.parents.Add(parents);
         context.SaveChanges();
         return(p.id);
     }
 }
Exemplo n.º 29
0
        // מחיקה

        public static void DeleteClass(int code)
        {
            using (var context = new PARENTSEntities())
            {
                classes classes = context.classes.Where(p => p.code == code).FirstOrDefault();
                context.classes.Remove(classes);
                context.SaveChanges();
            }
        }
Exemplo n.º 30
0
 public static parents GetParentByIdStudent(string id)
 {
     using (var context = new PARENTSEntities())
     {
         studens student    = context.studens.Where(s => s.id == id).FirstOrDefault();
         parents parentList = context.parents.Where(p => p.id == student.id_parent).FirstOrDefault();
         return(parentList);
     }
 }