Example #1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!EX_Admin.Power("theme_advert_list", "广告位页面列表"))
            {
                PageReturnMsg = PageNoPowerMsg();
            }

            PageSize = RequestTool.getpageSize(25);
            id       = RequestTool.RequestInt("id", 0);
            //int tid = RequestTool.RequestInt("tid", 0);
            string themeid = "0";

            themes = B_Lebi_Theme.GetList("id in (select Theme_id from [lebi_Language])", "");
            foreach (Lebi_Theme theme in themes)
            {
                themeid += "," + theme.id;
            }
            key          = RequestTool.RequestString("key");
            string where = "Theme_id in (" + themeid + ")";
            if (key != "")
            {
                where += " and (Code like lbsql{'%" + key + "%'} or [Description] like lbsql{'%" + key + "%'})";
            }
            models = B_Lebi_Theme_Advert.GetList(where, "Theme_id desc,Sort desc", PageSize, page);
            int recordCount = B_Lebi_Theme_Advert.Counts(where);

            PageString = Pager.GetPaginationString("?page={0}&key=" + key, page, PageSize, recordCount);
        }
Example #2
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!EX_Admin.Power("theme_list", "模板列表"))
            {
                PageReturnMsg = PageNoPowerMsg();
            }

            string where = "1=1";
            PageSize     = RequestTool.getpageSize(25);
            models       = B_Lebi_Theme.GetList(where, "Sort desc", PageSize, page);
            int recordCount = B_Lebi_Theme.Counts(where);

            PageString = Pager.GetPaginationString("?page={0}", page, PageSize, recordCount);
        }
Example #3
0
        public string Themeslist(int id)
        {
            string            str  = "";
            List <Lebi_Theme> list = B_Lebi_Theme.GetList("", "Sort desc");

            foreach (Lebi_Theme model in list)
            {
                string sel = "";
                if (id == model.id)
                {
                    sel = "selected";
                }
                str += "<option value=\"" + model.id + "\" " + sel + ">" + model.Name + "</option>";
            }
            return(str);
        }