public IHttpActionResult SaveAppointment(AppointmentViewModel model) { var userId = model.CreatedBy = User.Identity.GetUserId <long>(); var responseId = _appointmentService.AppointmentInsert(model.ToModel()); return(Ok(responseId.SuccessResponse("Appointment saved successfully"))); }
public IHttpActionResult UpdateAppointment(AppointmentViewModel model) { var userId = User.Identity.GetUserId <long>(); string message = "Appointment Updated successfully"; _appointmentService.AppointmentUpdate(model.ToModel()); if (Convert.ToBoolean(model.IsCancel)) { message = "Appointment Cancelled successfully"; } return(Ok(message.SuccessResponse())); }
public Response <AppointmentViewModel> CancelAppointment(AppointmentViewModel model) { const string apiUrl = baseRoute + "CancelAppointment"; return (communicationManager.Put <AppointmentModel, Response <AppointmentModel> >(model.ToModel(), apiUrl) .ToViewModel()); }
/// <summary> /// Updates the appointment /// </summary> /// <param name="appointment">appointment</param> /// <returns></returns> public Response <AppointmentViewModel> UpdateAppointment(AppointmentViewModel appointment) { const string apiUrl = baseRoute + "UpdateAppointment"; return (communicationManager.Put <AppointmentModel, Response <AppointmentModel> >(appointment.ToModel(), apiUrl) .ToViewModel()); }