Hidistro.UI.Web/Admin/Goods/SkuValue.cs

(开头部分) 6KB

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

namespace Hidistro.UI.Web.Admin.Goods
{
    using Hidistro.ControlPanel.Commodities;
    using Hidistro.ControlPanel.Store;
    using Hidistro.Core;
    using Hidistro.Entities.Commodities;
    using Hidistro.UI.ControlPanel.Utility;
    using System;
    using System.Collections.Generic;
    using System.Web.UI.HtmlControls;
    using System.Web.UI.WebControls;

    public class SkuValue : AdminPage
    {
        private int attributeId;
        protected Button btnCreateValue;
        protected HtmlInputHidden currentAttributeId;
        protected FileUpload fileUpload;
        protected TextBox txtValueDec;
        protected TextBox txtValueStr;
        private int valueId;
        protected HtmlGenericControl valueImage;
        protected HtmlGenericControl valueStr;

        protected SkuValue() : base("m02", "spp07")
        {
        }

        protected void btnCreateValue_Click(object sender, EventArgs e)
        {
            AttributeValueInfo attributeValue = new AttributeValueInfo();
            IList<AttributeValueInfo> list = new List<AttributeValueInfo>();
            int num = int.Parse(this.currentAttributeId.Value);
            attributeValue.AttributeId = num;
            if (!(this.Page.Request.QueryString["action"].ToString().Trim() == "add"))
            {
                this.valueId = int.Parse(this.Page.Request.QueryString["valueId"]);
                attributeValue = ProductTypeHelper.GetAttributeValueInfo(this.valueId);
                if (ProductTypeHelper.GetAttribute(attributeValue.AttributeId).UseAttributeImage)
                {
                    if (!string.IsNullOrEmpty(this.txtValueDec.Text))
                    {
                        attributeValue.ValueStr = Globals.HtmlEncode(this.txtValueDec.Text);
                    }
                }
                else if (!string.IsNullOrEmpty(this.txtValueStr.Text))
                {
                    attributeValue.ValueStr = Globals.HtmlEncode(this.txtValueStr.Text);
                }
                if (this.fileUpload.HasFile)
                {
                    try
                    {
                        StoreHelper.DeleteImage(attributeValue.ImageUrl);
                        attributeValue.ImageUrl = ProductTypeHelper.UploadSKUImage(this.fileUpload.PostedFile);
                    }
                    catch
                    {
                    }
                }
后面还有 89 行代码,购买后查看完整代码

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

AI 解读 AI

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

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