Beispiel #1
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!base.IsPostBack)
     {
         this.BindPreferentialObject();
         this.rptShopBind();
         if (base.Request.QueryString["PromotionsID"] != null)
         {
             int PromotionsID = int.Parse(base.Request.QueryString["PromotionsID"]);
             Chain.BLL.Promotions   bllPromotions   = new Chain.BLL.Promotions();
             Chain.Model.Promotions modelPromotions = bllPromotions.GetModel(PromotionsID);
             this.txtPromotionsDesc.Value       = modelPromotions.PromotionsDesc;
             this.txtPromotionsID.Value         = PromotionsID.ToString();
             this.txtPromotionsRemark.Value     = modelPromotions.PromotionsRemark;
             this.txtUpdatePromotionsName.Value = modelPromotions.PromotionsPhoto;
             this.imgPromotionsPhoto.Src        = modelPromotions.PromotionsPhoto;
             this.txtPromotionsTitle.Value      = modelPromotions.PromotionsTitle;
             this.txtShopList.Value             = modelPromotions.ShopList;
             string[] shopList = this.txtShopList.Value.Split(new char[]
             {
                 ','
             });
             string shopname = "";
             for (int i = 0; i < shopList.Length; i++)
             {
                 Chain.BLL.SysShop   bllShop   = new Chain.BLL.SysShop();
                 Chain.Model.SysShop modelShop = bllShop.GetModel(int.Parse(shopList[i]));
                 shopname = shopname + modelShop.ShopName + ";";
             }
             shopname.TrimEnd(new char[]
             {
                 ';'
             });
             this.txtShopNameList.Value = shopname;
             this.ltlTitle.Text         = "微官网   >    优惠活动   >   优惠活动编辑 ";
         }
         else
         {
             this.ltlTitle.Text = "微官网   >   优惠活动   >   优惠活动新增 ";
         }
     }
 }
Beispiel #2
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!base.IsPostBack)
     {
         if (base.Request.QueryString["PromotionsID"] != null)
         {
             int ProductID = int.Parse(base.Request.QueryString["PromotionsID"]);
             Chain.BLL.Promotions   bllPromotions   = new Chain.BLL.Promotions();
             Chain.Model.Promotions modelPromotions = bllPromotions.GetModel(ProductID);
             this.spPromotionsDesc.InnerHtml = modelPromotions.PromotionsDesc;
             string   shopnameLsit = modelPromotions.ShopList;
             string[] shopList     = shopnameLsit.Split(new char[]
             {
                 ','
             });
             string sql = " ShopType=3 ";
             if (shopList.Length > 0)
             {
                 string shopidList = "( ";
                 for (int i = 0; i < shopList.Length; i++)
                 {
                     shopidList = shopidList + shopList[i] + ",";
                 }
                 shopidList  = shopidList.Substring(0, shopidList.Length - 1);
                 shopidList += ")";
                 sql         = sql + " and ShopID in " + shopidList;
             }
             if (modelPromotions.PromotionsMemLevel == -1)
             {
                 this.spMemLevel.InnerHtml = "所有会员";
             }
             else
             {
                 Chain.BLL.MemLevel bllLevel = new Chain.BLL.MemLevel();
                 this.spMemLevel.InnerHtml = bllLevel.GetModel(modelPromotions.PromotionsMemLevel).LevelName;
             }
             this.rptShopBind(sql);
         }
     }
 }