Beispiel #1
0
 public static List<Appointment> ListAppointments(bool? active)
 {
     using (HELPSEntities ctx = new HELPSEntities())
     {
         return ctx.prcListAppointments(active).ToList();
     }
 }
Beispiel #2
0
 public static BasicWorkshopWaiting GetWorkshopWaiting(int workshopId, string studentId)
 {
     using (HELPSEntities ctx = new HELPSEntities())
     {
         return ctx.prcGetWorkshopWaiting(workshopId, studentId).FirstOrDefault();
     }
 }
Beispiel #3
0
 public static List<Campus> ListCampuses(bool? active)
 {
     using (HELPSEntities ctx = new HELPSEntities())
     {
         return ctx.prcListCampuses(active).ToList();
     }
 }
Beispiel #4
0
 public static List<SessionType> ListSessionTypes(bool? active)
 {
     using (HELPSEntities ctx = new HELPSEntities())
     {
         return ctx.prcListSessionTypes(active).ToList();
     }
 }
Beispiel #5
0
 public static BasicSession GetSession(int sessionId)
 {
     using (HELPSEntities ctx = new HELPSEntities())
     {
         return ctx.prcGetSession(sessionId).FirstOrDefault();
     }
 }
Beispiel #6
0
 public static BasicSessionBooking GetSessionBooking(int sessionId, string studentId)
 {
     using (HELPSEntities ctx = new HELPSEntities())
     {
         return ctx.prcGetSessionBooking(sessionId, studentId).FirstOrDefault();
     }
 }
Beispiel #7
0
 public static void CancelWorkshopBooking(int workshopId, string studentId, int userId)
 {
     using (HELPSEntities ctx = new HELPSEntities())
     {
         ctx.prcCancelWorkshopBooking(workshopId, studentId, userId);
     }
 }
Beispiel #8
0
 public static List<Lecturer> ListLecturers(bool? active)
 {
     using (HELPSEntities ctx = new HELPSEntities())
     {
         return ctx.prcListLecturers(active).ToList();
     }
 }
Beispiel #9
0
 public static List<BasicWorkshopWaiting> GetWorkshopWaitingList(int workshopId)
 {
     using (HELPSEntities ctx = new HELPSEntities())
     {
         return ctx.prcGetWorkshopWaitingList(workshopId).ToList();
     }
 }
Beispiel #10
0
 public static BasicWorkshopBooking GetWorkshopBooking(int workshopId, string studentId)
 {
     using (HELPSEntities ctx = new HELPSEntities())
     {
         return ctx.prcGetWorkshopBooking(workshopId, studentId).FirstOrDefault(x => x.archived == null);
     }
 }
Beispiel #11
0
 public static Workshop GetWorkshopDetail(int workshopId)
 {
     using (HELPSEntities ctx = new HELPSEntities())
     {
         return ctx.prcGetWorkshopDetail(workshopId).FirstOrDefault();
     }
 }
Beispiel #12
0
 public static int?[] GetProgramWorkshops(int programId)
 {
     using (HELPSEntities ctx = new HELPSEntities())
     {
         return ctx.prcGetProgramWorkshops(programId).ToArray();
     }
 }
Beispiel #13
0
 public static void CreateWorkshopWaiting(int workshopId, string studentId, int? priority, int userId)
 {
     using (HELPSEntities ctx = new HELPSEntities())
     {
         ctx.prcCreateWorkshopWaiting(workshopId, studentId, priority, userId);
     }
 }
Beispiel #14
0
 public static Student GetStudent(string studentId)
 {
     using (HELPSEntities ctx = new HELPSEntities())
     {
         return ctx.prcGetStudent(studentId).FirstOrDefault();
     }
 }
Beispiel #15
0
 public static List<WorkShopSet> ListWorkShopSets(bool? active)
 {
     using (HELPSEntities ctx = new HELPSEntities())
     {
         return ctx.prcListWorkShopSets(active).ToList();
     }
 }
Beispiel #16
0
 public static List<SessionBooking> SearchSessionBookings(SessionBookingSearch bookingSearch)
 {
     using (HELPSEntities ctx = new HELPSEntities())
     {
         return ctx.prcSearchSessionBookings(bookingSearch.StudentId, bookingSearch.StartingDtBegin, bookingSearch.StartingDtEnd,
             bookingSearch.EndingDtBegin, bookingSearch.EndingDtEnd, bookingSearch.Campus,
             bookingSearch.LecturerId, bookingSearch.SessionTypeId, bookingSearch.Active,
             bookingSearch.Page, bookingSearch.PageSize).ToList();
     }
 }
Beispiel #17
0
 public static void UpdateSessionBooking(UpdateSessionBooking update)
 {
     using (HELPSEntities ctx = new HELPSEntities())
     {
         ctx.prcUpdateSessionBooking(update.SessionId, update.StudentId, update.Cancel, update.Assistance,
             update.Reason, update.Attended, update.WaitingId, update.IsGroup, update.NumPeople,
             update.LecturerComment, update.LearningIssues, update.IsLocked, update.AssignType,
             update.AssignTypeOther, update.Subject, update.Appointments, update.AppointmentsOther,
             update.AssistanceText, update.UserId);
     }
 }
Beispiel #18
0
        public static void RegisterStudent(StudentReg studentReg)
        {
            string gender = studentReg.Gender.HasValue ? studentReg.Gender.ToString() : null;

            using (HELPSEntities ctx = new HELPSEntities())
            {
                ctx.prcCreateStudent(studentReg.StudentId, studentReg.DateOfBirth, gender, studentReg.Degree.ToString(),
                    studentReg.Status.ToString(), studentReg.FirstLanguage, studentReg.CountryOrigin,
                    studentReg.Background,
                    studentReg.HSC, studentReg.HSCMark, studentReg.IELTS, studentReg.IELTSMark,
                    studentReg.TOEFL, studentReg.TOEFLMark, studentReg.TAFE, studentReg.TAFEMark,
                    studentReg.CULT, studentReg.CULTMark, studentReg.InsearchDEEP, studentReg.InsearchDEEPMark,
                    studentReg.InsearchDiploma, studentReg.InsearchDiplomaMark, studentReg.FoundationCourse,
                    studentReg.FoundationCourseMark,
                    studentReg.CreatorId, studentReg.DegreeDetails, studentReg.AltContact, studentReg.PreferredName);
            }
        }
Beispiel #19
0
 public static void UpdateWorkshopBooking(UpdateWorkshopBooking update)
 {
     using (HELPSEntities ctx = new HELPSEntities())
     {
         ctx.prcUpdateWorkshopBooking(update.WorkshopId, update.StudentId,
             update.Canceled, update.Attended, update.UserId, update.Notes);
     }
 }
Beispiel #20
0
 public static List<Workshop> SearchWorkshops(WorkshopSearch workshopSearch)
 {
     using (HELPSEntities ctx = new HELPSEntities())
     {
         return ctx.prcSearchWorkshops(workshopSearch.WorkshopSetId, workshopSearch.Topic,
             workshopSearch.StartingDtBegin, workshopSearch.StartingDtEnd, workshopSearch.EndingDtBegin,
             workshopSearch.EndingDtEnd, workshopSearch.CampusId, workshopSearch.Active, workshopSearch.Page,
             workshopSearch.PageSize).ToList();
     }
 }
Beispiel #21
0
 public static List<WorkshopBooking> SearchWorkshopBookings(WorkshopBookingSearch bookingSearch)
 {
     using (HELPSEntities ctx = new HELPSEntities())
     {
         return ctx.prcSearchWorkshopBookings(bookingSearch.StudentId,
                 bookingSearch.StartingDtBegin, bookingSearch.StartingDtEnd,
                 bookingSearch.EndingDtBegin, bookingSearch.EndingDtEnd, bookingSearch.CampusId,
                 bookingSearch.Active, bookingSearch.Page, bookingSearch.PageSize).ToList();
     }
 }