protected override void LoadViewState( object savedState )
{
base.LoadViewState( savedState );
var currentPickerMode = ViewState["CurrentPickerMode"] as LocationPickerMode?;
if (currentPickerMode.HasValue)
{
this.CurrentPickerMode = currentPickerMode.Value;
}
var locationId = ViewState["LocationId"] as int?;
if ( locationId.HasValue )
{
var location = new LocationService( new RockContext() ).Get( locationId.Value );
if ( location != null )
{
this.Location = location;
}
}
}