public async Task <ActionResult> ManageEventData(string eventId, string clientTimeZone) { var context = this.Request.GetOwinContext(); var userObjectId = context.Authentication.User.GetUserObjectId(); TZConvert.TryIanaToWindows(clientTimeZone, out string windowsTimeZoneId); var manageEventModel = new ManageEventViewModel() { EventId = eventId, ClientTimeZone = clientTimeZone, TeamDetails = await this.GetTeamDetailsWhereBothBotAndUsersAreInAsync(userObjectId), TimeZoneList = Common.GetTimeZoneList(), SelectedTimeZoneId = windowsTimeZoneId, EventTypesInfo = new List <Tuple <EventTypes, string> > { Tuple.Create(EventTypes.Birthday, Strings.BirthdayEventTypeName), Tuple.Create(EventTypes.Anniversary, Strings.AnniversaryEventTypeName), Tuple.Create(EventTypes.Holiday, Strings.HolidayEventTypeName), Tuple.Create(EventTypes.Other, Strings.OtherEventTypeName), }, }; if (!string.IsNullOrWhiteSpace(eventId)) { manageEventModel.CelebrationEvent = await this.eventDataProvider.GetEventByIdAsync(eventId, userObjectId); manageEventModel.SelectedTimeZoneId = manageEventModel.CelebrationEvent?.TimeZoneId ?? manageEventModel.SelectedTimeZoneId; } return(this.PartialView(manageEventModel)); }
public ActionResult ManageEvent(string eventId, string clientTimeZone) { var manageEventModel = new ManageEventViewModel() { EventId = eventId, ClientTimeZone = clientTimeZone, }; return(this.View(manageEventModel)); }