Example #1
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (this.Session["hyuid"] == null || this.Session["hyuid"].ToString() == "")
     {
         ifLogin = "******";
     }
     string strwhere = " and hy_ifsh ='2' ";
     JpPhotography jpPhotography = new JpPhotography();
     ls_totalCount = jpPhotography.SearchdocsByKeyNum(strwhere);
     if (!this.IsPostBack)
     {
         showData("2");
     }
 }
Example #2
0
    private void RptBind()
    {
        if (this.Request.QueryString["page"] != null)
            this.page = int.Parse(this.Request.QueryString["page"].ToString());
        else
            this.page = 1;

        this.txtKeywords.Text = this.keywords;
        txtPageNum.Text = this.pageSize.ToString();
        txtPage.Text = this.page.ToString();

        TPortalClass.JpPhotography JpPhotography = new TPortalClass.JpPhotography();
        TPortalClass.JpCommon JpCommon = new TPortalClass.JpCommon();
        string ls_key = JpCommon.Filter(this.txtKeywords.Text.Trim());

        DataTable dt = new DataTable();
        string ls_where = "  and   hy_content  like '%" + ls_key + "%' ";
        dt = JpPhotography.SearchdocsByKey(ls_where, "   order by hy_ifsh ", Convert.ToInt32(txtPage.Text), 10);
        this.totalCount = JpPhotography.SearchdocsByKeyNum(ls_where);

        rptList.DataSource = dt;

        rptList.DataBind();

        string pageUrl = JpCommon.CombUrlTxt("list_photo.aspx", "page={0}&rnd={1}&keywords={2}",
            "__id__", "" + System.Guid.NewGuid().ToString() + "", "" + this.txtKeywords.Text + "");
        PageContent.InnerHtml = JpCommon.OutPageList(this.pageSize, this.page, this.totalCount, pageUrl, 8);
    }