Пример #1
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!Page.IsPostBack)
     {
         Tunnel.BLL.Tunnel_Remind tr = new Tunnel.BLL.Tunnel_Remind();
         Repeater5.DataSource = tr.GetList("m_type<>2 and m_type<>3 and m_touser=" + ul.LoginID);
         Repeater5.DataBind();
         Label1.Text = Repeater5.Items.Count.ToString();
     }
 }
Пример #2
0
    public void PageBind()
    {
        PageBase pb = new PageBase();

        pb.TblName       = "Tunnel_mail";
        pb.FldName       = "m_id";
        pb.ProcedureName = "pagination";
        pb.PageSize      = 10;
        pb.PageIndex     = 1;
        pb.StrWhere      = " m_sort=0 and m_main = 0 and m_state=0 and m_to = " + ul.LoginID;
        pb.DoCount       = 1;
        mbll.GetList(pb, ref Count); //获取总条数
        pb.DoCount = 0;
        List <Tunnel.Model.Tunnel_mail> modelList = new List <Tunnel.Model.Tunnel_mail>();

        modelList = mbll.GetList(pb, ref Count);//获取分页结果
        //数据绑定
        Repeater1.DataSource = modelList;
        Repeater1.DataBind();
        Tunnel.BLL.Tunnel_Remind tr = new Tunnel.BLL.Tunnel_Remind();
        Repeater5.DataSource = tr.GetList("m_type<>2 and m_type<>3 and m_touser=" + ul.LoginID);
        Repeater5.DataBind();
        Label1.Text = Repeater5.Items.Count.ToString();
    }