Web/admin/editproduct.aspx.cs

(开头部分) 4KB

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

using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;

namespace ClothesShop.Web.admin
{
    public partial class editproduct : BasePage
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (user.IsLogin() == true && user.getUserRole() == 2)
            {
                if (!this.IsPostBack)
                {
                    Bindtype();
                    this.Bind();
                }
            }
            else
            {
                this.Response.Redirect("logins.aspx");
            }
        }

        ClothesShop.BLL.product pro = new ClothesShop.BLL.product();
        ClothesShop.BLL.type_1 t_1 = new ClothesShop.BLL.type_1();
        ClothesShop.BLL.type_2 t_2 = new ClothesShop.BLL.type_2();
        ClothesShop.BLL.userinfo user = new ClothesShop.BLL.userinfo();
        
        /// <summary>
        /// 一件商品信息的绑定
        /// </summary>
        private void Bind()
        {
            int pid = int.Parse(this.Request.QueryString["pid"].ToString());
            DataRow row = pro.getoneproduct(pid);
            this.productnameTb.Text = row["productname"].ToString();
            this.priceTb.Text = row["price"].ToString();
            this.userpriceTb.Text = row["userprice"].ToString();
            this.specialspriceTb.Text = row["specialsprice"].ToString();
            this.countTb.Text = row["count"].ToString();
            this.sellcountTb.Text = row["sellcount"].ToString();
            this.descriptionTb.Text = row["description"].ToString();
            this.recommendedCB.Checked = bool.Parse(row["recommended"].ToString());
            this.specialsCB.Checked = bool.Parse(row["specials"].ToString());

            this.pointcount.Value = row["pointcount"].ToString();

            this.type_1ddl.Items.FindByValue(row["typeid_1"].ToString()).Selected = true;
            this.productpic.ImageUrl = "../pic/" + row["imagepath"].ToString();
            this.imagepath.Value = row["imagepath"].ToString();
            DataTable table = t_2.type_2list(int.Parse(row["typeid_1"].ToString()), "");
            foreach (DataRow dr in table.Rows)
后面还有 51 行代码,购买后查看完整代码

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

AI 解读 AI

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

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