protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { bool pollutantInRequest = LinkSearchBuilder.HasPollutantFilter(Request) || LinkSearchBuilder.HasMediumFilter(Request); bool collapse = !pollutantInRequest; this.cpePollutant.Collapsed = collapse; this.cpePollutant.ClientState = collapse.ToString(); togglePanel(collapse); } else { //If previous search was with only Waste Water enabled we must disable Accidental CheckBox chkAir = (CheckBox)CommonFunctions.ControlTool.FindControlR(this, "chkAir"); CheckBox chkWater = (CheckBox)CommonFunctions.ControlTool.FindControlR(this, "chkWater"); CheckBox chkSoil = (CheckBox)CommonFunctions.ControlTool.FindControlR(this, "chkSoil"); if (!chkAir.Checked && !chkWater.Checked && !chkSoil.Checked) { CheckBox chkAccidental = (CheckBox)CommonFunctions.ControlTool.FindControlR(this, "chkAccidental"); chkAccidental.Checked = false; // for some reason .Net an't figure out how to make .Net enabled and JS .disabled work together, so we do it this way ScriptManager.RegisterStartupScript(chkAccidental, chkAccidental.GetType(), this.UniqueID, "PRTLoadValidation()", true); } } }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { Filter = LinkSearchBuilder.GetAccidentalFilter(Request); setAccidental(); } }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { Filter = LinkSearchBuilder.GetWasteReceiverFilter(Request); populateCountry(); } }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { Filter = LinkSearchBuilder.GetPollutantFilter(Request); populatePollutantGroups(); } }
private PollutantFilter getPollutantFilter(CommandEventArgs e) { string arg = e.CommandArgument.ToString(); string[] codeAndLevel = arg.Split('&'); if (codeAndLevel.Length < 2) { return(null); //safe check, must have min two value } return(LinkSearchBuilder.GetPollutantFilter(codeAndLevel[0], Convert.ToInt32(codeAndLevel[1]))); }
private ActivityFilter getActivityFilter(CommandEventArgs args) { string arg = args.CommandArgument.ToString(); string[] codes = arg.Split('&'); if (codes.Length < 2) { return(null); //safe check, must have min two value } return(LinkSearchBuilder.GetActivityFilter(SearchFilter.ActivityFilter, codes[0], codes[1])); }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { Filter = LinkSearchBuilder.GetWasteTypeFilter(Request); setSelectedValues(); chkWasteNonHazardous.Attributes.Add("onclick", "WTValidation()"); chkWasteHazardousCountry.Attributes.Add("onclick", "WTValidation()"); chkWasteHazardousTransboundary.Attributes.Add("onclick", "WTValidation()"); } }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { Filter = LinkSearchBuilder.GetMediumFilter(Request); setSelectedMediums(); chkAir.Attributes.Add("onclick", "PRTValidation()"); chkSoil.Attributes.Add("onclick", "PRTValidation()"); chkWater.Attributes.Add("onclick", "PRTValidation()"); } }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { Filter = LinkSearchBuilder.GetWasteTreatmentFilter(Request); setSelectedValues(); chkTreatmentRecovery.Attributes.Add("onclick", "WTValidation()"); chkTreatmentDisposal.Attributes.Add("onclick", "WTValidation()"); chkTreatmentUnspecified.Attributes.Add("onclick", "WTValidation()"); } }
/// <summary> /// new search on facility click /// </summary> protected void onFacilitySearchClick(object sender, CommandEventArgs e) { // create facility search filter from activity search criteria FacilitySearchFilter filter = FilterConverter.ConvertToFacilitySearchFilter(SearchFilter); // create pollutant filter filter.PollutantFilter = getPollutantFilter(e); // set medium filter filter.MediumFilter = LinkSearchBuilder.GetMediumFilter(false, false, false, true); // go to facility levels page LinkSearchRedirecter.ToFacilitySearch(Response, filter); }
/// <summary> /// load completed, perserve scroll /// </summary> protected override void OnLoadComplete(EventArgs e) { base.OnLoadComplete(e); if (!IsPostBack) { //if filter is in request, search will be invoked from the start if (LinkSearchBuilder.HasWasteTransferTimeSeriesFilter(Request)) { WasteTransferTimeSeriesFilter filter = this.ucSearchOptions.PopulateFilter(); doSearch(filter, EventArgs.Empty); } } }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { bool activityInRequest = LinkSearchBuilder.HasActivityFilter(Request); bool collapse = !activityInRequest; this.cpeActivity.Collapsed = collapse; this.cpeActivity.ClientState = collapse.ToString(); togglePanel(collapse); } }
/// <summary> /// invoke pollutant search search for this row /// </summary> protected void onWasteSearchClick(object sender, CommandEventArgs e) { string code = e.CommandArgument.ToString(); // create pollutant search filter WasteTransferSearchFilter filter = FilterConverter.ConvertToWasteTransferSearchFilter(SearchFilter); // create waste type filter according to command argument filter.WasteTypeFilter = LinkSearchBuilder.GetWasteTypeFilter(code); // go to waste search LinkSearchRedirecter.ToWasteTransfers(Response, filter); }
/// <summary> /// new search on facility click /// </summary> protected void onFacilitySearchClick(object sender, CommandEventArgs e) { string code = e.CommandArgument.ToString(); // create facility search filter from activity search criteria FacilitySearchFilter filter = FilterConverter.ConvertToFacilitySearchFilter(SearchFilter); // create waste type filter according to command argument filter.WasteTypeFilter = LinkSearchBuilder.GetWasteTypeFilter(code); // go to facility levels page LinkSearchRedirecter.ToFacilitySearch(Response, filter); }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { bool pollutantInRequest = LinkSearchBuilder.HasPollutantFilter(Request); //|| LinkSearchBuilder.HasMediumFilter(Request); bool collapse = !pollutantInRequest; this.cpePollutant.Collapsed = collapse; this.cpePollutant.ClientState = collapse.ToString(); togglePanel(collapse); } }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { // Look for filter from link search FacilityLocationFilter filter = LinkSearchBuilder.GetFacilityLocationFilter(Request); // Only if we have nothing from the links search, look into the cookies if (filter != null) { this.txFacilityName.Text = filter.FacilityName; this.txFacilityTown.Text = filter.CityName; } } }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { bool wasteInRequest = LinkSearchBuilder.HasWasteTypeFilter(Request) || LinkSearchBuilder.HasWasteTreatmentFilter(Request) || LinkSearchBuilder.HasWasteReceiverFilter(Request); bool collapse = !wasteInRequest; this.cpeWaste.Collapsed = collapse; this.cpeWaste.ClientState = collapse.ToString(); togglePanel(collapse); } }
/// <summary> /// load completed, perserve scroll /// </summary> protected override void OnLoadComplete(EventArgs e) { base.OnLoadComplete(e); if (!IsPostBack) { //if filter is in request, search will be invoked from the start if (LinkSearchBuilder.HasPollutantReleaseSearchFilter(Request)) { PollutantReleaseSearchFilter filter = this.ucSearchOptions.PopulateFilter(); doSearch(filter, EventArgs.Empty); } } // When load completed, perserve scroll position ScriptManager.RegisterStartupScript(Page, typeof(string), this.UniqueID, "Sys.WebForms.PageRequestManager.getInstance().add_endRequest(SetScroll);", true); }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { // Look for filter from link search Filter = LinkSearchBuilder.GetYearFilter(Request); // Only if we have nothing from the links search, look into the cookies if (Filter == null) { Filter = CookieStorage.GetYearFilter(Request); } // Populate populateYear(); } }
/// <summary> /// new search on facility click /// </summary> protected void onFacilitySearchClick(object sender, CommandEventArgs e) { string[] args = e.CommandArgument.ToString().Split('¤'); if (args == null || args.Length != 2) { return; // safe check } string facilityName = args[0]; string treatment = args[1].ToUpper().Trim(); // create facility search filter FacilitySearchFilter filter = FilterConverter.ConvertToFacilitySearchFilter(SearchFilter); // wastetype filter.WasteTypeFilter = new WasteTypeFilter(); filter.WasteTypeFilter.NonHazardousWaste = false; filter.WasteTypeFilter.HazardousWasteCountry = false; filter.WasteTypeFilter.HazardousWasteTransboundary = true; // receiver filter.WasteReceiverFilter = new WasteReceiverFilter(); filter.WasteReceiverFilter.CountryID = QueryLayer.ListOfValues.GetCountry(CountryCode).LOV_CountryID; // location filter.FacilityLocationFilter = new FacilityLocationFilter(); filter.FacilityLocationFilter.FacilityName = facilityName; filter.FacilityLocationFilter.CityName = String.Empty; // treatmentSafe check, make sure a treatment is present in order to get result bool unspec = treatment.Equals("U"), rec = treatment.Equals("R"), disp = treatment.Equals("D"); if (!disp && !rec && !unspec) { // safe check, make sure a treatment is present in order to get result filter.WasteTreatmentFilter = LinkSearchBuilder.GetWasteTreatmentFilter(true, true, true); } else { filter.WasteTreatmentFilter = LinkSearchBuilder.GetWasteTreatmentFilter(unspec, rec, disp); } // create new facility search LinkSearchRedirecter.ToFacilitySearch(Response, filter); }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { Filter = LinkSearchBuilder.GetActivityFilter(Request); if (Filter == null) { populateSectors(SelectedActivityType()); } else { populateSectors(Filter.ActivityType); populateActivityType(Filter.ActivityType); } } // Only show warning image if activity type is Annex I imgAlert.Visible = (SelectedActivityType() == ActivityFilter.Type.AnnexI); }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { this.plTransfers.Visible = includeTransfers; Filter = LinkSearchBuilder.GetMediumFilter(Request); setSelectedMediums(); // Disabled until changes are finished // Add js validation functionality for checkboxes chkAir.Attributes.Add("onclick", "PRTValidation()"); chkWater.Attributes.Add("onclick", "PRTValidation()"); chkSoil.Attributes.Add("onclick", "PRTValidation()"); if (includeTransfers) { chkWasteWater.Attributes.Add("onclick", "PRTValidation()"); } } }
private WasteTypeFilter getWasteTypeFilter(CommandEventArgs args) { string code = args.CommandArgument.ToString(); return(LinkSearchBuilder.GetWasteTypeFilter(code)); }
private static MediumFilter getMediumFilter(CommandEventArgs args) { return(LinkSearchBuilder.GetMediumFilter(true, true, true, false)); }