Пример #1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            PageSize     = RequestTool.getpageSize(25);
            id           = RequestTool.RequestInt("id");
            userid       = RequestTool.RequestInt("userid");
            string where = "1=1";
            if (id > 0)
            {
                where += " and Product_id=" + id;
            }
            if (userid > 0)
            {
                where += " and User_id=" + userid;
            }
            models = B_Lebi_Product_Price.GetList(where, "", PageSize, page);
            int recordCount = B_Lebi_Product_Price.Counts(where);

            PageString = Pager.GetPaginationString("?page={0}&userid=" + userid + "&id=" + id, page, PageSize, recordCount);
            cuser      = GetUser(userid);
            cproduct   = GetPro(id);
            if (cuser.id > 0)
            {
                ename = cuser.UserName;
            }
            if (cproduct.id > 0)
            {
                ename = Lang(cproduct.Name);
            }
        }
Пример #2
0
        public Lebi_Product_Price GetPriceInfo(int userid)
        {
            Lebi_Product_Price model = B_Lebi_Product_Price.GetModel("Product_id=" + product.id + " and User_id=" + userid + "");

            if (model == null)
            {
                return(new Lebi_Product_Price());
            }
            return(model);
        }
Пример #3
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!EX_Admin.Power("product_user_price", "商品会员价格"))
            {
                WindowNoPower();
            }
            userlevelid = RequestTool.RequestInt("userlevelid");
            userid      = RequestTool.RequestInt("userid");
            productid   = RequestTool.RequestInt("productid");
            key         = RequestTool.RequestString("key");
            userlevel   = B_Lebi_UserLevel.GetModel(userlevelid);
            product     = B_Lebi_Product.GetModel(productid);
            if (product == null)
            {
                product = new Lebi_Product();
            }
            if (userlevel == null)
            {
                userlevel = new Lebi_UserLevel();
            }
            string where = "IsAnonymous<>1";
            if (key != "")
            {
                where += " and (UserName like '%" + key + "%' or RealName like '%" + key + "%' or NickName like '%" + key + "%')";
            }
            if (userlevelid > 0)
            {
                where += " and UserLevel_id =" + userlevelid + "";
            }
            PageSize = RequestTool.getpageSize(10);
            int recordCount = B_Lebi_User.Counts(where);

            PageString = Pager.GetPaginationStringForJS("reloadproducts({0},'" + key + "'," + userlevel.id + ");", page, PageSize, recordCount);
            users      = B_Lebi_User.GetList(where, "", PageSize, page);

            userlevellimit = B_Lebi_Product_Price.GetModel("Product_id=" + product.id + "");
            if (userlevellimit == null)
            {
                userlevellimit = new Lebi_Product_Price();
            }
        }