Esempio n. 1
0
        protected override void LoadPage(string themecode, int siteid, string languagecode, string pcode)
        {
            if (CurrentUser.id == 0)
            {
                Response.Redirect(URL("P_Login", "" + HttpUtility.UrlEncode(RequestTool.GetRequestUrlNonDomain()) + "," + GetUrlToken(RequestTool.GetRequestUrlNonDomain()) + ""));
            }
            LoadTheme(themecode, siteid, languagecode, pcode);
            path     = "<a href=\"" + URL("P_Index", "") + "\" class=\"home\" title=\"" + Tag("首页") + "\"><span>" + Tag("首页") + "</span></a><em class=\"home\">&raquo;</em><a href=\"" + URL("P_UserCenter", "") + "\"><span>" + Tag("会员中心") + "</span></a><em>&raquo;</em><a href=\"" + URL("P_UserPointToMoney", "") + "\"><span>" + Tag("积分转换") + "</span></a>";
            key      = Rstring("key");
            dateFrom = Rstring("dateFrom");
            dateTo   = Rstring("dateTo");
            where    = "User_id=" + CurrentUser.id + "";
            if (key != "")
            {
                where += " and (Remark like lbsql{'%" + key + "%'})";
            }
            if (dateFrom != "" && dateTo != "")
            {
                where += " and (datediff(d,Time_Add,'" + dateFrom + "')<=0 and datediff(d,Time_Add,'" + dateTo + "')>=0)";
            }
            user_points = B_Lebi_User_Point.GetList(where, "id desc", PageSize, pageindex);
            int recordCount = B_Lebi_User_Point.Counts(where);

            PageString = Shop.Bussiness.Pager.GetPaginationStringForWeb("?page={0}&key=" + key + "&dateFrom=" + dateFrom + "&dateTo=" + dateTo + "", pageindex, PageSize, recordCount, CurrentLanguage);
        }
Esempio n. 2
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!EX_Admin.Power("userpoint_list", "会员积分列表"))
            {
                PageReturnMsg = PageNoPowerMsg();
            }

            PageSize = RequestTool.getpageSize(25);
            int user_id = RequestTool.RequestInt("user_id", 0);

            key      = RequestTool.RequestString("key");
            dateFrom = RequestTool.RequestString("dateFrom");
            dateTo   = RequestTool.RequestString("dateTo");
            status   = RequestTool.RequestInt("status", 0);
            DateTime lbsql_dateFrom = RequestTool.RequestDate("dateFrom");
            DateTime lbsql_dateTo   = RequestTool.RequestDate("dateTo");

            string where = "1=1";
            if (user_id > 0)
            {
                where += " and User_id=" + user_id;
            }
            if (status > 0)
            {
                where += " and Type_id_PointStatus=" + status + "";
            }
            if (key != "")
            {
                where += " and User_id in (select id from [Lebi_User] where UserName like lbsql{'%" + key + "%'} or RealName like lbsql{'%" + key + "%'})";
            }
            if (dateFrom != "" && dateTo != "")
            {
                where += " and (datediff(d,Time_Add,'" + FormatDate(lbsql_dateFrom) + "')<=0 and datediff(d,Time_Add,'" + FormatDate(lbsql_dateTo) + "')>=0)";
            }
            models = B_Lebi_User_Point.GetList(where, "id desc", PageSize, page);
            int recordCount = B_Lebi_User_Point.Counts(where);

            PageString = Pager.GetPaginationString("?page={0}&key=" + key + "&dateFrom=" + dateFrom + "&dateTo=" + dateTo + "&status = " + status, page, PageSize, recordCount);

            user = B_Lebi_User.GetModel(user_id);
            if (user == null)
            {
                user          = new Lebi_User();
                user.UserName = Tag("全部会员");
            }
        }