protected async override Task OnInitializedAsync()
        {
            NotificationValues = await SessionStorageService.GetItemAsync <NotificationNames>(Id);

            DefaultSelectedNotificationType    = "Select Notification Type";
            DefaultSelectedNotificationChannel = "Select Notification Channel";
            if (!string.IsNullOrEmpty(Id))
            {
                var id = int.Parse(Id);
                if (id > 0)
                {
                    notificationTemplateCrtVM = await NotificationTemplateService.FetchByIdAsync(id);

                    NotificationId = notificationTemplateCrtVM.Id;

                    DefaultSelectedNotificationType       = NotificationValues.NotificationTypeName == null
                        ? DefaultSelectedNotificationType = "Select Notification Type" : NotificationValues.NotificationTypeName;

                    DefaultSelectedNotificationChannel       = NotificationValues.NotificationChannelName == null
                        ? DefaultSelectedNotificationChannel = "Select Notification Channel" : NotificationValues.NotificationChannelName;
                }

                notificationTypeVMs = await NotificationTypeService.FetchAllAsync();

                notificationChannelVMs = await NotificationChannelService.FetchAllAsync();
            }
        }
Example #2
0
 protected async override Task OnInitializedAsync()
 {
     notificationChannelVM = await NotificationChannelService.FetchAllAsync();
 }