/// <summary> /// 公告数据 /// </summary> public void GongGaoPageBind() { PageBase pb = new PageBase(); pb.TblName = "Tunnel_information"; pb.FldName = "i_id"; pb.ProcedureName = "pagination"; pb.PageSize = pageSize; if (cuttentPage == 0) { cuttentPage = pb.PageIndex; } pb.PageIndex = cuttentPage; int TypeId = 1; pb.StrWhere = " i_sort = " + TypeId + " and i_del=0"; int count = 0; pb.DoCount = 1; mbll.GetList(pb, ref count); //获取总条数 pb.DoCount = 0; List <Tunnel.Model.Tunnel_information> modelList = new List <Tunnel.Model.Tunnel_information>(); modelList = imbll.GetList(pb, ref count);//获取分页结果 //数据绑定 Repeater2.DataSource = modelList; Repeater2.DataBind(); GetDirectories(); }
public void PageBind1() { PageBase pb = new PageBase(); pb.TblName = "Tunnel_information"; pb.FldName = "i_id"; pb.ProcedureName = "pagination"; pb.PageSize = pageSize; if (cuttentPage == 0) { cuttentPage = pb.PageIndex; } pb.PageIndex = cuttentPage; int count = 0; pb.DoCount = 1; string where = " i_sort =" + typeId; if (typeId == 0) { where += " and i_hit=1 "; } string key = ""; if (where.Length > 0) { key += " and i_Title like '%" + TextBox1.Text + "%'"; } else { key += " 1=1 and i_Title like '%" + TextBox1.Text + "%'"; } where += key; pb.StrWhere = where + " and i_del=0"; mbll.GetList(pb, ref count); //获取总条数 pb.DoCount = 0; List <Tunnel.Model.Tunnel_information> modelList = new List <Tunnel.Model.Tunnel_information>(); modelList = mbll.GetList(pb, ref count);//获取分页结果 //数据绑定 Repeater1.DataSource = modelList; Repeater1.DataBind(); //数据分页 MTCPager1.PageSize = pageSize; MTCPager1.RecordCount = count; MTCPager1.PageIndex = cuttentPage; if (count <= pb.PageSize) { MTCPager1.Visible = false; } else { MTCPager1.Visible = true; } }
/// <summary> /// 页面数据绑定 /// </summary> public void PageBind() { PageBase pb = new PageBase(); pb.TblName = "Tunnel_information"; pb.FldName = "i_id"; pb.ProcedureName = "pagination"; pb.PageSize = pageSize; if (cuttentPage == 0) { cuttentPage = pb.PageIndex; } pb.PageIndex = cuttentPage; if (ul.LoginID != 1 && ul.JiaoSe(ul.LoginID) != "系统管理员") { pb.StrWhere = " i_sort = " + TypeId + " and i_user="******" and i_del=0"; } else { pb.StrWhere = " i_sort = " + TypeId + " and i_del=0"; } int count = 0; pb.DoCount = 1; mbll.GetList(pb, ref count); //获取总条数 pb.DoCount = 0; //if (delState == true && pageSize == count) //{ // cuttentPage = cuttentPage - 1; // pb.PageIndex = cuttentPage; //} List <Tunnel.Model.Tunnel_information> modelList = new List <Tunnel.Model.Tunnel_information>(); if (!TextBox1.Text.Trim().Equals("")) { pb.StrWhere += " and i_title like '%" + TextBox1.Text.Trim() + "%' "; } modelList = mbll.GetList(pb, ref count);//获取分页结果 //数据绑定 Repeater1.DataSource = modelList; Repeater1.DataBind(); //数据分页 MTCPager1.PageSize = pageSize; MTCPager1.RecordCount = count; MTCPager1.PageIndex = cuttentPage; if (count <= pb.PageSize) { MTCPager1.Visible = false; } else { MTCPager1.Visible = true; } }
public void PlBind() { List <Tunnel.Model.Tunnel_viewTable> modelList = new List <Tunnel.Model.Tunnel_viewTable>(); PageBase pb = new PageBase(); pb.TblName = "ViewTable"; pb.FldName = "id"; pb.ProcedureName = "pagination"; pb.PageSize = 10; if (cuttentPage == 0) { cuttentPage = pb.PageIndex; } pb.PageIndex = cuttentPage; pb.StrWhere = " TypeId=" + TypeId + " and ObjId =" + Id; int count = 0; pb.DoCount = 1; tbll.GetList(pb, ref count); //获取总条数 pb.DoCount = 0; modelList = tbll.GetList2(pb, ref count); Repeater1.DataSource = modelList; Repeater1.DataBind(); MTCPager1.PageSize = 10; MTCPager1.RecordCount = count; MTCPager1.PageIndex = cuttentPage; if (count <= pb.PageSize) { MTCPager1.Visible = false; } else { MTCPager1.Visible = true; } }
public void PageBind2() { PageBase pb = new PageBase(); pb.TblName = "Tunnel_Index"; pb.FldName = "id"; pb.ProcedureName = "pagination"; pb.PageSize = pageSize; if (cuttentPage == 0) { cuttentPage = pb.PageIndex; } pb.PageIndex = cuttentPage; int count = 0; pb.DoCount = 1; if (where.Length > 0) { if (TextBox1.Text.Trim() != "") { key += " and Title like '%" + TextBox1.Text + "%'"; } } else { if (TextBox1.Text.Trim() != "") { key += " Title like '%" + TextBox1.Text + "%'"; } else { key += " 1=1"; } } //if (TextBox1.Text.Trim()!="") // key += " and Title like ''%" + TextBox1.Text + "%''"; //else // key += " 1=1"; //if (where.Length > 0) //{ // key += " and Title like ''%" + TextBox1.Text + "%''"; // //and typeid not in (1,2,4,9,19,84,85,86,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103) "; //} //else //{ // key += " 1=1 and Title like ''%" + TextBox1.Text + "%'' "; // //and typeid not in (1,2,4,9,19,84,85,86,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103) "; //} where += key + " and del=0 and IsDel=0"; if (tm.GetModel(ul.LoginID).m_bum == 131) { pb.StrWhere = where + " and (bum_bz=" + tm.GetModel(ul.LoginID).m_bum + " or bum_bz=0)"; } else if (tm.GetModel(ul.LoginID).m_bum == 134) { pb.StrWhere = where + " and (bum_bz=" + tm.GetModel(ul.LoginID).m_bum + " or bum_bz=0 or bum_bz=132)"; } else if (ul.JiaoSe(ul.LoginID) != "系统管理员") { pb.StrWhere = where + " and bum_bz=" + tm.GetModel(ul.LoginID).m_bum; } else { pb.StrWhere = where; } mbll.GetList(pb, ref count); //获取总条数 pb.DoCount = 0; List <Tunnel.Model.Tunnel_index> modelList = new List <Tunnel.Model.Tunnel_index>(); modelList = mbll.GetList3(pb, ref count);//获取分页结果 //数据绑定 Repeater1.DataSource = modelList; Repeater1.DataBind(); //数据分页 MTCPager1.PageSize = pageSize; MTCPager1.RecordCount = count; MTCPager1.PageIndex = cuttentPage; if (count <= pb.PageSize) { MTCPager1.Visible = false; } else { MTCPager1.Visible = true; } }
public void PageBind2() { string type = null == Request.QueryString["type"] ? "" : Request.QueryString["type"].ToString().Trim(); //switch (Request.QueryString["type"].ToString()) //{ // case "1": // type = "84,89"; // break; // case "2": // type = "85,90"; // break; // case "3": // type = "86,91"; // break; //} PageBase pb = new PageBase(); pb.TblName = "Tunnel_Index"; pb.FldName = "id"; pb.ProcedureName = "pagination"; pb.PageSize = pageSize; if (cuttentPage == 0) { cuttentPage = pb.PageIndex; } pb.PageIndex = cuttentPage; int count = 0; pb.DoCount = 1; key += " 1=1 and Title like '%" + TextBox1.Text + "%' and typeid in (" + type + ")"; if (ul.LoginID != 1 && ul.JiaoSe(ul.LoginID) != "系统管理员") { pb.StrWhere = key + " and userid=" + ul.LoginID + " and del=0"; } else { pb.StrWhere = key + " and del=0"; } mbll.GetList(pb, ref count); //获取总条数 pb.DoCount = 0; List <Tunnel.Model.Tunnel_index> modelList = new List <Tunnel.Model.Tunnel_index>(); modelList = mbll.GetList3(pb, ref count);//获取分页结果 //数据绑定 Repeater1.DataSource = modelList; Repeater1.DataBind(); //数据分页 MTCPager1.PageSize = pageSize; MTCPager1.RecordCount = count; MTCPager1.PageIndex = cuttentPage; if (count <= pb.PageSize) { MTCPager1.Visible = false; } else { MTCPager1.Visible = true; } }
public void PageBind2() { string parentID = null == Request.QueryString["parentID"] ? "" : Request.QueryString["parentID"].ToString().Trim(); PageBase pb = new PageBase(); pb.TblName = "Tunnel_Index"; pb.FldName = "id"; pb.ProcedureName = "pagination"; pb.PageSize = pageSize; if (cuttentPage == 0) { cuttentPage = pb.PageIndex; } pb.PageIndex = cuttentPage; int count = 0; pb.DoCount = 1; if (where.Length > 0) { key += " and Title like '%" + TextBox1.Text + "%' "; } else { key += " 1=1 and Title like '%" + TextBox1.Text + "%' "; } where += key + " and del=0"; if (parentID != "") { where = where + " and typeId=" + parentID; } else { where = where + " and typeId in (47,48,49)"; } if (ul.LoginID != 1 && ul.JiaoSe(ul.LoginID) != "系统管理员") { pb.StrWhere = where + " and userid=" + ul.LoginID; } else { pb.StrWhere = where; } mbll.GetList(pb, ref count); //获取总条数 pb.DoCount = 0; List <Tunnel.Model.Tunnel_index> modelList = new List <Tunnel.Model.Tunnel_index>(); modelList = mbll.GetList3(pb, ref count);//获取分页结果 //数据绑定 Repeater1.DataSource = modelList; Repeater1.DataBind(); //数据分页 MTCPager1.PageSize = pageSize; MTCPager1.RecordCount = count; MTCPager1.PageIndex = cuttentPage; if (count <= pb.PageSize) { MTCPager1.Visible = false; } else { MTCPager1.Visible = true; } }