public JoinEventWindow(SearchEventUserControl dataGrid, int eventID, string eventName, byte[] rowID) { InitializeComponent(); DataGrid = dataGrid; eventIDBox.Text = eventID.ToString(); eventNameBox.Text = eventName; client = new HttpClient { BaseAddress = new Uri("https://localhost:44377/") }; client.DefaultRequestHeaders.Add("Authorization", (string)App.Current.Properties["AuthToken"]); client.DefaultRequestHeaders.Add("x-rowid", JsonSerializer.Serialize(rowID)); }
public EditEventWindow(SearchEventUserControl dataGrid, Event selectedEvent) { InitializeComponent(); DataGrid = dataGrid; client = new HttpClient { BaseAddress = new Uri("https://localhost:44377/") }; client.DefaultRequestHeaders.Add("Authorization", (string)App.Current.Properties["AuthToken"]); localEvent = selectedEvent; eventID.Text = selectedEvent.EventID.ToString(); eventName.Text = selectedEvent.Name; eventType.Text = selectedEvent.EventType; eventDateTime.DisplayDate = selectedEvent.Date; eventLocation.Text = selectedEvent.Location; eventMaxParticipants.Value = selectedEvent.MaxNumberOfCharacters; eventDescription.Text = selectedEvent.Description; }