Esempio n. 1
0
    private AreaFilter getAreaFilter(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.GetAreaFilter(SearchFilter.AreaFilter, codes[0], codes[1]));
    }
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            // Look for filter from link search
            Filter = LinkSearchBuilder.GetAreaFilter(Request);

            // Only if we have nothing from the links search, look into the cookies
            if (Filter == null)
            {
                Filter = CookieStorage.GetAreaFilter(Request);
            }

            // Populate
            PopulateRegionType();
            populateAreaCountry();
        }
    }