Exemplo n.º 1
0
 public static List<Appointment> ListAppointments(bool? active)
 {
     using (HELPSEntities ctx = new HELPSEntities())
     {
         return ctx.prcListAppointments(active).ToList();
     }
 }
Exemplo n.º 2
0
 public static BasicWorkshopWaiting GetWorkshopWaiting(int workshopId, string studentId)
 {
     using (HELPSEntities ctx = new HELPSEntities())
     {
         return ctx.prcGetWorkshopWaiting(workshopId, studentId).FirstOrDefault();
     }
 }
Exemplo n.º 3
0
 public static List<Campus> ListCampuses(bool? active)
 {
     using (HELPSEntities ctx = new HELPSEntities())
     {
         return ctx.prcListCampuses(active).ToList();
     }
 }
Exemplo n.º 4
0
 public static List<SessionType> ListSessionTypes(bool? active)
 {
     using (HELPSEntities ctx = new HELPSEntities())
     {
         return ctx.prcListSessionTypes(active).ToList();
     }
 }
Exemplo n.º 5
0
 public static BasicSession GetSession(int sessionId)
 {
     using (HELPSEntities ctx = new HELPSEntities())
     {
         return ctx.prcGetSession(sessionId).FirstOrDefault();
     }
 }
Exemplo n.º 6
0
 public static BasicSessionBooking GetSessionBooking(int sessionId, string studentId)
 {
     using (HELPSEntities ctx = new HELPSEntities())
     {
         return ctx.prcGetSessionBooking(sessionId, studentId).FirstOrDefault();
     }
 }
Exemplo n.º 7
0
 public static void CancelWorkshopBooking(int workshopId, string studentId, int userId)
 {
     using (HELPSEntities ctx = new HELPSEntities())
     {
         ctx.prcCancelWorkshopBooking(workshopId, studentId, userId);
     }
 }
Exemplo n.º 8
0
 public static List<Lecturer> ListLecturers(bool? active)
 {
     using (HELPSEntities ctx = new HELPSEntities())
     {
         return ctx.prcListLecturers(active).ToList();
     }
 }
Exemplo n.º 9
0
 public static List<BasicWorkshopWaiting> GetWorkshopWaitingList(int workshopId)
 {
     using (HELPSEntities ctx = new HELPSEntities())
     {
         return ctx.prcGetWorkshopWaitingList(workshopId).ToList();
     }
 }
Exemplo n.º 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);
     }
 }
Exemplo n.º 11
0
 public static Workshop GetWorkshopDetail(int workshopId)
 {
     using (HELPSEntities ctx = new HELPSEntities())
     {
         return ctx.prcGetWorkshopDetail(workshopId).FirstOrDefault();
     }
 }
Exemplo n.º 12
0
 public static int?[] GetProgramWorkshops(int programId)
 {
     using (HELPSEntities ctx = new HELPSEntities())
     {
         return ctx.prcGetProgramWorkshops(programId).ToArray();
     }
 }
Exemplo n.º 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);
     }
 }
Exemplo n.º 14
0
 public static Student GetStudent(string studentId)
 {
     using (HELPSEntities ctx = new HELPSEntities())
     {
         return ctx.prcGetStudent(studentId).FirstOrDefault();
     }
 }
Exemplo n.º 15
0
 public static List<WorkShopSet> ListWorkShopSets(bool? active)
 {
     using (HELPSEntities ctx = new HELPSEntities())
     {
         return ctx.prcListWorkShopSets(active).ToList();
     }
 }
Exemplo n.º 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();
     }
 }
Exemplo n.º 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);
     }
 }
Exemplo n.º 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);
            }
        }
Exemplo n.º 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);
     }
 }
Exemplo n.º 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();
     }
 }
Exemplo n.º 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();
     }
 }