public async Task <AppointmentChangeRequestNotification> PublishAppointmentChangeRequestNotification(AppointmentChangeRequest appointmentChangeRequest, DateTime timestamp, string message) { var notification = new AppointmentChangeRequestNotification(); await Create(notification); notification.IsActive = true; notification.AppointmentChangeRequest = appointmentChangeRequest; notification.Timestamp = timestamp; notification.Status = NotificationStatus.Unread; notification.Message = message; return(await Update(notification) as AppointmentChangeRequestNotification); }
public override DataTemplate SelectTemplate(object item, DependencyObject container) { var selectedTemplate = SurgeryNotificationTemplate; var notification = item as Notification; selectedTemplate = notification switch { SurgeryNotification _ => SurgeryNotificationTemplate, SurgeryRequestNotification _ => SurgeryRequestNotificationTemplate, AppointmentRequestNotification _ => AppointmentRequestNotificationTemplate, AppointmentChangeRequestNotification _ => AppointmentChangeRequestNotificationTemplate, _ => selectedTemplate }; return(selectedTemplate); } }