コード例 #1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            preurl   = ConfigurationSettings.AppSettings.Get("urldata");
            width    = Request.QueryString["w"];
            key      = Request.QueryString["key"];
            parentid = ConvertUtility.ToInt32(ConfigurationSettings.AppSettings.Get("relax_zoneiddefaut"));
            price    = ConfigurationSettings.AppSettings.Get("relaxprice");
            cipher   = Request.QueryString["link"];
            MobileUtils.GetDetailUrl(EAS.DecryptData(cipher, ConfigurationSettings.AppSettings.Get("vmskey")), ref msisdn, ref cpid, ref vmstransactionid);
            if (!IsPostBack)
            {
                lang = ConvertUtility.ToInt32(Request.QueryString["lang"]);
                if (lang == 1)
                {
                    lblTitle.Text = "Kết quả tìm kiếm";
                }
            }
            if (!string.IsNullOrEmpty(Request.QueryString["cpage"]))
            {
                curpage = ConvertUtility.ToInt32(Request.QueryString["cpage"]);
            }
            //start category list
            int       totalrecord = 0;
            DataTable dtCat       = TintucController.GetAllNewsByKey(key, pagesize, curpage, out totalrecord, parentid);

            rptResult.DataSource     = dtCat;
            rptResult.ItemDataBound += new RepeaterItemEventHandler(rptResult_ItemDataBound);
            rptResult.DataBind();
            Paging1.totalrecord  = totalrecord;
            Paging1.pagesize     = pagesize;
            Paging1.numberpage   = pagenumber;
            Paging1.defaultparam = "?lang=" + Request.QueryString["lang"] + "&display=" + Request.QueryString["display"] + "&w=" + Request.QueryString["w"] + "&catid=" + Request.QueryString["catid"] + "&key=" + Request.QueryString["key"] + "&id=" + Request.QueryString["id"];
            Paging1.queryparam   = "?lang=" + Request.QueryString["lang"] + "&display=" + Request.QueryString["display"] + "&w=" + Request.QueryString["w"] + "&catid=" + Request.QueryString["catid"] + "&key=" + Request.QueryString["key"] + "&id=" + Request.QueryString["id"] + "&cpage=";
            //end category list
            if (lang == 1)
            {
                ltrCount.Text = "Tìm thấy " + totalrecord + " bài";
            }
            else
            {
                ltrCount.Text = "Tim thay " + totalrecord + " bai";
            }
        }