public bool UpdateFutreAppointmentFlag(FutureAppointmentFlagViewModel pub) { IDatabase db = RedisConnection.ConnectionMultiplexer.GetDatabase(_settings.RedisDatabaseKey); ISubscriber sub = RedisConnection.ConnectionMultiplexer.GetSubscriber(); var serialisedObject = Newtonsoft.Json.JsonConvert.SerializeObject(pub); db.ListLeftPush(RequestSubcriberChannelNames.CallQueueCustomerUpdateAppointmentFlagQueue, serialisedObject); try { sub.Publish(RequestSubcriberChannelNames.CallQueueCustomerUpdateAppointmentFlagChannel, ""); } catch (Exception ex) { var length = db.ListLength(RequestSubcriberChannelNames.CallQueueCustomerUpdateAppointmentFlagQueue); if (length > 0) { _logger.Error("Queue name:" + RequestSubcriberChannelNames.CallQueueCustomerUpdateAppointmentFlagQueue + " and Length:" + length); db.ListLeftPop(RequestSubcriberChannelNames.CallQueueCustomerUpdateAppointmentFlagQueue); } _logger.Error("Exception occurred while publishing Future Appointment Detail. Message: " + ex.Message); _logger.Error("Stack Trace: " + ex.StackTrace); } return(true); }
private void UpdateAppointmentFlag(FutureAppointmentFlagViewModel customer) { _callQueueCustomerRepository.UpdateFutureAppointment(customer); }
private void PersistPaymentData() { bool doEventRegistrationRedirect = false; try { doEventRegistrationRedirect = SaveRegistrationPayment(); } catch (Exception ex) { if (RegistrationFlow != null) { RegistrationFlow.ShippingDetailId = 0; } SetAndDisplayErrorMessage("OOPS! Some error occured while saving details." + ex.Message); doEventRegistrationRedirect = false; } if (doEventRegistrationRedirect) { if (!CustomerId.HasValue || !EventId.HasValue) { return; } Mail(); SendMailForIneligibleCustomer(); UpdateProspectCustomer(CustomerId.Value); UpdateEventCustomerPreApprovedTest(EventId.Value, CustomerId.Value); UpdateEventCustomerIcdAndMedication(EventId.Value, CustomerId.Value); SendMailOnRegistrationOfMammoPatientOnNonMammoEvent(); try { //var eventRepository = IoC.Resolve<IEventRepository>(); //var eventData = eventRepository.GetById(EventId.Value); var customerService = IoC.Resolve <ICustomerService>(); var creatorOrganizationRoleUser = GetCreatorOrganizationRoleUser(); var previousTag = customerService.SetCustomerTag(Customer, EventId.Value, creatorOrganizationRoleUser.Id, EventData.EventDate); //var previousTag = Customer.Tag; TagUpdatedMail(previousTag); var futureAppointment = new FutureAppointmentFlagViewModel { CustomerId = CustomerId.Value, HasFutureAppointment = true, FutureAppointmentDate = EventData.EventDate }; IoC.Resolve <ICallQueueCustomerPublisher>().UpdateFutreAppointmentFlag(futureAppointment); } catch (Exception ex) { var logger = IoC.Resolve <ILogManager>().GetLogger <Global>(); logger.Error("some Error Occurred While Updating future Customers"); logger.Error("Message: " + ex.Message); logger.Error("Stack Trace: " + ex.StackTrace); } SendMailForNonTargetedMember(); SavePreQualificationQuestionAnswer(); if (CallId.HasValue && CallId.Value > 0) { var callCenterCallRepository = IoC.Resolve <Falcon.App.Core.Deprecated.ICallCenterCallRepository>(); callCenterCallRepository.SaveCallDispositionAndIsContacted(CallId.Value, ProspectCustomerTag.BookedAppointment.ToString(), RegistrationFlow.CallQueueCustomerId); } Session["PCPSearchCustomerState"] = Customer.Address.State; var eventService = IoC.Resolve <IEventService>(); var selectedEvent = eventService.GetById(EventId.Value); if (selectedEvent != null) { Session["PCPSearchEventState"] = selectedEvent.State; } RegistrationFlow.SourceCodeId = 0; RegistrationFlow.SourceCode = string.Empty; RegistrationFlow.SourceCodeAmount = 0; RegistrationFlow.ProductId = 0; RegistrationFlow.ShippingDetailId = 0; RegistrationFlow.ShippingOptionId = 0; RegistrationFlow.ShippingAddressId = 0; var setting = IoC.Resolve <ISettings>(); if (setting.CapturePrimaryCarePhysician) { Response.RedirectUser(CustomerType == CustomerType.Existing ? "PrimaryCarePhysician.aspx?Customer=Existing" + "&guid=" + GuId : "PrimaryCarePhysician.aspx?guid=" + GuId); } else { Response.RedirectUser(CustomerType == CustomerType.Existing ? "../AddNotes.aspx?Customer=Existing" + "&guid=" + GuId : "../AddNotes.aspx?guid=" + GuId); } } }