Exemplo n.º 1
0
        /// <summary>
        /// 设置排序链接
        /// </summary>
        protected void SetOrderByLink()
        {
            //处理URL地址
            string url = TextFilter.FilterHtml(TextFilter.FilterScript(GameRequest.GetUrl()));
            Regex  reg = new Regex(@"(&|\?)?orderby=[0-9]{1}&method=(down|up){1}");

            url = reg.Replace(url, "");

            orderDefault = url;
            int indexOf = url.IndexOf("?");

            if (indexOf == -1)
            {
                url += "?";
            }
            else
            {
                url += "&";
            }

            //初始化排序链接
            orderCountLink = url + "orderby=1&method=down";
            orderPriceLink = url + "orderby=2&method=down";
            orderTimeLink  = url + "orderby=3&method=down";

            //参数验证
            if (orderField <= 0 || orderField > 3 || (orderMethod != "down" && orderMethod != "up"))
            {
                return;
            }

            //根据参数改变排序链接
            string newLink = string.Empty;

            if (orderMethod == "down")
            {
                newLink = string.Format("{0}orderby={1}&method=up", url, orderField);
            }
            else
            {
                newLink = string.Format("{0}orderby={1}&method=down", url, orderField);
            }
            switch (orderField)
            {
            case 1:
                orderCountLink = newLink;
                break;

            case 2:
                orderPriceLink = newLink;
                break;

            case 3:
                orderTimeLink = newLink;
                break;
            }
        }
Exemplo n.º 2
0
        /// <summary>
        /// 初始化页面基类
        /// </summary>
        public UCPageBase()
        {
            //aideWebsiteFacade = new NativeWebFacade();
            //aideUserFacade = new AccountsFacade();

            LogonUrl    = "/Login.aspx";
            RawUrl      = GameRequest.GetUrl();
            RedirectUrl = Utility.UrlDecode(GameRequest.GetQueryString("redirectUrl"));
        }
Exemplo n.º 3
0
 public UCPageBase()
 {
     this.LogonUrl    = "/Login.aspx";
     this.RawUrl      = HttpUtility.UrlEncode(GameRequest.GetUrl());
     this.RedirectUrl = Utility.UrlDecode(GameRequest.GetQueryString("redirectUrl"));
 }