コード例 #1
0
 public void DataBindToGridview()
 {
     ZWL.BLL.ERPYinZhang MyModel = new ZWL.BLL.ERPYinZhang();
     if (Request.QueryString["Type"].ToString() == "公共印章")
     {
         GVData.DataSource = MyModel.GetList("YinZhangName Like '%" + this.TextBox1.Text + "%' and YinZhangLeiBie='公共印章' order by ID desc");
     }
     else
     {
         GVData.DataSource = MyModel.GetList("YinZhangName Like '%" + this.TextBox1.Text + "%' and YinZhangLeiBie='私人印章' and UserName='******' order by ID desc");
     }
     GVData.DataBind();
     LabPageSum.Text     = Convert.ToString(GVData.PageCount);
     LabCurrentPage.Text = Convert.ToString(((int)GVData.PageIndex + 1));
     this.GoPage.Text    = LabCurrentPage.Text.ToString();
 }
コード例 #2
0
ファイル: PublicSeal.aspx.cs プロジェクト: chocoai/YOA
    public void DataBindToGridview()
    {
        GVData.PageSize  = AspNetPager1.PageSize;
        GVData.PageIndex = AspNetPager1.CurrentPageIndex - 1;
        ZWL.BLL.ERPYinZhang MyModel = new ZWL.BLL.ERPYinZhang();
        DataSet             ds      = new DataSet();

        if (Request.QueryString["Type"].ToString() == "公共印章")
        {
            ds = MyModel.GetList("YinZhangName Like '%" + this.TextBox1.Text + "%' and YinZhangLeiBie='公共印章' order by ID desc");
        }
        else
        {
            ds = MyModel.GetList("YinZhangName Like '%" + this.TextBox1.Text + "%' and YinZhangLeiBie='私人印章' and UserName='******' order by ID desc");
        }
        GVData.DataSource = ds;
        GVData.DataBind();
        AspNetPager1.RecordCount = ds.Tables[0].Rows.Count;
    }