public WasteReceiverFilter PopulateFilter() { WasteReceiverFilter filter = new WasteReceiverFilter(); filter.CountryID = Convert.ToInt32(this.cbReceivingCountry.SelectedValue); return(filter); }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { Filter = LinkSearchBuilder.GetWasteReceiverFilter(Request); populateCountry(); } }
public static WasteReceiverFilter GetWasteReceiverFilter(HttpRequest request) { if (HasWasteReceiverFilter(request)) { WasteReceiverFilter filter = new WasteReceiverFilter(); filter.CountryID = toInt(request.QueryString[WASTERECEIVER]); return(filter); } return(null); }
// -------------------------------------------------------------------------------------------------------------------- // WasteReceiver filter // -------------------------------------------------------------------------------------------------------------------- #region WasteReceiverFilter private static string SerializeToUrl(WasteReceiverFilter filter) { string result = String.Empty; if (filter != null) { result += addParameter(WASTERECEIVER, filter.CountryID); } return(result); }
//creates header for waste receiver and adds to dictionary protected static void addWasteReceiver(Dictionary <string, string> header, WasteReceiverFilter filter) { if (filter != null) { string key = Resources.GetGlobal("Common", "ReceivingCountry"); string value = String.Empty; if (filter.CountryID == -1) { value = Resources.GetGlobal("Common", "AllReceivingCountries"); } else { string code = ListOfValues.GetCountry((int)filter.CountryID).Code; value = LOVResources.CountryName(code); } header.Add(key, value); } }
public void PopulateFilters(out WasteTypeFilter wasteTypeFilter, out WasteTreatmentFilter wasteTreatmentFilter, out WasteReceiverFilter wasteReceiverFilter) { if (!isCollapsed()) { wasteTypeFilter = this.ucWasteTypeSearchOption.PopulateFilter(); wasteTreatmentFilter = this.ucWasteTreatmenSearchOption.PopulateFilter(); wasteReceiverFilter = this.ucWasteReceiverSearchOption.PopulateFilter(); } else { wasteTypeFilter = null; wasteTreatmentFilter = null; wasteReceiverFilter = null; } }