示例#1
0
        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));
        }
示例#2
0
        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;
        }