Exemple #1
0
    public WasteReceiverFilter PopulateFilter()
    {
        WasteReceiverFilter filter = new WasteReceiverFilter();

        filter.CountryID = Convert.ToInt32(this.cbReceivingCountry.SelectedValue);
        return(filter);
    }
Exemple #2
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         Filter = LinkSearchBuilder.GetWasteReceiverFilter(Request);
         populateCountry();
     }
 }
Exemple #3
0
 public static WasteReceiverFilter GetWasteReceiverFilter(HttpRequest request)
 {
     if (HasWasteReceiverFilter(request))
     {
         WasteReceiverFilter filter = new WasteReceiverFilter();
         filter.CountryID = toInt(request.QueryString[WASTERECEIVER]);
         return(filter);
     }
     return(null);
 }
Exemple #4
0
        // --------------------------------------------------------------------------------------------------------------------
        // WasteReceiver filter
        // --------------------------------------------------------------------------------------------------------------------
        #region WasteReceiverFilter

        private static string SerializeToUrl(WasteReceiverFilter filter)
        {
            string result = String.Empty;

            if (filter != null)
            {
                result += addParameter(WASTERECEIVER, filter.CountryID);
            }

            return(result);
        }
Exemple #5
0
        //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);
            }
        }
Exemple #6
0
 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;
     }
 }