Example #1
0
        private List <SqlParameter> BuildParams(GroupSchedulingSearchModel model)
        {
            var spParameters = new List <SqlParameter>();

            spParameters.AddRange(new List <SqlParameter> {
                new SqlParameter("GroupDetailID", model.GroupDetailID),
                new SqlParameter("CancelReasonID", model.CancelReasonID),
                new SqlParameter("CancelComment", (object)model.CancelComment ?? DBNull.Value),
                new SqlParameter("AppointmentID", (object)model.AppointmentID ?? DBNull.Value),
                new SqlParameter("ModifiedOn", (object)model.ModifiedOn ?? DateTime.Now)
            });
            return(spParameters);
        }
Example #2
0
        /// <summary>
        /// Cancel the Group Schedules.
        /// </summary>
        /// <param name="model">Group Scheduling search model.</param>
        /// <returns></returns>
        public Response <GroupSchedulingSearchModel> CancelGroupAppointment(GroupSchedulingSearchModel model)
        {
            var groupScheduleSearchRepository = _unitOfWork.GetRepository <GroupSchedulingSearchModel>(SchemaName.Scheduling);

            if (model.IsCancelAllAppoitment)
            {
                model.AppointmentID = null;
            }

            var procParams = BuildParams(model);

            return(_unitOfWork.EnsureInTransaction(
                       groupScheduleSearchRepository.ExecuteNQStoredProc,
                       "usp_CancelAppointmentsForGroup",
                       procParams,
                       forceRollback: model.ForceRollback.GetValueOrDefault(false)
                       ));
        }
Example #3
0
        /// <summary>
        /// Cancels the whole GroupAppointment.
        /// </summary>
        /// <param name="model">AppointmentCancel Model.</param>
        /// <returns></returns>
        public Response <GroupSchedulingSearchModel> CancelGroupAppointment(GroupSchedulingSearchModel model)
        {
            const string apiUrl = baseRoute + "CancelGroupAppointment";

            return(_communicationManager.Put <GroupSchedulingSearchModel, Response <GroupSchedulingSearchModel> >(model, apiUrl));
        }
 public IHttpActionResult CancelGroupAppointment(GroupSchedulingSearchModel model)
 {
     return(new HttpResult <Response <GroupSchedulingSearchModel> >(_groupSchedulingSearchRuleEngine.CancelGroupAppointment(model), Request));
 }
Example #5
0
 /// <summary>
 /// Cancel the Group Schedules.
 /// </summary>
 /// <param name="model">Group Scheduling search model.</param>
 /// <returns></returns>
 public Response <GroupSchedulingSearchModel> CancelGroupAppointment(GroupSchedulingSearchModel model)
 {
     return(_groupSchedulingSearchService.CancelGroupAppointment(model));
 }