Hidistro.UI.Web/Admin/Goods/AddProductType.cs
(开头部分) 2KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
namespace Hidistro.UI.Web.Admin.Goods
{
using Hidistro.ControlPanel.Commodities;
using Hidistro.ControlPanel.Store;
using Hidistro.Core;
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.HtmlControls;
using System.Web.UI.WebControls;
[PrivilegeCheck(Privilege.AddProductType)]
public class AddProductType : AdminPage
{
protected Button btnAddProductType;
protected BrandCategoriesCheckBoxList chlistBrand;
protected HtmlForm thisForm;
protected TextBox txtRemark;
protected TextBox txtTypeName;
protected AddProductType() : base("m02", "spp07")
{
}
private void btnAddProductType_Click(object sender, EventArgs e)
{
ProductTypeInfo productType = new ProductTypeInfo {
TypeName = this.txtTypeName.Text.Trim(),
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))
{
int num = ProductTypeHelper.AddProductType(productType);
if (num > 0)
{
base.Response.Redirect(Globals.GetAdminAbsolutePath("/goods/AddAttribute.aspx?typeId=" + num), true);
}
else
{
this.ShowMsg("添加商品类型失败", false);
}
}
}
protected void Page_Load(object sender, EventArgs e)
{
this.btnAddProductType.Click += new EventHandler(this.btnAddProductType_Click);
后面还有 23 行代码,购买后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。
