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);
     }
 }
        protected void SubmitButton_Click(object sender, EventArgs e)
        {
            ShippingRegionInfo shippingRegion = new ShippingRegionInfo();

            shippingRegion.Id         = RequestHelper.GetQueryString <int>("Id");
            shippingRegion.Name       = Name.Text;
            shippingRegion.ShippingId = RequestHelper.GetQueryString <int>("ShippingId");
            shippingRegion.RegionId   = RegionID.ClassIDList;
            try
            {
                shippingRegion.FixedMoeny   = Convert.ToDecimal(FixedMoeny.Text);
                shippingRegion.FirstMoney   = Convert.ToDecimal(FirstMoney.Text);
                shippingRegion.AgainMoney   = Convert.ToDecimal(AgainMoney.Text);
                shippingRegion.OneMoeny     = Convert.ToDecimal(OneMoeny.Text);
                shippingRegion.AnotherMoeny = Convert.ToDecimal(AnotherMoeny.Text);
            }
            catch { }

            string alertMessage = ShopLanguage.ReadLanguage("AddOK");

            if (shippingRegion.Id == int.MinValue)
            {
                CheckAdminPower("AddShippingRegion", PowerCheckType.Single);
                int id = ShippingRegionBLL.Add(shippingRegion);
                AdminLogBLL.Add(ShopLanguage.ReadLanguage("AddRecord"), ShopLanguage.ReadLanguage("ShippingRegion"), id);
            }
            else
            {
                CheckAdminPower("UpdateShippingRegion", PowerCheckType.Single);
                ShippingRegionBLL.Update(shippingRegion);
                AdminLogBLL.Add(ShopLanguage.ReadLanguage("UpdateRecord"), ShopLanguage.ReadLanguage("ShippingRegion"), shippingRegion.Id);
                alertMessage = ShopLanguage.ReadLanguage("UpdateOK");
            }
            ScriptHelper.Alert(alertMessage, RequestHelper.RawUrl);
        }
Exemple #3
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!this.Page.IsPostBack)
     {
         base.CheckAdminPower("ReadLink", PowerCheckType.Single);
         string queryString = RequestHelper.GetQueryString <string>("Action");
         int    id          = RequestHelper.GetQueryString <int>("ID");
         if ((queryString != string.Empty) && (id != -2147483648))
         {
             base.CheckAdminPower("UpdateLink", PowerCheckType.Single);
             string str2 = queryString;
             if (str2 != null)
             {
                 if (!(str2 == "Up"))
                 {
                     if (str2 == "Down")
                     {
                         LinkBLL.ChangeLinkOrder(ChangeAction.Down, id);
                     }
                 }
                 else
                 {
                     LinkBLL.ChangeLinkOrder(ChangeAction.Up, id);
                 }
             }
             AdminLogBLL.AddAdminLog(ShopLanguage.ReadLanguage("MoveRecord"), ShopLanguage.ReadLanguage("Link"), id);
         }
         this.classID = RequestHelper.GetQueryString <int>("ClassID");
         if (this.classID == -2147483648)
         {
             this.classID = 1;
         }
         base.BindControl(LinkBLL.ReadLinkCacheListByClass(this.classID), this.RecordList);
     }
 }
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!Page.IsPostBack)
            {
                switch (RequestHelper.GetQueryString <string>("Action"))
                {
                case "delete":
                    CheckAdminPower("DeleteMessage", PowerCheckType.Single);
                    int id = RequestHelper.GetQueryString <int>("ID");
                    if (id > 0)
                    {
                        ReceiveMessageBLL.Delete(id);
                        AdminLogBLL.Add(string.Format("删除已发送消息(ID:{0})", id));
                        ScriptHelper.Alert("删除成功", "SendMessage.aspx");
                    }
                    break;

                case "search":
                default:
                    CheckAdminPower("ReadMessage", PowerCheckType.Single);

                    Title.Text        = RequestHelper.GetQueryString <string>("Title");
                    StartAddDate.Text = RequestHelper.GetQueryString <string>("StartAddDate");
                    EndAddDate.Text   = RequestHelper.GetQueryString <string>("EndAddDate");

                    ReceiveMessageSearchInfo searchInfo = new ReceiveMessageSearchInfo();
                    searchInfo.Title     = RequestHelper.GetQueryString <string>("Title");
                    searchInfo.StartDate = RequestHelper.GetQueryString <DateTime>("StartAddDate");
                    searchInfo.EndDate   = RequestHelper.GetQueryString <DateTime>("EndAddDate");
                    BindControl(ReceiveMessageBLL.SearchList(CurrentPage, PageSize, searchInfo, ref Count), RecordList, MyPager);
                    break;
                }
            }
        }
        protected void SubmitButton_Click(object sender, EventArgs e)
        {
            ShippingInfo shipping = new ShippingInfo();

            shipping.Id           = RequestHelper.GetQueryString <int>("Id");
            shipping.Name         = Name.Text;
            shipping.Description  = Description.Text;
            shipping.IsEnabled    = RequestHelper.GetForm <int>("IsEnabled");
            shipping.ShippingType = RequestHelper.GetForm <int>("ShippingType");
            shipping.FirstWeight  = Convert.ToInt32(FirstWeight.Text);
            shipping.AgainWeight  = Convert.ToInt32(AgainWeight.Text);
            shipping.ShippingCode = ShippingCode.Text.Trim();

            string alertMessage = ShopLanguage.ReadLanguage("AddOK");

            if (shipping.Id == int.MinValue)
            {
                CheckAdminPower("AddShipping", PowerCheckType.Single);
                int id = ShippingBLL.Add(shipping);
                AdminLogBLL.Add(ShopLanguage.ReadLanguage("AddRecord"), ShopLanguage.ReadLanguage("Shipping"), id);
            }
            else
            {
                CheckAdminPower("UpdateShipping", PowerCheckType.Single);
                ShippingBLL.Update(shipping);
                AdminLogBLL.Add(ShopLanguage.ReadLanguage("UpdateRecord"), ShopLanguage.ReadLanguage("Shipping"), shipping.Id);
                alertMessage = ShopLanguage.ReadLanguage("UpdateOK");
            }
            ScriptHelper.Alert(alertMessage, RequestHelper.RawUrl);
        }
Exemple #6
0
        protected void SubmitButton_Click(object sender, EventArgs e)
        {
            CheckAdminPower("AddMessage", PowerCheckType.Single);
            string sendUser = RequestHelper.GetForm <string>("RelationUser");

            if (sendUser != string.Empty)
            {
                foreach (string user in sendUser.Split(new char[] { ',' }, StringSplitOptions.RemoveEmptyEntries))
                {
                    int userID = 0;
                    int.TryParse(user.Split('|')[0], out userID);
                    string             userName    = user.Split('|')[1];
                    ReceiveMessageInfo sendMessage = new ReceiveMessageInfo();
                    sendMessage.Title    = Title.Text;
                    sendMessage.Content  = Content.Text;
                    sendMessage.Date     = RequestHelper.DateNow;
                    sendMessage.UserID   = userID;
                    sendMessage.UserName = userName;
                    sendMessage.IsAdmin  = (int)BoolType.True;
                    int msgId = ReceiveMessageBLL.Add(sendMessage);
                    AdminLogBLL.Add(string.Format("给用户(ID:{0})发送消息(ID:{1})", userID, msgId));
                }

                ScriptHelper.Alert("发送成功", "SendMessage.aspx");
            }
            else
            {
                ScriptHelper.Alert("请选择接收用户");
            }
        }
Exemple #7
0
        protected void SubmitButton_Click(object sender, EventArgs e)
        {
            CouponInfo coupon = new CouponInfo();

            coupon.ID           = RequestHelper.GetQueryString <int>("ID");
            coupon.Name         = this.Name.Text;
            coupon.Money        = Convert.ToDecimal(this.Money.Text);
            coupon.UseMinAmount = Convert.ToDecimal(this.UseMinAmount.Text);
            coupon.UseStartDate = Convert.ToDateTime(this.UseStartDate.Text);
            coupon.UseEndDate   = Convert.ToDateTime(this.UseEndDate.Text).AddDays(1.0).AddSeconds(-1.0);
            string alertMessage = ShopLanguage.ReadLanguage("AddOK");

            if (coupon.ID == -2147483648)
            {
                base.CheckAdminPower("AddCoupon", PowerCheckType.Single);
                coupon.ID = CouponBLL.AddCoupon(coupon);
                AdminLogBLL.AddAdminLog(ShopLanguage.ReadLanguage("AddRecord"), ShopLanguage.ReadLanguage("Coupon"), coupon.ID);
            }
            else
            {
                base.CheckAdminPower("UpdateCoupon", PowerCheckType.Single);
                CouponBLL.UpdateCoupon(coupon);
                AdminLogBLL.AddAdminLog(ShopLanguage.ReadLanguage("UpdateRecord"), ShopLanguage.ReadLanguage("Coupon"), coupon.ID);
                alertMessage = ShopLanguage.ReadLanguage("UpdateOK");
            }
            AdminBasePage.Alert(alertMessage, RequestHelper.RawUrl);
        }
Exemple #8
0
        protected void SubmitButton_Click(object sender, EventArgs e)
        {
            ProductClassInfo productClass = new ProductClassInfo();

            productClass.ID          = RequestHelper.GetQueryString <int>("ID");
            productClass.FatherID    = Convert.ToInt32(this.FatherID.Text);
            productClass.OrderID     = Convert.ToInt32(this.OrderID.Text);
            productClass.ClassName   = this.ClassName.Text;
            productClass.Keywords    = this.Keywords.Text;
            productClass.Description = this.Description.Text;
            productClass.IsDownload  = Convert.ToInt32(this.IsDownload.Text);
            string alertMessage = ShopLanguage.ReadLanguage("AddOK");

            if (productClass.ID == -2147483648)
            {
                base.CheckAdminPower("AddProductClass", PowerCheckType.Single);
                int id = ProductClassBLL.AddProductClass(productClass);
                AdminLogBLL.AddAdminLog(ShopLanguage.ReadLanguage("AddRecord"), ShopLanguage.ReadLanguage("ProductClass"), id);
            }
            else
            {
                base.CheckAdminPower("UpdateProductClass", PowerCheckType.Single);
                ProductClassBLL.UpdateProductClass(productClass);
                AdminLogBLL.AddAdminLog(ShopLanguage.ReadLanguage("UpdateRecord"), ShopLanguage.ReadLanguage("ProductClass"), productClass.ID);
                alertMessage = ShopLanguage.ReadLanguage("UpdateOK");
            }
            AdminBasePage.Alert(alertMessage, RequestHelper.RawUrl);
        }
Exemple #9
0
        protected void Page_Load(object sender, EventArgs e)
        {
            int    id     = RequestHelper.GetQueryString <int>("ID");
            string Action = RequestHelper.GetQueryString <string>("Action");

            if (Action == "Delete")
            {
                if (id != int.MinValue)
                {
                    base.CheckAdminPower("DeleteCourse", PowerCheckType.Single);
                    CourseBLL.DeleteCourse(id);
                    AdminLogBLL.AddAdminLog(ShopLanguage.ReadLanguage("DeleteRecord"), ShopLanguage.ReadLanguage("Course"), id);
                }
            }

            base.CheckAdminPower("ReadCourse", PowerCheckType.Single);
            if (!IsPostBack)
            {
                //在此处加载搜索框的类别信息
                CourseCateInfo CourseCateModel = new CourseCateInfo();
                CourseCateModel.Condition     = CompanyBLL.SystemCompanyId.ToString();
                SearchCategory.DataSource     = CourseCateBLL.ReadCourseCateNamedList(CourseCateModel);
                SearchCategory.DataTextField  = "CateName";
                SearchCategory.DataValueField = "CateId";
                SearchCategory.DataBind();
                SearchCategory.Items.Insert(0, new ListItem("可以指定类别", "-1"));

                CourseInfo Model = new CourseInfo();
                Model.CourseName      = RequestHelper.GetQueryString <string>("CourseName");
                Model.CateIdCondition = RequestHelper.GetQueryString <string>("CateIdCondition");
                Model.Condition       = CompanyBLL.SystemCompanyId.ToString();
                Model.Field           = "CompanyId";
                base.BindControl(CourseBLL.ReadList(Model, base.CurrentPage, base.PageSize, ref this.Count), this.RecordList, this.MyPager);
            }
        }
Exemple #10
0
        protected void Page_Load(object sender, EventArgs e)
        {
            base.CheckAdminPower("ReadPost", PowerCheckType.Single);
            string action = RequestHelper.GetQueryString <string>("Action");
            int    id     = RequestHelper.GetQueryString <int>("ID");

            if ((!string.IsNullOrEmpty(action)) && (id != -2147483648))
            {
                if (!string.IsNullOrEmpty(action))
                {
                    if (action == "Up")
                    {
                        base.CheckAdminPower("UpdatePostOrder", PowerCheckType.Single);
                        PostBLL.MoveUp(id);
                        AdminLogBLL.AddAdminLog(ShopLanguage.ReadLanguage("MoveRecord"), ShopLanguage.ReadLanguage("Post"), id);
                    }
                    else if (action == "Down")
                    {
                        base.CheckAdminPower("UpdatePostOrder", PowerCheckType.Single);
                        PostBLL.MoveDown(id);
                        AdminLogBLL.AddAdminLog(ShopLanguage.ReadLanguage("MoveRecord"), ShopLanguage.ReadLanguage("Post"), id);
                    }
                    else if (action == "Delete")
                    {
                        base.CheckAdminPower("DeletePost", PowerCheckType.Single);
                        PostBLL.DeletePost(id);
                        AdminLogBLL.AddAdminLog(ShopLanguage.ReadLanguage("DeleteRecord"), ShopLanguage.ReadLanguage("Post"), id);
                    }
                }
            }
            PostInfo Model = new PostInfo();

            Model.ParentId = 0;
            base.BindControl(PostBLL.ReadPostCateNamedList(), this.RecordList);
        }
Exemple #11
0
        /// <summary>
        /// 提交按钮点击方法
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void SubmitButton_Click(object sender, EventArgs e)
        {
            VoteItemInfo voteItem = new VoteItemInfo();

            voteItem.ID = RequestHelper.GetQueryString <int>("ID");

            voteItem.VoteID          = VoteBLL.ReadVoteFullFatherID(Convert.ToInt32(VoteType.Text));
            voteItem.ItemName        = ItemName.Text;
            voteItem.Department      = Department.Text;
            voteItem.Image           = Photo.Text;
            voteItem.Solution        = Solution.Text;
            voteItem.Point           = Point.Text;
            voteItem.CoverDepartment = CoverDepartment.Text;
            voteItem.Detail          = Content.Value;
            voteItem.Exp1            = MobileContent.Value;//手机站内容
            voteItem.OrderID         = Convert.ToInt32(OrderID.Text);
            voteItem.Exp2            = IsShow.Text;
            string alertMessage = ShopLanguage.ReadLanguage("AddOK");

            if (voteItem.ID == int.MinValue)
            {
                CheckAdminPower("AddVoteItem", PowerCheckType.Single);
                int id = VoteItemBLL.AddVoteItem(voteItem);
                AdminLogBLL.Add(ShopLanguage.ReadLanguage("AddRecord"), ShopLanguage.ReadLanguage("VoteItem"), id);
            }
            else
            {
                CheckAdminPower("UpdateVoteItem", PowerCheckType.Single);
                VoteItemBLL.UpdateVoteItem(voteItem);
                AdminLogBLL.Add(ShopLanguage.ReadLanguage("UpdateRecord"), ShopLanguage.ReadLanguage("VoteItem"), voteItem.ID);
                alertMessage = ShopLanguage.ReadLanguage("UpdateOK");
            }
            ScriptHelper.Alert(alertMessage, RequestHelper.RawUrl);
        }
        /// <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);
        }
Exemple #13
0
        protected void SubmitButton_Click(object sender, EventArgs e)
        {
            int id      = RequestHelper.GetQueryString <int>("Id");
            var adImage = AdImageBLL.Read(id);

            adImage.Title          = Title.Text;
            adImage.SubTitle       = SubTitle.Text;
            adImage.MobileLinkUrl  = LinkUrl.Text;
            adImage.MobileImageUrl = ImageUrl.Text;
            adImage.OrderId        = int.Parse(OrderId.Text);
            adImage.Tm             = DateTime.Now;

            string alertMessage = ShopLanguage.ReadLanguage("UpdateOK");

            if (adImage.Id > 0)
            {
                CheckAdminPower("UpdateAdImage", PowerCheckType.Single);
                AdImageBLL.Update(adImage);
                AdminLogBLL.Add(ShopLanguage.ReadLanguage("UpdateRecord"), ShopLanguage.ReadLanguage("AdImage"), adImage.Id);
            }
            else
            {
                CheckAdminPower("AddAdImage", PowerCheckType.Single);
                adImage.AdType  = RequestHelper.GetQueryString <int>("ad_type");
                adImage.ClassId = RequestHelper.GetQueryString <int>("class_id");
                id = AdImageBLL.Add(adImage);
                AdminLogBLL.Add(ShopLanguage.ReadLanguage("AddRecord"), ShopLanguage.ReadLanguage("AdImage"), id);
                alertMessage = ShopLanguage.ReadLanguage("AddOK");
            }
            ScriptHelper.Alert(alertMessage, RequestHelper.RawUrl);
        }
Exemple #14
0
        protected override void PageLoad()
        {
            base.PageLoad();
            base.Title = "╦зн╩ап╠М";

            if (Action == "Delete")
            {
                string selectID = RequestHelper.GetQueryString <string>("SelectID");
                if (!string.IsNullOrEmpty(selectID))
                {
                    base.CheckUserPower("DeleteWorkingPost", PowerCheckType.Single);
                    WorkingPostBLL.DeleteWorkingPost(selectID);
                    AdminLogBLL.AddAdminLog(ShopLanguage.ReadLanguage("DeleteRecord"), ShopLanguage.ReadLanguage("WorkingPost"), selectID);
                    ResponseHelper.Redirect(Request.UrlReferrer.ToString());
                }
            }

            if (!base.ExistsSonCompany || Action == "Search")
            {
                base.CheckUserPower("ReadWorkingPost", PowerCheckType.Single);
                if (CompanyID < 0)
                {
                    CompanyID = base.UserCompanyID;
                }

                WorkingPostSearchInfo workingPostSearch = new WorkingPostSearchInfo();
                workingPostSearch.CompanyId = CompanyID.ToString();
                //workingPostSearch.IsPost = 1;
                WorkingPostList = WorkingPostBLL.SearchWorkingPostList(workingPostSearch);
            }
        }
Exemple #15
0
        /// <summary>
        /// 提交按钮点击方法
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void SubmitButton_Click(object sender, EventArgs e)
        {
            MenuInfo menu = new MenuInfo();

            menu.ID        = RequestHelper.GetQueryString <int>("ID");
            menu.FatherID  = Convert.ToInt32(FatherID.Text);
            menu.OrderID   = Convert.ToInt32(OrderID.Text);
            menu.MenuName  = MenuName.Text;
            menu.MenuImage = Convert.ToInt32(MenuImage.Text);
            menu.URL       = URL.Text;
            menu.Date      = RequestHelper.DateNow;
            menu.IP        = ClientHelper.IP;
            string alertMessage = ShopLanguage.ReadLanguage("AddOK");

            if (menu.ID == int.MinValue)
            {
                CheckAdminPower("AddMenu", PowerCheckType.Single);
                int id = MenuBLL.AddMenu(menu);
                AdminLogBLL.Add(ShopLanguage.ReadLanguage("AddRecord"), ShopLanguage.ReadLanguage("Menu"), id);
            }
            else
            {
                CheckAdminPower("UpdateMenu", PowerCheckType.Single);
                MenuBLL.UpdateMenu(menu);
                AdminLogBLL.Add(ShopLanguage.ReadLanguage("UpdateRecord"), ShopLanguage.ReadLanguage("Menu"), menu.ID);
                alertMessage = ShopLanguage.ReadLanguage("UpdateOK");
            }
            ScriptHelper.Alert(alertMessage, RequestHelper.RawUrl);
        }
        protected void SubmitButton_Click(object sender, EventArgs e)
        {
            URLInfo url = new URLInfo();

            url.ID         = RequestHelper.GetQueryString <int>("ID");
            url.RealPath   = this.RealPath.Text;
            url.VitualPath = this.VitualPath.Text;
            int num2 = 1;

            if (this.IsEffect.Text == num2.ToString())
            {
                url.IsEffect = true;
            }
            else
            {
                url.IsEffect = false;
            }
            string alertMessage = ShopLanguage.ReadLanguage("AddOK");

            if (url.ID == -2147483648)
            {
                base.CheckAdminPower("AddURLRewriter", PowerCheckType.Single);
                int id = URLClass.AddURL(url);
                AdminLogBLL.AddAdminLog(ShopLanguage.ReadLanguage("AddRecord"), ShopLanguage.ReadLanguage("URLRewriter"), id);
            }
            else
            {
                base.CheckAdminPower("UpdateURLRewriter", PowerCheckType.Single);
                URLClass.UpdateURL(url);
                AdminLogBLL.AddAdminLog(ShopLanguage.ReadLanguage("UpdateRecord"), ShopLanguage.ReadLanguage("URLRewriter"), url.ID);
                alertMessage = ShopLanguage.ReadLanguage("UpdateOK");
            }
            AdminBasePage.Alert(alertMessage, RequestHelper.RawUrl);
        }
Exemple #17
0
        protected void SubmitButton_Click(object sender, EventArgs e)
        {
            ShippingInfo shipping = new ShippingInfo();

            shipping.ID           = RequestHelper.GetQueryString <int>("ID");
            shipping.Name         = this.Name.Text;
            shipping.Description  = this.Description.Text;
            shipping.IsEnabled    = Convert.ToInt32(this.IsEnabled.Text);
            shipping.ShippingType = Convert.ToInt32(this.ShippingType.Text);
            shipping.FirstWeight  = Convert.ToInt32(this.FirstWeight.Text);
            shipping.AgainWeight  = Convert.ToInt32(this.AgainWeight.Text);
            string alertMessage = ShopLanguage.ReadLanguage("AddOK");

            if (shipping.ID == -2147483648)
            {
                base.CheckAdminPower("AddShipping", PowerCheckType.Single);
                int id = ShippingBLL.AddShipping(shipping);
                AdminLogBLL.AddAdminLog(ShopLanguage.ReadLanguage("AddRecord"), ShopLanguage.ReadLanguage("Shipping"), id);
            }
            else
            {
                base.CheckAdminPower("UpdateShipping", PowerCheckType.Single);
                ShippingBLL.UpdateShipping(shipping);
                AdminLogBLL.AddAdminLog(ShopLanguage.ReadLanguage("UpdateRecord"), ShopLanguage.ReadLanguage("Shipping"), shipping.ID);
                alertMessage = ShopLanguage.ReadLanguage("UpdateOK");
            }
            AdminBasePage.Alert(alertMessage, RequestHelper.RawUrl);
        }
Exemple #18
0
        protected void Button1_ServerClick(object sender, EventArgs e)
        {
            base.CheckAdminPower("DeleteTestPaper", PowerCheckType.Single);
            string intsForm = RequestHelper.GetIntsForm("SelectID");

            if (!string.IsNullOrEmpty(intsForm))
            {
                string[] Arr = intsForm.Split(',');
                for (int i = 0; i < Arr.Length; i++)
                {
                    TestPaperInfo TestPaperModel = TestPaperBLL.ReadPaper(int.Parse(Arr[i]));
                    string        FilePath       = ServerHelper.MapPath("~/xml/" + TestPaperModel.UserId.ToString() + "_" + TestPaperModel.CateId.ToString() + ".xml");
                    if (File.Exists(FilePath))
                    {
                        File.Delete(FilePath);
                    }
                    FilePath = ServerHelper.MapPath("~/m/xml/" + TestPaperModel.UserId.ToString() + "_" + TestPaperModel.CateId.ToString() + ".xml");
                    if (File.Exists(FilePath))
                    {
                        File.Delete(FilePath);
                    }
                    TestPaperBLL.DeletePaper(int.Parse(Arr[i]));
                }
                AdminLogBLL.AddAdminLog(ShopLanguage.ReadLanguage("DeleteRecord"), ShopLanguage.ReadLanguage("TestPaper"), intsForm);
                ScriptHelper.Alert(ShopLanguage.ReadLanguage("DeleteOK"), RequestHelper.RawUrl);
            }
        }
Exemple #19
0
        protected void SubmitButton_Click(object sender, EventArgs e)
        {
            LinkInfo link = new LinkInfo();

            link.ID        = RequestHelper.GetQueryString <int>("ID");
            link.LinkClass = Convert.ToInt32(this.LinkClass.Text);
            if (link.LinkClass == 1)
            {
                link.Display = this.TextDisplay.Text;
            }
            else
            {
                link.Display = this.PictureDisplay.Text;
            }
            link.URL    = this.URL.Text;
            link.Remark = this.Remark.Text;
            string alertMessage = ShopLanguage.ReadLanguage("AddOK");

            if (link.ID == -2147483648)
            {
                base.CheckAdminPower("AddLink", PowerCheckType.Single);
                int id = LinkBLL.AddLink(link);
                AdminLogBLL.AddAdminLog(ShopLanguage.ReadLanguage("AddRecord"), ShopLanguage.ReadLanguage("Link"), id);
            }
            else
            {
                base.CheckAdminPower("UpdateLink", PowerCheckType.Single);
                LinkBLL.UpdateLink(link);
                AdminLogBLL.AddAdminLog(ShopLanguage.ReadLanguage("UpdateRecord"), ShopLanguage.ReadLanguage("Link"), link.ID);
                alertMessage = ShopLanguage.ReadLanguage("UpdateOK");
            }
            AdminBasePage.Alert(alertMessage, RequestHelper.RawUrl);
        }
Exemple #20
0
        protected void SubmitButton_Click(object sender, EventArgs E)
        {
            AdminGroupInfo adminGroup = new AdminGroupInfo();

            adminGroup.Id    = RequestHelper.GetQueryString <int>("ID");
            adminGroup.Name  = Name.Text;
            adminGroup.Power = RequestHelper.GetForm <string>("Rights").Replace(",", "|");
            adminGroup.Note  = Note.Text;
            if (adminGroup.Power != string.Empty)
            {
                adminGroup.Power = "|" + adminGroup.Power + "|";
            }
            string alertMessage = ShopLanguage.ReadLanguage("UpdateOK");

            if (adminGroup.Id == int.MinValue)
            {
                CheckAdminPower("AddAdminGroup", PowerCheckType.Single);
                int id = AdminGroupBLL.Add(adminGroup);
                AdminLogBLL.Add(ShopLanguage.ReadLanguage("AddRecord"), ShopLanguage.ReadLanguage("AdminGroup"), id);
            }
            else
            {
                CheckAdminPower("UpdateAdminGroup", PowerCheckType.Single);
                AdminGroupInfo tmpAdminGroup = AdminGroupBLL.Read(adminGroup.Id);
                adminGroup.AdminCount = tmpAdminGroup.AdminCount;
                adminGroup.AddDate    = tmpAdminGroup.AddDate;
                adminGroup.IP         = tmpAdminGroup.IP;

                AdminGroupBLL.Update(adminGroup);
                AdminLogBLL.Add(ShopLanguage.ReadLanguage("UpdateRecord"), ShopLanguage.ReadLanguage("AdminGroup"), adminGroup.Id);
                alertMessage = ShopLanguage.ReadLanguage("UpdateOK");
            }
            ScriptHelper.Alert(alertMessage, RequestHelper.RawUrl);
        }
Exemple #21
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);
        }
Exemple #22
0
 protected override void PageLoad()
 {
     base.PageLoad();
     AdminLogBLL.Add(ShopLanguage.ReadLanguage("LogoutSystem"));
     CookiesHelper.DeleteCookie(ShopConfig.ReadConfigInfo().AdminCookies);
     ResponseHelper.Redirect("/MobileAdmin/Login.html");
 }
Exemple #23
0
        protected void SubmitButton_Click(object sender, EventArgs E)
        {
            string    oldPassword = StringHelper.Password(Password.Text, (PasswordType)ShopConfig.ReadConfigInfo().PasswordType);
            string    newPassword = StringHelper.Password(NewPassword.Text, (PasswordType)ShopConfig.ReadConfigInfo().PasswordType);
            AdminInfo admin       = AdminBLL.Read(Cookies.Admin.GetAdminID(false));

            if (admin.Password == oldPassword)
            {
                AdminBLL.ChangePassword(Cookies.Admin.GetAdminID(false), oldPassword, newPassword);
                AdminLogBLL.Add(ShopLanguage.ReadLanguage("ChangePassword"));
                Task.Run(() => {
                    //安全码
                    ShopConfigInfo config = ShopConfig.ReadConfigInfo();
                    config.SecureKey      = Convert.ToBase64String(Guid.NewGuid().ToByteArray());
                    ShopConfig.UpdateConfigInfo(config);
                });
                //清除现有cookie
                CookiesHelper.DeleteCookie(ShopConfig.ReadConfigInfo().AdminCookies);
                ScriptHelper.Alert(ShopLanguage.ReadLanguage("UpdateOK"), RequestHelper.RawUrl);
            }
            else
            {
                ScriptHelper.Alert(ShopLanguage.ReadLanguage("OldPasswordError"), RequestHelper.RawUrl);
            }
        }
Exemple #24
0
        /// <summary>
        /// 清空回收站按钮点击方法
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void ClearButton_Click(object sender, EventArgs e)
        {
            CheckAdminPower("DeleteProduct", PowerCheckType.Single);
            List <ProductInfo> productRecycleList = ProductBLL.SearchList(new ProductSearchInfo {
                IsDelete = 1
            });
            string deleteID = string.Empty;

            foreach (ProductInfo pro in productRecycleList)
            {
                if (deleteID == string.Empty)
                {
                    deleteID = pro.Id.ToString();
                }
                else
                {
                    deleteID += "," + pro.Id.ToString();
                }
            }

            if (deleteID != string.Empty)
            {
                ProductBLL.Delete(deleteID);
                AdminLogBLL.Add(ShopLanguage.ReadLanguage("DeleteRecordCompletely"), ShopLanguage.ReadLanguage("Product"), deleteID);
                ScriptHelper.Alert(ShopLanguage.ReadLanguage("DeleteCompletelyOK"), RequestHelper.RawUrl);
            }
        }
        protected void SubmitButton_Click(object sender, EventArgs e)
        {
            int id      = RequestHelper.GetQueryString <int>("Id");
            var adImage = AdImageBLL.Read(id);

            adImage.Title         = Title.Text;
            adImage.SubTitle      = SubTitle.Text;
            adImage.LinkUrl       = StringHelper.Substring(LinkUrl.Text.Trim(), 192, false);
            adImage.ImageUrl      = ImageUrl.Text;
            adImage.OrderId       = int.Parse(OrderId.Text);
            adImage.MobileLinkUrl = BgColor.Text.Trim();
            int _classId = 0;

            int.TryParse(ProductClass.Text, out _classId);
            adImage.ClassId = _classId;

            string alertMessage = ShopLanguage.ReadLanguage("UpdateOK");

            if (adImage.Id > 0)
            {
                CheckAdminPower("UpdateAdImage", PowerCheckType.Single);
                AdImageBLL.Update(adImage);
                AdminLogBLL.Add(ShopLanguage.ReadLanguage("UpdateRecord"), ShopLanguage.ReadLanguage("AdImage"), adImage.Id);
            }
            else
            {
                CheckAdminPower("AddAdImage", PowerCheckType.Single);
                adImage.AdType = RequestHelper.GetQueryString <int>("fp_type");
                adImage.Tm     = DateTime.Now;
                id             = AdImageBLL.Add(adImage);
                AdminLogBLL.Add(ShopLanguage.ReadLanguage("AddRecord"), ShopLanguage.ReadLanguage("AdImage"), id);
                alertMessage = ShopLanguage.ReadLanguage("AddOK");
            }
            ScriptHelper.Alert(alertMessage, "FpImage.aspx?fp_type=" + adImage.AdType + "");
        }
Exemple #26
0
        protected void SubmitButton_Click(object sender, EventArgs e)
        {
            CourseCateInfo CourseClass = new CourseCateInfo();

            CourseClass.CateId       = RequestHelper.GetQueryString <int>("ID");
            CourseClass.ParentCateId = Convert.ToInt32(this.FatherID.Text);
            CourseClass.OrderIndex   = Convert.ToInt32(this.OrderID.Text);
            CourseClass.CateName     = this.ClassName.Text;
            CourseClass.CompanyId    = CompanyBLL.SystemCompanyId;
            string alertMessage = ShopLanguage.ReadLanguage("AddOK");

            if (CourseClass.CateId == -2147483648)
            {
                base.CheckAdminPower("AddCourseCate", PowerCheckType.Single);
                int id = CourseCateBLL.AddCourseCate(CourseClass);
                AdminLogBLL.AddAdminLog(ShopLanguage.ReadLanguage("AddRecord"), ShopLanguage.ReadLanguage("CourseCate"), id);
            }
            else
            {
                base.CheckAdminPower("UpdateCourseCate", PowerCheckType.Single);
                CourseCateBLL.UpdateCourseCate(CourseClass);
                AdminLogBLL.AddAdminLog(ShopLanguage.ReadLanguage("UpdateRecord"), ShopLanguage.ReadLanguage("CourseCate"), CourseClass.CateId);
                alertMessage = ShopLanguage.ReadLanguage("UpdateOK");
            }
            AdminBasePage.Alert(alertMessage, RequestHelper.RawUrl);
        }
        /// <summary>
        /// 提交按钮点击方法
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void SubmitButton_Click(object sender, EventArgs e)
        {
            PhotoSizeInfo photoSize = new PhotoSizeInfo();

            photoSize.Id = RequestHelper.GetQueryString <int>("ID");
            int photoType = (int)PhotoType.Article;

            if (!int.TryParse(Type.SelectedValue, out photoType))
            {
                photoType = (int)PhotoType.Article;
            }
            photoSize.Type      = photoType;
            photoSize.Title     = Title.Text;
            photoSize.Introduce = Introduce.Text;
            photoSize.Width     = Convert.ToInt32(Width.Text) < 0 ? 0 : Convert.ToInt32(Width.Text);
            photoSize.Height    = Convert.ToInt32(Height.Text) < 0 ? 0 : Convert.ToInt32(Height.Text);

            string alertMessage = ShopLanguage.ReadLanguage("AddOK");

            if (photoSize.Id == int.MinValue)
            {
                CheckAdminPower("AddPhotoSize", PowerCheckType.Single);
                int id = PhotoSizeBLL.Add(photoSize);
                AdminLogBLL.Add(ShopLanguage.ReadLanguage("AddRecord"), ShopLanguage.ReadLanguage("PhotoSize"), id);
            }
            else
            {
                CheckAdminPower("UpdatePhotoSize", PowerCheckType.Single);
                PhotoSizeBLL.Update(photoSize);
                AdminLogBLL.Add(ShopLanguage.ReadLanguage("UpdateRecord"), ShopLanguage.ReadLanguage("PhotoSize"), photoSize.Id);
                alertMessage = ShopLanguage.ReadLanguage("UpdateOK");
            }
            ScriptHelper.Alert(alertMessage, "photosize.aspx");
        }
Exemple #28
0
        protected void SubmitButton_Click(object sender, EventArgs e)
        {
            ArticleClassInfo articleClass = new ArticleClassInfo();

            articleClass.ID          = RequestHelper.GetQueryString <int>("ID");
            articleClass.FatherID    = Convert.ToInt32(this.FatherID.Text);
            articleClass.OrderID     = Convert.ToInt32(this.OrderID.Text);
            articleClass.ClassName   = this.ClassName.Text;
            articleClass.IsSystem    = 0;
            articleClass.Description = this.Description.Text;
            string alertMessage = ShopLanguage.ReadLanguage("AddOK");

            if (articleClass.ID == -2147483648)
            {
                base.CheckAdminPower("AddArticleClass", PowerCheckType.Single);
                int id = ArticleClassBLL.AddArticleClass(articleClass);
                AdminLogBLL.AddAdminLog(ShopLanguage.ReadLanguage("AddRecord"), ShopLanguage.ReadLanguage("ArticleClass"), id);
            }
            else
            {
                base.CheckAdminPower("UpdateArticleClass", PowerCheckType.Single);
                ArticleClassBLL.UpdateArticleClass(articleClass);
                AdminLogBLL.AddAdminLog(ShopLanguage.ReadLanguage("UpdateRecord"), ShopLanguage.ReadLanguage("ArticleClass"), articleClass.ID);
                alertMessage = ShopLanguage.ReadLanguage("UpdateOK");
            }
            AdminBasePage.Alert(alertMessage, RequestHelper.RawUrl);
        }
Exemple #29
0
        /// <summary>
        /// 页面加载方法
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!Page.IsPostBack)
            {
                CheckAdminPower("ReadProductBrand", PowerCheckType.Single);

                ProductBrandSearchInfo brandSearch = new ProductBrandSearchInfo();
                brandSearch.Key    = RequestHelper.GetQueryString <string>("Key");
                brandSearch.IsTop  = RequestHelper.GetQueryString <int>("IsTop");
                Key.Text           = brandSearch.Key;
                IsTop.Text         = brandSearch.IsTop.ToString();
                PageSize           = Session["AdminPageSize"] == null ? 20 : Convert.ToInt32(Session["AdminPageSize"]);
                AdminPageSize.Text = Session["AdminPageSize"] == null ? "20" : Session["AdminPageSize"].ToString();
                brandList          = ProductBrandBLL.SearchList(CurrentPage, PageSize, brandSearch, ref Count);
                //BindControl(ProductBrandBLL.ReadList(), RecordList);
                BindControl(brandList, RecordList, MyPager);

                if (RequestHelper.GetQueryString <string>("Action") == "Delete")
                {
                    int brandId = RequestHelper.GetQueryString <int>("ID");
                    if (brandId > 0)
                    {
                        CheckAdminPower("DeleteProductBrand", PowerCheckType.Single);
                        string URL = "ProductBrand.aspx?Action=search&";
                        URL += "Key=" + Key.Text + "&";
                        URL += "IsTop=" + IsTop.Text;
                        ProductBrandBLL.Delete(brandId);
                        AdminLogBLL.Add(ShopLanguage.ReadLanguage("DeleteRecord"), ShopLanguage.ReadLanguage("ProductBrand"), brandId.ToString());
                        ScriptHelper.Alert(ShopLanguage.ReadLanguage("DeleteOK"), URL);
                    }
                }
            }
        }
Exemple #30
0
        protected void SubmitButton_Click(object sender, EventArgs e)
        {
            StandardInfo standard = new StandardInfo();

            standard.ID         = RequestHelper.GetQueryString <int>("ID");
            standard.Name       = this.Name.Text;
            standard.DisplayTye = Convert.ToInt32(this.DisplayTye.Text);
            standard.ValueList  = RequestHelper.GetForm <string>("ValueList");
            standard.PhotoList  = RequestHelper.GetForm <string>("PhotoList");
            string alertMessage = ShopLanguage.ReadLanguage("AddOK");

            if (standard.ID == -2147483648)
            {
                base.CheckAdminPower("AddStandard", PowerCheckType.Single);
                int id = StandardBLL.AddStandard(standard);
                AdminLogBLL.AddAdminLog(ShopLanguage.ReadLanguage("AddRecord"), ShopLanguage.ReadLanguage("Standard"), id);
            }
            else
            {
                base.CheckAdminPower("UpdateStandard", PowerCheckType.Single);
                StandardBLL.UpdateStandard(standard);
                AdminLogBLL.AddAdminLog(ShopLanguage.ReadLanguage("UpdateRecord"), ShopLanguage.ReadLanguage("Standard"), standard.ID);
                alertMessage = ShopLanguage.ReadLanguage("UpdateOK");
            }
            AdminBasePage.Alert(alertMessage, RequestHelper.RawUrl);
        }