Web/ProductShow.aspx.cs

(开头部分) 5KB

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

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using System.Text;

using BLL;
using Common;

namespace HotelShop
{
    public partial class ProductShow : System.Web.UI.Page
    {
        public T_ProductInfo model = new T_ProductInfo();
        public string ProductClassName = "";
        public string ProductFristUrl = "";
        public string SmallProductUrl = "";
        public int ProductId = DNTRequest.GetInt("ProductId", 0);
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                WeiMaiShopEntities ef = new WeiMaiShopEntities();
               
                if (ProductId != 0)
                {
                    Common.GetBaseData.AddProductHistroy(this.ProductId.ToString());

                    this.model = ef.T_ProductInfo.FirstOrDefault(p => p.ProductId == ProductId);
                    ProductClassName = ef.T_ProductClass.FirstOrDefault(p => p.ProductClassID ==model.ProductClassID).Name;

                    List<T_ProductInfoImgListImg> list = ef.T_ProductInfoImgListImg.Where(p => p.ProductID == ProductId && p.Status == 1).OrderBy(p => p.Sort).ToList();
                    int k = 1;
                    foreach (T_ProductInfoImgListImg modelImg in list)
                    {
                        if (k==1)
                        {
                            ProductFristUrl = modelImg.ImgPath;
                        }
                        SmallProductUrl += "<li><img width=\"63\" width=\"63\" src=\"" + modelImg.ImgPath + "\"> </li>";
                        k++;
                        
                    }

                    if (!string.IsNullOrEmpty(this.model.taobaoProductId.ToString()))
                    {
                          Maticsoft.DAL.tab_A_ProductListDAL bll = new Maticsoft.DAL.tab_A_ProductListDAL();

                          Maticsoft.Model.tab_A_ProductList model = new Maticsoft.Model.tab_A_ProductList();

                          model = bll.GetModel(Convert.ToInt32(this.model.taobaoProductId));

                          if (model != null)
                          {
                              foreach (string value in model.propAlias.Split(';'))
                              {
                                  ListItem obj = new ListItem();
后面还有 72 行代码,购买后查看完整代码

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

AI 解读

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

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