From b52137e9b81dfbe26d56e4bed71f3e958dbfc15f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Halil=20=C4=B0brahim=20Kalkan?= Date: Sat, 23 Jan 2021 21:19:19 +0300 Subject: [PATCH] Update New.cshtml.cs --- eventhub/src/EventHub.Web/Pages/Events/New.cshtml.cs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/eventhub/src/EventHub.Web/Pages/Events/New.cshtml.cs b/eventhub/src/EventHub.Web/Pages/Events/New.cshtml.cs index bdc1d1e..94b7c89 100644 --- a/eventhub/src/EventHub.Web/Pages/Events/New.cshtml.cs +++ b/eventhub/src/EventHub.Web/Pages/Events/New.cshtml.cs @@ -38,6 +38,11 @@ namespace EventHub.Web.Pages.Events EndTime = DateTime.Now.ClearTime().AddDays(1).AddHours(21) }; + await FillOrganizationsAsync(); + } + + private async Task FillOrganizationsAsync() + { var result = await _organizationAppService.GetMyOrganizationsAsync(); Organizations = result.Items.Select( organization => new SelectListItem @@ -63,6 +68,7 @@ namespace EventHub.Web.Pages.Events catch (Exception exception) { ShowAlert(exception); + await FillOrganizationsAsync(); return Page(); } }