コード例 #1
0
        public Response UpdateSessionBooking(UpdateSessionBooking update)
        {
            try
            {
                base.CheckApplicationKey();

                if (update == null)
                {
                    return new Response()
                    {
                        IsSuccess = false,
                        DisplayMessage = ErrorMessages.UPDATE_REQ_ERROR
                    };
                }

                SessionDb.UpdateSessionBooking(update);
            }
            catch (Exception e)
            {
                string msg = CreateExceptionMessage(e);
                return new Response()
                {
                    IsSuccess = false,
                    DisplayMessage = string.Format(ErrorMessages.UPDATE_SESSION_BOOKING_ERROR, msg)
                };
            }

            return new Response()
            {
                IsSuccess = true
            };
        }
コード例 #2
0
ファイル: SessionDb.cs プロジェクト: paul-pagnan/helpsAPI
 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);
     }
 }