Hidistro.UI.Web/Admin/zbGoods/EditProductType.cs

(开头部分) 3KB

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

namespace Hidistro.UI.Web.Admin.zbGoods
{
    using Hidistro.ControlPanel.zbCommodities;
    using Hidistro.ControlPanel.Store;
    using Hidistro.Entities.Commodities;
    using Hidistro.Entities.Store;
    using Hidistro.UI.Common.Controls;
    using Hidistro.UI.ControlPanel.Utility;
    using Hishop.Components.Validation;
    using System;
    using System.Collections.Generic;
    using System.Web.UI.WebControls;

    [PrivilegeCheck(Privilege.EditProductType)]
    public class EditProductType : AdminPage
    {
        protected Button btnEditProductType;
        protected zbBrandCategoriesCheckBoxList chlistBrand;
        protected TextBox txtRemark;
        protected TextBox txtTypeName;
        private int typeId;

        protected EditProductType() : base("m11", "zbspp07")
        {
        }

        private void btnEditProductType_Click(object sender, EventArgs e)
        {
            ProductTypeInfo productType = new ProductTypeInfo {
                TypeId = this.typeId,
                TypeName = this.txtTypeName.Text,
                Remark = this.txtRemark.Text
            };
            IList<int> list = new List<int>();
            foreach (ListItem item in this.chlistBrand.Items)
            {
                if (item.Selected)
                {
                    list.Add(int.Parse(item.Value));
                }
            }
            productType.Brands = list;
            if (this.ValidationProductType(productType) && ProductTypeHelper.UpdateProductType(productType))
            {
                this.ShowMsg("修改成功", true);
            }
        }

        protected void Page_Load(object sender, EventArgs e)
        {
            if (!string.IsNullOrEmpty(this.Page.Request.QueryString["typeId"]))
            {
                int.TryParse(this.Page.Request.QueryString["typeId"], out this.typeId);
            }
            this.btnEditProductType.Click += new EventHandler(this.btnEditProductType_Click);
            if (!this.Page.IsPostBack)
            {
                this.chlistBrand.DataBind();
                ProductTypeInfo productType = ProductTypeHelper.GetProductType(this.typeId);
                if (productType == null)
后面还有 35 行代码,购买后查看完整代码

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

AI 解读 AI

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

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