protected override void PageLoad() { base.PageLoad(); int queryString = RequestHelper.GetQueryString <int>("ID"); this.order = OrderBLL.ReadOrder(queryString, base.UserID); if (this.order.GiftID > 0) { this.gift = GiftBLL.ReadGift(this.order.GiftID); } this.orderDetailList = OrderDetailBLL.ReadOrderDetailByOrder(queryString); string str = string.Empty; foreach (OrderDetailInfo info in this.orderDetailList) { if (str == string.Empty) { str = info.ProductID.ToString(); } else { str = str + "," + info.ProductID.ToString(); } } if (str != string.Empty) { ProductSearchInfo productSearch = new ProductSearchInfo(); productSearch.InProductID = str; this.productList = ProductBLL.SearchProductList(productSearch); } OrderDetailBLL.HandlerOrderDetailList(this.orderDetailList, ref this.orderGiftPackVirtualList, ref this.orderCommonProductVirtualList); }
protected override void PageLoad() { base.PageLoad(); int queryString = RequestHelper.GetQueryString <int>("ID"); this.favorableActivity = FavorableActivityBLL.ReadFavorableActivity(queryString); if (this.favorableActivity.UserGrade != string.Empty) { foreach (string str in this.favorableActivity.UserGrade.Split(new char[] { ',' })) { if (this.userGrade == string.Empty) { this.userGrade = UserGradeBLL.ReadUserGradeCache(Convert.ToInt32(str)).Name; } else { this.userGrade = this.userGrade + "," + UserGradeBLL.ReadUserGradeCache(Convert.ToInt32(str)).Name; } } } if (this.favorableActivity.GiftID != string.Empty) { GiftSearchInfo gift = new GiftSearchInfo(); gift.InGiftID = this.favorableActivity.GiftID; this.giftList = GiftBLL.SearchGiftList(gift); } base.Title = this.favorableActivity.Name; }
protected void SubmitButton_Click(object sender, EventArgs e) { GiftInfo gift = new GiftInfo(); gift.ID = RequestHelper.GetQueryString <int>("ID"); gift.Name = this.Name.Text; gift.Photo = this.Photo.Text; gift.Description = this.Description.Text; string alertMessage = ShopLanguage.ReadLanguage("AddOK"); if (gift.ID == -2147483648) { base.CheckAdminPower("AddGift", PowerCheckType.Single); int id = GiftBLL.AddGift(gift); AdminLogBLL.AddAdminLog(ShopLanguage.ReadLanguage("AddRecord"), ShopLanguage.ReadLanguage("Gift"), id); } else { base.CheckAdminPower("UpdateGift", PowerCheckType.Single); GiftBLL.UpdateGift(gift); AdminLogBLL.AddAdminLog(ShopLanguage.ReadLanguage("UpdateRecord"), ShopLanguage.ReadLanguage("Gift"), gift.ID); alertMessage = ShopLanguage.ReadLanguage("UpdateOK"); } AdminBasePage.Alert(alertMessage, RequestHelper.RawUrl); }
/// <summary> /// 页面加载 /// </summary> protected override void PageLoad() { base.PageLoad(); int id = RequestHelper.GetQueryString <int>("ID"); favorableActivity = FavorableActivityBLL.ReadFavorableActivity(id); if (favorableActivity.UserGrade != string.Empty) { foreach (string temp in favorableActivity.UserGrade.Split(',')) { if (userGrade == string.Empty) { userGrade = UserGradeBLL.ReadUserGradeCache(Convert.ToInt32(temp)).Name; } else { userGrade += "," + UserGradeBLL.ReadUserGradeCache(Convert.ToInt32(temp)).Name; } } } if (favorableActivity.GiftID != string.Empty) { GiftSearchInfo giftSearch = new GiftSearchInfo(); giftSearch.InGiftID = favorableActivity.GiftID; giftList = GiftBLL.SearchGiftList(giftSearch); } Title = favorableActivity.Name; }
protected void Page_Load(object sender, EventArgs e) { if (!this.Page.IsPostBack) { this.UserGrade.DataSource = UserGradeBLL.ReadUserGradeCacheList(); this.UserGrade.DataTextField = "Name"; this.UserGrade.DataValueField = "ID"; this.UserGrade.DataBind(); this.RegionID.DataSource = RegionBLL.ReadRegionUnlimitClass(); int queryString = RequestHelper.GetQueryString <int>("ID"); if (queryString != -2147483648) { base.CheckAdminPower("ReadFavorableActivity", PowerCheckType.Single); this.favorableActivity = FavorableActivityBLL.ReadFavorableActivity(queryString); this.Photo.Text = this.favorableActivity.Photo; this.Name.Text = this.favorableActivity.Name; this.Content.Text = this.favorableActivity.Content; this.StartDate.Text = this.favorableActivity.StartDate.ToString("yyyy-MM-dd"); this.EndDate.Text = this.favorableActivity.EndDate.ToString("yyyy-MM-dd"); ControlHelper.SetCheckBoxListValue(this.UserGrade, this.favorableActivity.UserGrade); this.OrderProductMoney.Text = this.favorableActivity.OrderProductMoney.ToString(); this.RegionID.ClassIDList = this.favorableActivity.RegionID; this.ReduceMoney.Text = this.favorableActivity.ReduceMoney.ToString(); this.ReduceDiscount.Text = this.favorableActivity.ReduceDiscount.ToString(); if (this.favorableActivity.GiftID != string.Empty) { GiftSearchInfo gift = new GiftSearchInfo(); gift.InGiftID = this.favorableActivity.GiftID; this.giftList = GiftBLL.SearchGiftList(gift); } } } }
protected void Page_Load(object sender, EventArgs e) { if (!this.Page.IsPostBack) { base.CheckAdminPower("ReadGift", PowerCheckType.Single); GiftSearchInfo gift = new GiftSearchInfo(); gift.Name = RequestHelper.GetQueryString <string>("Name"); base.BindControl(GiftBLL.SearchGiftList(base.CurrentPage, base.PageSize, gift, ref this.Count), this.RecordList, this.MyPager); } }
protected void DeleteButton_Click(object sender, EventArgs e) { base.CheckAdminPower("DeleteGift", PowerCheckType.Single); string intsForm = RequestHelper.GetIntsForm("SelectID"); if (intsForm != string.Empty) { GiftBLL.DeleteGift(intsForm); AdminLogBLL.AddAdminLog(ShopLanguage.ReadLanguage("DeleteRecord"), ShopLanguage.ReadLanguage("Gift"), intsForm); ScriptHelper.Alert(ShopLanguage.ReadLanguage("DeleteOK"), RequestHelper.RawUrl); } }
protected void Page_Load(object sender, EventArgs e) { if (!this.Page.IsPostBack) { int queryString = RequestHelper.GetQueryString <int>("ID"); if (queryString != -2147483648) { base.CheckAdminPower("ReadGift", PowerCheckType.Single); GiftInfo info = GiftBLL.ReadGift(queryString); this.Name.Text = info.Name; this.Photo.Text = info.Photo; this.Description.Text = info.Description; } } }
protected override void PageLoad() { base.PageLoad(); if ((ShopConfig.ReadConfigInfo().AllowAnonymousAddCart == 0) && (base.UserID == 0)) { ResponseHelper.Redirect("/User/Login.aspx?RedirectUrl=/CheckOut.aspx"); ResponseHelper.End(); } if ((Sessions.ProductBuyCount == 0) || (Sessions.ProductTotalPrice == 0M)) { ResponseHelper.Redirect("/Cart.aspx"); ResponseHelper.End(); } if (base.UserID > 0) { this.userAddressList = UserAddressBLL.ReadUserAddressByUser(base.UserID); List <UserCouponInfo> list = UserCouponBLL.ReadUserCouponCanUse(base.UserID); foreach (UserCouponInfo info in list) { if (info.Coupon.UseMinAmount <= Sessions.ProductTotalPrice) { this.userCouponList.Add(info); } } this.moneyLeft = UserBLL.ReadUserMore(base.UserID).MoneyLeft; } this.payPluginsList = PayPlugins.ReadProductBuyPayPluginsList(); this.favorableActivity = FavorableActivityBLL.ReadFavorableActivity(DateTime.Now, DateTime.Now, 0); if (this.favorableActivity.ID > 0) { if ((("," + this.favorableActivity.UserGrade + ",").IndexOf("," + this.GradeID.ToString() + ",") > -1) && (Sessions.ProductTotalPrice >= this.favorableActivity.OrderProductMoney)) { if (this.favorableActivity.GiftID != string.Empty) { GiftSearchInfo gift = new GiftSearchInfo(); gift.InGiftID = this.favorableActivity.GiftID; this.giftList = GiftBLL.SearchGiftList(gift); } } else { this.favorableActivity = new FavorableActivityInfo(); } } base.Title = "结算中心"; }