Beispiel #1
0
 public async Task <HttpResponseMessage> SaveAppointment(Appoinment appoinment)
 {
     return(await ValidateAndHandleOperationExecutionAsync(async() =>
     {
         var result = await _calendarDomainService.SaveAppointment(appoinment);
         var request = await _requestDomainService.GetRequestByRequestId(appoinment.RequestId);
         var entitle = await _entitleDomainService.GetEntitleByCurp(request.EntitleId.ToString());
         var res =
             await
             _requestDomainService.SaveStatusRequestByEntitle(request, true, 202,
                                                              entitle.CURP); // 340 => Cita agendada
         return Request.CreateResponse(HttpStatusCode.OK, result);
     }));
 }