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

(开头部分) 4KB

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

namespace Hidistro.UI.Web.Admin.zbGoods
{
    using ASPNET.WebControls;
    using Hidistro.ControlPanel.zbCommodities;
    using Hidistro.ControlPanel.Store;
    using Hidistro.Core;
    using Hidistro.Core.Entities;
    using Hidistro.Entities.Commodities;
    using Hidistro.Entities.Store;
    using Hidistro.UI.ControlPanel.Utility;
    using System;
    using System.Collections.Generic;
    using System.Collections.Specialized;
    using System.Globalization;
    using System.Web.UI;
    using System.Web.UI.WebControls;

    [PrivilegeCheck(Privilege.ProductTypes)]
    public class ProductTypes : AdminPage
    {
        protected Button btnSearchButton;
        protected Grid grdProductTypes;
        protected Pager pager;
        private string searchkey;
        protected TextBox txtSearchText;

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

        private void BindTypes()
        {
            ProductTypeQuery query = new ProductTypeQuery {
                TypeName = this.searchkey,
                PageIndex = this.pager.PageIndex,
                PageSize = this.pager.PageSize
            };
            DbQueryResult productTypes = ProductTypeHelper.GetProductTypes(query);
            this.grdProductTypes.DataSource = productTypes.Data;
            this.grdProductTypes.DataBind();
            this.pager.TotalRecords = productTypes.TotalRecords;
        }

        private void btnSearchButton_Click(object sender, EventArgs e)
        {
            this.ReBind(true);
        }

        private void grdProductTypes_RowDataBound(object sender, GridViewRowEventArgs e)
        {
            if (e.Row.RowType == DataControlRowType.DataRow)
            {
                Label label = (Label) e.Row.FindControl("lbbrand");
                label.Text = ProductTypeHelper.GetBrandName(int.Parse(DataBinder.Eval(e.Row.DataItem, "TypeId").ToString()));
            }
        }

        private void grdProductTypes_RowDeleting(object sender, GridViewDeleteEventArgs e)
        {
            int typeId = (int) this.grdProductTypes.DataKeys[e.RowIndex].Value;
后面还有 66 行代码,购买后查看完整代码

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

AI 解读 AI

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

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