Beispiel #1
0
        protected int Count(int id)
        {
            int count = 0;

            count = B_Lebi_Area.Counts("Parentid=" + id);
            return(count);
        }
Beispiel #2
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!EX_Admin.Power("area_list", "地区列表"))
            {
                PageReturnMsg = PageNoPowerMsg();
            }

            pid          = RequestTool.RequestInt("pid", 0);
            key          = RequestTool.RequestString("key");
            PageSize     = RequestTool.getpageSize(25);
            string where = "Parentid=" + pid;
            //if (pid > 0)
            //    where += " and Parentid="+pid;
            if (key != "")
            {
                where += " and [Name] like lbsql{'%" + key + "%'}";
            }
            //PageSize = 5;
            models = B_Lebi_Area.GetList(where, "Sort desc", PageSize, page);
            int recordCount = B_Lebi_Area.Counts(where);

            PageString = Pager.GetPaginationString("?page={0}&pid=" + pid + "&key=" + key, page, PageSize, recordCount);
        }
Beispiel #3
0
 /// <summary>
 /// 子区域数量
 /// </summary>
 /// <param name="pid"></param>
 /// <returns></returns>
 public int SonArea(int pid)
 {
     return(B_Lebi_Area.Counts("Parentid=" + pid));
 }