Пример #1
0
        public CourseDataHandler(int id)
        {
            this.id = id;
            this.CourseDataContext = new FacultyDataDataContext();
            var CourseInformation = from course in CourseDataContext.Test_CourseTables
                                    where course.ID == id
                                    select course;

            CourseInformation.ToList();
            foreach (var data in CourseInformation)
            {
                this.name       = data.Name;
                this.id         = data.ID;
                this.department = data.Department ?? 1;
                this.credits    = data.Credits ?? 1;
                this.section    = data.Section ?? 1;
                this.daySlot    = data.DaySlot ?? 1;
                this.startTime  = data.StartTime ?? 1;
                this.endTime    = data.EndTime ?? 1;
            }
        }
Пример #2
0
        public FacultyDataHandler(string id)
        {
            this.id = id;
            this.FacultyDataContext = new FacultyDataDataContext();
            var FacultyInformation = from student in FacultyDataContext.Test_FacultyTables
                                     where student.ID == id
                                     select student;

            FacultyInformation.ToList();
            foreach (var data in FacultyInformation)
            {
                this.name       = data.Name;
                this.department = data.Department ?? 1;
                this.father     = data.FatherName;
                this.mother     = data.MotherName;
                this.phone      = data.PhoneNumber;
                this.email      = data.Email;
                this.bloodGroup = data.BloodGroup ?? 1;
                this.gender     = data.Gender ?? 1;
                this.dob        = data.DOB.ToString();
            }
        }
Пример #3
0
 public CourseDataHandler()
 {
     this.CourseDataContext = new FacultyDataDataContext();
 }
Пример #4
0
 public AttendanceDataHandler()
 {
     this.AttendanceDataContext = new FacultyDataDataContext();
 }