Exemplo n.º 1
0
 private async Task LoadBuildings()
 {
     BuildingBox.ClearValue(ItemsControl.ItemsSourceProperty);
     BuildingBox.DisplayMemberPath = "Name";
     BuildingBox.SelectedValuePath = "BuildingID";
     BuildingBox.ItemsSource = await roomCore.GetAssignedBuildingsForConferenceAsync(UserCredentials.Conference.ConferenceId);
     RoomBox.ClearValue(ItemsControl.ItemsSourceProperty);
 }
Exemplo n.º 2
0
        private async Task LoadBuildings()
        {
            BuildingBox.ClearValue(ItemsControl.ItemsSourceProperty);
            BuildingBox.DisplayMemberPath = "Name";
            BuildingBox.SelectedValuePath = "BuildingID";
            BuildingBox.ItemsSource       = await roomCore.GetAssignedBuildingsForConferenceAsync(UserCredentials.Conference.ConferenceId);

            if (RoomBox.SelectedIndex >= 0)
            {
                lastSelectedRoom = (RoomDTO)RoomBox.SelectedItem;
            }
            RoomBox.ClearValue(ItemsControl.ItemsSourceProperty);
            if (lastSelectedRoom != null)
            {
                BuildingBox.SelectedValue = lastSelectedRoom.BuildingID;
            }
        }