com.eshop.www.Web/Default.aspx.cs

(开头部分) 7KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using com.eshop.www.Model;
using com.eshop.www.BLL;
using com.eshop.www.Tools;

public partial class _Default : System.Web.UI.Page
{
    public HttpCookie userName;
    public HttpCookie isYes;
    protected void Page_Load(object sender, EventArgs e)
    {
        userName = Request.Cookies[Cookie.UserNameCookieName];
        isYes = Request.Cookies[Cookie.IsLoginCookieName];
        if (!IsPostBack)
        {
            rSitepost_load();
            Product_load();
        }
    }
    private void rSitepost_load()
    {
        if (userName == null || userName.Value.Length == 0 || isYes == null || isYes.Value != "yes")
        { CartNum.Text = "0"; } 
        else
        {
        ShoppingCart cart = new ShoppingCart();
        HttpCookie cookie = cart.GetShoppingCart(Cookie.ShoppingCartCookieName);
        CartNum.Text = cart.GetTotalCount(cookie).ToString();
            
          }

        int number = 7;
        string where = "category_id=4 and is_show=1 and is_delete=0";
        string fieldList = "Id,title,order_by,is_show,create_date";
        string orderField = "order_by";
        bool orderby = true;
        DataRecordTable table = new NewsContentBusiness().GetList(fieldList, orderField, orderby, 1, number, where);
        rSitepost.DataSource = table.Table;
        rSitepost.DataBind();

        string orderField1 = "id";
        DataRecordTable table1 = new NewsContentBusiness().GetList(fieldList, orderField1, orderby, 1, number, where);
        rSitepost1.DataSource = table1.Table;
        rSitepost1.DataBind();
    }
    private void Product_load()
    {
        ProductDetailBusiness business = new ProductDetailBusiness();

        int number = 8;
        string where = "is_new=1 and is_show=1 and is_delete=0";
        string fieldList = "Id,product_name,order_by,is_show,price,sale_price,Stock";
        string orderField = "order_by";
        bool orderby = true;
        DataRecordTable table = business.GetList(fieldList, orderField, orderby, 1, number, where);
后面还有 125 行代码,购买后查看完整代码

24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明

AI 解读

登录后可用,每次 10 积分,解读结果公开显示在下面。

还没有人解读过这个文件。