/// <summary> /// Handles the SelectLocation event of the lpLocation control. /// </summary> /// <param name="sender">The source of the event.</param> /// <param name="e">The <see cref="EventArgs"/> instance containing the event data.</param> protected void lpLocation_SelectLocation(object sender, EventArgs e) { Location location = lpLocation.Location; if (location != null) { CheckinManagerHelper.SetSelectedLocation(this, lpLocation, location.Id, CurrentCampusId); } else { CheckinManagerHelper.SetSelectedLocation(this, lpLocation, 0, CurrentCampusId); } }
/// <summary> /// Shows the settings. /// </summary> private void ShowSettings() { ResetControlVisibility(); CampusCache campus = GetCampusFromContext(); if (campus == null) { ShowWarningMessage("Please select a Campus.", true); return; } // If the Campus selection has changed, we need to reload the LocationItemPicker with the Locations specific to that Campus. if (campus.Id != CurrentCampusId) { CurrentCampusId = campus.Id; lpLocation.NamedPickerRootLocationId = campus.LocationId.GetValueOrDefault(); } var locationId = CheckinManagerHelper.GetSelectedLocation(this, campus, lpLocation); if (!locationId.HasValue) { ShowWarningMessage("Please select a Location.", false); } CheckinManagerHelper.SetSelectedLocation(this, lpLocation, locationId, CurrentCampusId); if (this.Response.IsRequestBeingRedirected) { return; } InitializeSubPageNav(locationId.Value); // If the Location changed, we need to reload the settings. if (locationId != CurrentLocationId) { CurrentLocationId = locationId.Value; LoadSettings(); } }