Exemple #1
0
 public void AddSection(Section rec)
 {
     if (rec.Section_Id == 0)
     {
         db.Sections.Add(rec);
         db.SaveChanges();
     }
     else
     {
         var find = db.Sections.Find(rec.Section_Id);
         find.Name     = rec.Name;
         find.Staff_Id = rec.Staff_Id;
         db.SaveChanges();
     }
 }
Exemple #2
0
        public void Save(Class_SectionVM Rec)
        {
            var clasid   = Rec.Classid;
            var sec_list = Rec.SectionList;

            foreach (var item in sec_list)
            {
                var VM = new Cl_Sec
                {
                    Class_Id = clasid,
                    Sec_Id   = item.Section_Id
                };
                db.Cl_Sec.Add(VM);
                db.SaveChanges();
            }
        }
Exemple #3
0
 public void Student_Enrolment(Student_Enrolment rec)
 {
     if (rec.Enrolment_Id == 0)
     {
         db.Student_Enrolments.Add(rec);
         db.SaveChanges();
     }
     else
     {
         var det = db.Student_Enrolments.Find(rec.Enrolment_Id);
         det.Class_Id      = rec.Class_Id;
         det.Section_Id    = rec.Section_Id;
         det.Staff_Id      = rec.Staff_Id;
         det.Stud_ID       = rec.Stud_ID;
         det.Session_Start = rec.Session_Start;
         det.Session_End   = rec.Session_End;
         db.SaveChanges();
     }
 }
 // GET: StudentServices
 public void AddClass(Class rec)
 {
     db.Classes.Add(rec);
     db.SaveChanges();
 }
Exemple #5
0
 public void AddStaff(Staff rec)
 {
     db.Staffs.Add(rec);
     db.SaveChanges();
 }
 public void Staff_Attendence(Staff_Attendence rec)
 {
     db.Staff_Attendence.Add(rec);
     db.SaveChanges();
 }
Exemple #7
0
 public void AddDesignation(Designation rec)
 {
     db.Designations.Add(rec);
     db.SaveChanges();
 }
Exemple #8
0
 // GET: StudentServices
 public void CST(CST rec)
 {
     db.CSTs.Add(rec);
     db.SaveChanges();
 }
 // GET: StudentServices
 public void Result(Result rec)
 {
     db.Results.Add(rec);
     db.SaveChanges();
 }
 public void Student_Enrolment(Student_Enrolment rec)
 {
     db.Student_Enrolments.Add(rec);
     db.SaveChanges();
 }
Exemple #11
0
 public void AddSection(Section rec)
 {
     db.Sections.Add(rec);
     db.SaveChanges();
 }
Exemple #12
0
 // GET: StudentServices
 public void AddStudent(Student_Record rec)
 {
     rec.Admission_Date = DateTime.Now;
     db.Student_Records.Add(rec);
     db.SaveChanges();
 }
Exemple #13
0
 // GET: StudentServices
 public void Event(Event rec)
 {
     db.Events.Add(rec);
     db.SaveChanges();
 }
 // GET: StudentServices
 public void Exam_Schedule(Exam_Schedule rec)
 {
     db.Exam_Schedules.Add(rec);
     db.SaveChanges();
 }
Exemple #15
0
 public void AddAttendence(Attendence rec)
 {
     db.Attendences.Add(rec);
     db.SaveChanges();
 }
 public void AddSubject(Subject rec)
 {
     db.Subjects.Add(rec);
     db.SaveChanges();
 }
Exemple #17
0
 // GET: StudentServices
 public void AddParent(Parent_Record pec)
 {
     db.Parent_Records.Add(pec);
     db.SaveChanges();
 }