Ejemplo n.º 1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (Page.IsPostBack)
            {
                return;
            }

            CheckAdminPower("ReadAdImage", PowerCheckType.Single);
            string action = RequestHelper.GetQueryString <string>("Action");

            if (action == "Delete")
            {
                CheckAdminPower("DeleteAdImage", PowerCheckType.Single);
                int id = RequestHelper.GetQueryString <int>("Id");
                if (id > 0)
                {
                    AdImageBLL.Delete(id);
                    AdminLogBLL.Add(ShopLanguage.ReadLanguage("DeleteRecord"), ShopLanguage.ReadLanguage("FlashPhoto"), id);
                }
            }

            classId = RequestHelper.GetQueryString <int>("class_id");
            adType  = RequestHelper.GetQueryString <int>("fp_type");

            if (adType > 0)
            {
                theFlash = FlashBLL.Read(adType);
            }
            var images = AdImageBLL.ReadList(adType);

            BindControl(images, RecordList);
        }
Ejemplo n.º 2
0
        /// <summary>
        /// 提交按钮点击方法
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void SubmitButton_Click(object sender, EventArgs e)
        {
            FlashInfo flash = new FlashInfo();

            flash.Id        = RequestHelper.GetQueryString <int>("ID");
            flash.Title     = Title.Text;
            flash.Introduce = Introduce.Text;
            flash.Width     = Convert.ToInt32(Width.Text) < 0 ?0 : Convert.ToInt32(Width.Text);
            flash.Height    = Convert.ToInt32(Height.Text) < 0 ? 0 : Convert.ToInt32(Height.Text);
            flash.EndDate   = DateTime.Now.AddYears(1);
            string alertMessage = ShopLanguage.ReadLanguage("AddOK");

            if (flash.Id == int.MinValue)
            {
                CheckAdminPower("AddFlash", PowerCheckType.Single);
                int id = FlashBLL.Add(flash);
                AdminLogBLL.Add(ShopLanguage.ReadLanguage("AddRecord"), ShopLanguage.ReadLanguage("Flash"), id);
            }
            else
            {
                CheckAdminPower("UpdateFlash", PowerCheckType.Single);
                FlashBLL.Update(flash);
                AdminLogBLL.Add(ShopLanguage.ReadLanguage("UpdateRecord"), ShopLanguage.ReadLanguage("Flash"), flash.Id);
                alertMessage = ShopLanguage.ReadLanguage("UpdateOK");
            }
            ScriptHelper.Alert(alertMessage, RequestHelper.RawUrl);
        }
Ejemplo n.º 3
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!Page.IsPostBack)
     {
         //CheckAdminPower("ReadFlash", PowerCheckType.Single);
         string action = RequestHelper.GetQueryString <string>("Action");
         type = RequestHelper.GetQueryString <int>("type") <= 0?1:RequestHelper.GetQueryString <int>("type");
         if (action == "Delete")
         {
             CheckAdminPower("DeleteFlash", PowerCheckType.Single);
             int id = RequestHelper.GetQueryString <int>("Id");
             if (id > 0)
             {
                 FlashBLL.Delete(id);
                 AdminLogBLL.Add(ShopLanguage.ReadLanguage("DeleteRecord"), ShopLanguage.ReadLanguage("Flash"), id);
                 foreach (var adImage in AdImageBLL.ReadList(id))
                 {
                     AdminLogBLL.Add(ShopLanguage.ReadLanguage("DeleteRecord"), ShopLanguage.ReadLanguage("FlashPhoto"), adImage.Id);
                 }
                 AdImageBLL.DeleteByAdType(id);
                 //ScriptHelper.Alert(ShopLanguage.ReadLanguage("DeleteOK"), RequestHelper.RawUrl);
             }
         }
         LotteryActivitySearchInfo activitySearch = new LotteryActivitySearchInfo();
         activitySearch.ActivityType = (int)LotteryActivityType.Wheel;
         BindControl(LotteryActivityBLL.SearchList(CurrentPage, PageSize, activitySearch, ref Count), RecordList, MyPager);
     }
 }
Ejemplo n.º 4
0
        protected void SubmitButton_Click(object sender, EventArgs e)
        {
            FlashInfo flash = new FlashInfo();

            flash.ID        = RequestHelper.GetQueryString <int>("ID");
            flash.Title     = this.Title.Text;
            flash.Introduce = this.Introduce.Text;
            flash.Width     = Convert.ToInt32(this.Width.Text);
            flash.Height    = Convert.ToInt32(this.Height.Text);
            string alertMessage = ShopLanguage.ReadLanguage("AddOK");

            if (flash.ID == -2147483648)
            {
                base.CheckAdminPower("AddFlash", PowerCheckType.Single);
                int id = FlashBLL.AddFlash(flash);
                AdminLogBLL.AddAdminLog(ShopLanguage.ReadLanguage("AddRecord"), ShopLanguage.ReadLanguage("Flash"), id);
            }
            else
            {
                base.CheckAdminPower("UpdateFlash", PowerCheckType.Single);
                FlashBLL.UpdateFlash(flash);
                AdminLogBLL.AddAdminLog(ShopLanguage.ReadLanguage("UpdateRecord"), ShopLanguage.ReadLanguage("Flash"), flash.ID);
                alertMessage = ShopLanguage.ReadLanguage("UpdateOK");
            }
            AdminBasePage.Alert(alertMessage, RequestHelper.RawUrl);
        }
Ejemplo n.º 5
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!this.Page.IsPostBack)
     {
         base.CheckAdminPower("ReadFlash", PowerCheckType.Single);
         base.BindControl(FlashBLL.ReadFlashList(base.CurrentPage, base.PageSize, ref this.Count), this.RecordList, this.MyPager);
     }
 }
Ejemplo n.º 6
0
 /// <summary>
 /// 页面加载方法
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!Page.IsPostBack)
     {
         int flashID = RequestHelper.GetQueryString <int>("ID");
         if (flashID != int.MinValue)
         {
             CheckAdminPower("ReadFlash", PowerCheckType.Single);
             FlashInfo flash = FlashBLL.Read(flashID);
             Title.Text     = flash.Title;
             Introduce.Text = flash.Introduce;
             Width.Text     = flash.Width.ToString();
             Height.Text    = flash.Height.ToString();
         }
     }
 }
Ejemplo n.º 7
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!this.Page.IsPostBack)
     {
         int queryString = RequestHelper.GetQueryString <int>("ID");
         if (queryString != -2147483648)
         {
             base.CheckAdminPower("ReadFlash", PowerCheckType.Single);
             FlashInfo info = FlashBLL.ReadFlash(queryString);
             this.Title.Text     = info.Title;
             this.Introduce.Text = info.Introduce;
             this.Width.Text     = info.Width.ToString();
             this.Height.Text    = info.Height.ToString();
         }
     }
 }