/// <summary> /// This method catches the the value of the site dropdownlist when changed /// and displays the active units for that site. /// <summary> /// <param name="sender"></param> /// <param name="e"></param> protected void SiteDropDownList_SelectedIndexChanged(object sender, EventArgs e) { SelectedSiteID.Text = SiteDropDownList.SelectedValue; UnitsListView.Visible = true; seeArchive = false; RevealButton.Text = "Show Archived"; ArchivedUnitsListView.DataBind(); UnitsListView.DataBind(); }
/// <summary> /// when the view active/archive is clicked, this changes the chosen ods for all listviews to the other ods. /// if the archived ods is being used, then the active ods is set, and vice-versa. /// </summary> /// <param name="sender"></param> /// <param name="e"></param> protected void ToggleView(object sender, EventArgs e) { if (seeArchive) { seeArchive = false; UnitsListView.Visible = true; UnitsListView.DataBind(); ArchivedUnitsListView.Visible = false; RevealButton.Text = "Show Archived"; } else { seeArchive = true; ArchivedUnitsListView.Visible = true; ArchivedUnitsListView.DataBind(); UnitsListView.Visible = false; RevealButton.Text = "Show Active"; } }