예제 #1
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (companyID < 0)
     {
         companyID = CompanyBLL.SystemCompanyId;
     }
     if (!this.Page.IsPostBack)
     {
         this.BindClassBrandAttributeClassStandardType();
         this.ProductClass.DataSource = ProductClassBLL.ReadProductClassUnlimitClass();
         this.productID = RequestHelper.GetQueryString <int>("ID");
         if (this.productID != -2147483648)
         {
             base.CheckAdminPower("ReadProduct", PowerCheckType.Single);
             ProductInfo product = ProductBLL.ReadProduct(this.productID);
             companyID      = product.CompanyID;
             companyName    = CompanyBLL.ReadCompany(product.CompanyID).CompanyName;
             this.Name.Text = product.Name;
             this.Name.Attributes.Add("style", "color:" + product.Color);
             this.color = product.Color;
             //this.FontStyle.Text = product.FontStyle;
             this.ProductNumber.Text       = product.ProductNumber;
             this.ProductClass.ClassIDList = product.ClassID;
             this.Keywords.Text            = product.Keywords;
             brandIDStr                 = product.BrandID;
             this.MarketPrice.Text      = product.MarketPrice.ToString();
             this.Photo.Text            = product.Photo;
             this.Summary.Text          = product.Summary;
             this.Introduction.Value    = product.Introduction;
             this.IsSpecial.Text        = product.IsSpecial.ToString();
             this.IsNew.Text            = product.IsNew.ToString();
             this.IsHot.Text            = product.IsHot.ToString();
             this.IsSale.Text           = product.IsSale.ToString();
             this.IsTop.Text            = product.IsTop.ToString();
             this.Remark.Text           = product.Remark;
             this.AllowComment.Text     = product.AllowComment.ToString();
             this.AttributeClassID.Text = product.AttributeClassID.ToString();
             this.StandardType.Text     = product.StandardType.ToString();
             this.sendCount             = product.SendCount;
             this.Sort.Text             = product.Sort.ToString();
             this.Editor.Text           = product.Editor;
             this.BindRelation(product);
             this.BindTestSetting(product);
             this.productPhotoList = ProductPhotoBLL.ReadProductPhotoByProduct(this.productID);
         }
         this.BindSystemTestSetting();
         this.userGradeList = UserGradeBLL.JoinUserGrade(this.productID);
     }
 }