Exemplo n.º 1
0
        protected void SubmitButton_Click(object sender, EventArgs e)
        {
            EmailContentInfo emailContent = new EmailContentInfo();

            emailContent.Key          = RequestHelper.GetQueryString <string>("Key");
            emailContent.IsSystem     = RequestHelper.GetQueryString <int>("IsSystem");
            emailContent.EmailTitle   = this.EmailTitle.Text;
            emailContent.EmailContent = this.EmailContent.Value;
            string alertMessage = ShopLanguage.ReadLanguage("AddOK");

            if (emailContent.Key == string.Empty)
            {
                emailContent.Key = Guid.NewGuid().ToString();
                base.CheckAdminPower("AddEmailContent", PowerCheckType.Single);
                EmailContentHelper.AddEmailContent(emailContent);
                AdminLogBLL.AddAdminLog(ShopLanguage.ReadLanguage("AddRecord"), ShopLanguage.ReadLanguage("EmailContent"), emailContent.Key);
            }
            else
            {
                base.CheckAdminPower("UpdateEmailContent", PowerCheckType.Single);
                EmailContentHelper.UpdateEmailContent(emailContent);
                AdminLogBLL.AddAdminLog(ShopLanguage.ReadLanguage("UpdateRecord"), ShopLanguage.ReadLanguage("EmailContent"), emailContent.Key);
                alertMessage = ShopLanguage.ReadLanguage("UpdateOK");
            }
            AdminBasePage.Alert(alertMessage, RequestHelper.RawUrl);
        }
Exemplo n.º 2
0
        protected void SubmitButton_Click(object sender, EventArgs e)
        {
            VoteInfo vote = new VoteInfo();

            vote.ID       = RequestHelper.GetQueryString <int>("ID");
            vote.VoteType = Convert.ToInt32(this.VoteType.Text);
            vote.Title    = this.Title.Text;
            vote.Note     = this.Note.Text;
            string alertMessage = ShopLanguage.ReadLanguage("AddOK");

            if (vote.ID == -2147483648)
            {
                base.CheckAdminPower("AddVote", PowerCheckType.Single);
                int id = VoteBLL.AddVote(vote);
                AdminLogBLL.AddAdminLog(ShopLanguage.ReadLanguage("AddRecord"), ShopLanguage.ReadLanguage("Vote"), id);
            }
            else
            {
                base.CheckAdminPower("UpdateVote", PowerCheckType.Single);
                VoteBLL.UpdateVote(vote);
                AdminLogBLL.AddAdminLog(ShopLanguage.ReadLanguage("UpdateRecord"), ShopLanguage.ReadLanguage("Vote"), vote.ID);
                alertMessage = ShopLanguage.ReadLanguage("UpdateOK");
            }
            AdminBasePage.Alert(alertMessage, RequestHelper.RawUrl);
        }
Exemplo n.º 3
0
        protected void SubmitButton_Click(object sender, EventArgs E)
        {
            AdminGroupInfo adminGroup = new AdminGroupInfo();

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

            if (adminGroup.ID == -2147483648)
            {
                base.CheckAdminPower("AddAdminGroup", PowerCheckType.Single);
                int id = AdminGroupBLL.AddAdminGroup(adminGroup);
                AdminLogBLL.AddAdminLog(ShopLanguage.ReadLanguage("AddRecord"), ShopLanguage.ReadLanguage("AdminGroup"), id);
            }
            else
            {
                base.CheckAdminPower("UpdateAdminGroup", PowerCheckType.Single);
                AdminGroupBLL.UpdateAdminGroup(adminGroup);
                AdminLogBLL.AddAdminLog(ShopLanguage.ReadLanguage("UpdateRecord"), ShopLanguage.ReadLanguage("AdminGroup"), adminGroup.ID);
                alertMessage = ShopLanguage.ReadLanguage("UpdateOK");
            }
            AdminBasePage.Alert(alertMessage, RequestHelper.RawUrl);
        }
Exemplo n.º 4
0
        protected void SubmitButton_Click(object sender, EventArgs e)
        {
            MenuInfo menu = new MenuInfo();

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

            if (menu.ID == -2147483648)
            {
                base.CheckAdminPower("AddMenu", PowerCheckType.Single);
                int id = MenuBLL.AddMenu(menu);
                AdminLogBLL.AddAdminLog(ShopLanguage.ReadLanguage("AddRecord"), ShopLanguage.ReadLanguage("Menu"), id);
            }
            else
            {
                base.CheckAdminPower("UpdateMenu", PowerCheckType.Single);
                MenuBLL.UpdateMenu(menu);
                AdminLogBLL.AddAdminLog(ShopLanguage.ReadLanguage("UpdateRecord"), ShopLanguage.ReadLanguage("Menu"), menu.ID);
                alertMessage = ShopLanguage.ReadLanguage("UpdateOK");
            }
            AdminBasePage.Alert(alertMessage, RequestHelper.RawUrl);
        }
Exemplo n.º 5
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);
        }
Exemplo n.º 6
0
        protected void SubmitButton_Click(object sender, EventArgs e)
        {
            UserGradeInfo userGrade = new UserGradeInfo();

            userGrade.ID       = RequestHelper.GetQueryString <int>("ID");
            userGrade.Name     = this.Name.Text;
            userGrade.MinMoney = Convert.ToDecimal(this.MinMoney.Text);
            userGrade.MaxMoney = Convert.ToDecimal(this.MaxMoney.Text);
            userGrade.Discount = Convert.ToDecimal(this.Discount.Text);
            string alertMessage = ShopLanguage.ReadLanguage("AddOK");

            if (userGrade.ID == -2147483648)
            {
                base.CheckAdminPower("AddUserGrade", PowerCheckType.Single);
                int id = UserGradeBLL.AddUserGrade(userGrade);
                AdminLogBLL.AddAdminLog(ShopLanguage.ReadLanguage("AddRecord"), ShopLanguage.ReadLanguage("UserGrade"), id);
            }
            else
            {
                base.CheckAdminPower("UpdateUserGrade", PowerCheckType.Single);
                UserGradeBLL.UpdateUserGrade(userGrade);
                AdminLogBLL.AddAdminLog(ShopLanguage.ReadLanguage("UpdateRecord"), ShopLanguage.ReadLanguage("UserGrade"), userGrade.ID);
                alertMessage = ShopLanguage.ReadLanguage("UpdateOK");
            }
            AdminBasePage.Alert(alertMessage, RequestHelper.RawUrl);
        }
Exemplo n.º 7
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);
        }
Exemplo n.º 8
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);
        }
Exemplo n.º 9
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);
        }
Exemplo n.º 10
0
        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);
        }
Exemplo n.º 11
0
        protected void SubmitButton_Click(object sender, EventArgs e)
        {
            string queryString  = RequestHelper.GetQueryString <string>("Path");
            string alertMessage = string.Empty;

            if (queryString.ToLower().StartsWith("/upload/harddisk/"))
            {
                string directoryName = queryString + this.DirectoryName.Text + "/";
                if (FileHelper.SafeDirectoryName(this.DirectoryName.Text) && FileHelper.SafeFullDirectoryName(directoryName))
                {
                    if (Directory.Exists(directoryName))
                    {
                        alertMessage = ShopLanguage.ReadLanguage("ExsitsThisDirectory");
                    }
                    else
                    {
                        Directory.CreateDirectory(ServerHelper.MapPath(directoryName));
                        alertMessage = ShopLanguage.ReadLanguage("AddOK");
                    }
                }
                else
                {
                    alertMessage = ShopLanguage.ReadLanguage("ErrorPathName");
                }
            }
            else
            {
                alertMessage = ShopLanguage.ReadLanguage("DirectoryStartWith");
            }
            AdminBasePage.Alert(alertMessage, RequestHelper.RawUrl);
        }
Exemplo n.º 12
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);
        }
Exemplo n.º 13
0
        protected void SubmitButton_Click(object sender, EventArgs e)
        {
            AdminInfo admin = new AdminInfo();

            admin.ID = RequestHelper.GetQueryString <int>("ID");
            if (admin.ID > 0)
            {
                admin = AdminBLL.ReadAdmin(admin.ID);
            }
            admin.Name          = this.Name.Text;
            admin.Email         = this.Email.Text;
            admin.GroupID       = Convert.ToInt32(this.GroupID.Text);
            admin.Password      = StringHelper.Password(this.Password.Text, (PasswordType)ShopConfig.ReadConfigInfo().PasswordType);
            admin.LastLoginDate = RequestHelper.DateNow;
            admin.LastLoginIP   = ClientHelper.IP;
            admin.IsCreate      = 0;
            string alertMessage = ShopLanguage.ReadLanguage("AddOK");

            if (admin.ID == -2147483648)
            {
                base.CheckAdminPower("AddAdmin", PowerCheckType.Single);
                int id = AdminBLL.AddAdmin(admin);
                AdminLogBLL.AddAdminLog(ShopLanguage.ReadLanguage("AddRecord"), ShopLanguage.ReadLanguage("Admin"), id);
            }
            else
            {
                base.CheckAdminPower("UpdateAdmin", PowerCheckType.Single);
                AdminBLL.UpdateAdmin(admin);
                AdminLogBLL.AddAdminLog(ShopLanguage.ReadLanguage("UpdateRecord"), ShopLanguage.ReadLanguage("Admin"), admin.ID);
                alertMessage = ShopLanguage.ReadLanguage("UpdateOK");
            }
            AdminBasePage.Alert(alertMessage, RequestHelper.RawUrl);
        }
Exemplo n.º 14
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);
        }
Exemplo n.º 15
0
        protected void SubmitButton_Click(object sender, EventArgs e)
        {
            SendMessageInfo sendMessage = new SendMessageInfo();

            sendMessage.Title      = this.Title.Text;
            sendMessage.Content    = this.Content.Text;
            sendMessage.Date       = RequestHelper.DateNow;
            sendMessage.ToUserID   = RequestHelper.GetIntsForm("UserIDList");
            sendMessage.ToUserName = RequestHelper.GetForm <string>("UserNameList");
            sendMessage.UserID     = 0;
            sendMessage.UserName   = string.Empty;
            sendMessage.IsAdmin    = 1;
            base.CheckAdminPower("AddSendMessage", PowerCheckType.Single);
            int id = SendMessageBLL.AddSendMessage(sendMessage);

            string[] strArray  = sendMessage.ToUserID.Split(new char[] { ',' });
            string[] strArray2 = sendMessage.ToUserName.Split(new char[] { ',' });
            for (int i = 0; i < strArray.Length; i++)
            {
                ReceiveMessageInfo receiveMessage = new ReceiveMessageInfo();
                receiveMessage.Title        = sendMessage.Title;
                receiveMessage.Content      = sendMessage.Content;
                receiveMessage.Date         = sendMessage.Date;
                receiveMessage.IsRead       = 0;
                receiveMessage.IsAdmin      = 1;
                receiveMessage.FromUserID   = 0;
                receiveMessage.FromUserName = string.Empty;
                receiveMessage.UserID       = Convert.ToInt32(strArray[i]);
                receiveMessage.UserName     = strArray2[i];
                ReceiveMessageBLL.AddReceiveMessage(receiveMessage);
            }
            AdminLogBLL.AddAdminLog(ShopLanguage.ReadLanguage("AddRecord"), ShopLanguage.ReadLanguage("SendMessage"), id);
            AdminBasePage.Alert(ShopLanguage.ReadLanguage("AddOK"), RequestHelper.RawUrl);
        }
Exemplo n.º 16
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);
        }
Exemplo n.º 17
0
        protected void SubmitButton_Click(object sender, EventArgs e)
        {
            ProductBrandInfo productBrand = new ProductBrandInfo();;

            productBrand.ID           = RequestHelper.GetQueryString <int>("ID");
            productBrand.Name         = this.Name.Text;
            productBrand.Logo         = this.Logo.Text;
            productBrand.Url          = this.Url.Text;
            productBrand.Description  = this.Description.Text;
            productBrand.IsTop        = Convert.ToInt32(this.IsTop.Text);
            productBrand.ProductCount = 0;
            string alertMessage = ShopLanguage.ReadLanguage("AddOK");

            if (productBrand.ID == -2147483648)
            {
                base.CheckAdminPower("AddProductBrand", PowerCheckType.Single);
                int id = ProductBrandBLL.AddProductBrand(productBrand);
                AdminLogBLL.AddAdminLog(ShopLanguage.ReadLanguage("AddRecord"), ShopLanguage.ReadLanguage("ProductBrand"), id);
            }
            else
            {
                base.CheckAdminPower("UpdateProductBrand", PowerCheckType.Single);
                ProductBrandBLL.UpdateProductBrand(productBrand);
                AdminLogBLL.AddAdminLog(ShopLanguage.ReadLanguage("UpdateRecord"), ShopLanguage.ReadLanguage("ProductBrand"), productBrand.ID);
                alertMessage = ShopLanguage.ReadLanguage("UpdateOK");
            }
            AdminBasePage.Alert(alertMessage, RequestHelper.RawUrl);
        }
Exemplo n.º 18
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);
        }
Exemplo n.º 19
0
        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);
        }
Exemplo n.º 20
0
        protected void SubmitButton_Click(object sender, EventArgs e)
        {
            ArticleInfo article = new ArticleInfo();

            article.ID       = RequestHelper.GetQueryString <int>("ID");
            article.Title    = this.Title.Text;
            article.ClassID  = ArticleClassBLL.ReadArticleClassFullFatherID(Convert.ToInt32(this.ClassID.Text));
            article.IsTop    = Convert.ToInt32(this.IsTop.Text);
            article.Author   = this.Author.Text;
            article.Resource = this.Resource.Text;
            article.Keywords = this.Keywords.Text;
            article.Url      = this.Url.Text;
            article.Photo    = this.Photo.Text;
            article.Summary  = this.Summary.Text;
            article.Content  = this.Content.Value;
            article.Date     = RequestHelper.DateNow;
            string alertMessage = ShopLanguage.ReadLanguage("AddOK");

            if (article.ID == -2147483648)
            {
                base.CheckAdminPower("AddArticle", PowerCheckType.Single);
                int id = ArticleBLL.AddArticle(article);
                AdminLogBLL.AddAdminLog(ShopLanguage.ReadLanguage("AddRecord"), ShopLanguage.ReadLanguage("Article"), id);
            }
            else
            {
                base.CheckAdminPower("UpdateArticle", PowerCheckType.Single);
                ArticleBLL.UpdateArticle(article);
                AdminLogBLL.AddAdminLog(ShopLanguage.ReadLanguage("UpdateRecord"), ShopLanguage.ReadLanguage("Article"), article.ID);
                alertMessage = ShopLanguage.ReadLanguage("UpdateOK");
            }
            AdminBasePage.Alert(alertMessage, RequestHelper.RawUrl);
        }
Exemplo n.º 21
0
        protected void SubmitButton_Click(object sender, EventArgs e)
        {
            AdminInfo admin = AdminBLL.ReadAdmin(Cookies.Admin.GetAdminID(false));

            admin.NoteBook = this.NoteBookContent.Text;
            AdminBLL.UpdateAdmin(admin);
            AdminBasePage.Alert(ShopLanguage.ReadLanguage("UpdateOK"), RequestHelper.RawUrl);
        }
Exemplo n.º 22
0
        protected void SubmitButton_Click(object sender, EventArgs e)
        {
            ProductInfo product = new ProductInfo();

            product.ID                = RequestHelper.GetQueryString <int>("ID");
            product.Name              = this.Name.Text;
            product.Spelling          = ChineseCharacterHelper.GetFirstLetter(this.Name.Text);
            product.Color             = RequestHelper.GetForm <string>("ProductColor");
            product.FontStyle         = this.FontStyle.Text;
            product.ProductNumber     = this.ProductNumber.Text;
            product.ClassID           = this.ProductClass.ClassIDList;
            product.Keywords          = this.Keywords.Text;
            product.BrandID           = this.BrandID.Text;
            product.MarketPrice       = Convert.ToDecimal(this.MarketPrice.Text);
            product.SendPoint         = Convert.ToInt32(this.SendPoint.Text);
            product.Photo             = this.Photo.Text;
            product.Summary           = this.Summary.Text;
            product.Introduction      = this.Introduction.Value;
            product.Weight            = Convert.ToInt32(this.Weight.Text);
            product.IsSpecial         = Convert.ToInt32(this.IsSpecial.Text);
            product.IsNew             = Convert.ToInt32(this.IsNew.Text);
            product.IsHot             = Convert.ToInt32(this.IsHot.Text);
            product.IsSale            = Convert.ToInt32(this.IsSale.Text);
            product.IsTop             = Convert.ToInt32(this.IsTop.Text);
            product.Remark            = this.Remark.Text;
            product.Accessory         = RequestHelper.GetForm <string>("RelationAccessoryID");
            product.RelationProduct   = RequestHelper.GetForm <string>("RelationProductID");
            product.RelationArticle   = RequestHelper.GetForm <string>("RelationArticleID");
            product.AllowComment      = Convert.ToInt32(this.AllowComment.Text);
            product.TotalStorageCount = Convert.ToInt32(this.TotalStorageCount.Text);
            product.LowerCount        = Convert.ToInt32(this.LowerCount.Text);
            product.UpperCount        = Convert.ToInt32(this.UpperCount.Text);
            product.AttributeClassID  = Convert.ToInt32(this.AttributeClassID.Text);
            product.StandardType      = Convert.ToInt32(this.StandardType.Text);
            product.AddDate           = RequestHelper.DateNow;
            string alertMessage = ShopLanguage.ReadLanguage("AddOK");

            if (product.ID == -2147483648)
            {
                base.CheckAdminPower("AddProduct", PowerCheckType.Single);
                int productID = ProductBLL.AddProduct(product);
                this.AddProductPhoto(productID);
                AdminLogBLL.AddAdminLog(ShopLanguage.ReadLanguage("AddRecord"), ShopLanguage.ReadLanguage("Product"), productID);
            }
            else
            {
                base.CheckAdminPower("UpdateProduct", PowerCheckType.Single);
                ProductBLL.UpdateProduct(product);
                AdminLogBLL.AddAdminLog(ShopLanguage.ReadLanguage("UpdateRecord"), ShopLanguage.ReadLanguage("Product"), product.ID);
                alertMessage = ShopLanguage.ReadLanguage("UpdateOK");
            }
            this.HanderAttribute(product);
            this.HanderMemberPrice(product.ID);
            this.HanderProductStandard(product);
            AdminBasePage.Alert(alertMessage, RequestHelper.RawUrl);
        }
Exemplo n.º 23
0
        protected void SubmitButton_Click(object sender, EventArgs e)
        {
            string queryString  = RequestHelper.GetQueryString <string>("Key");
            string alertMessage = ShopLanguage.ReadLanguage("UpdateOK");

            base.CheckAdminPower("UpdateLoginPlugins", PowerCheckType.Single);
            this.HanlerCanChangLoginPlugins(queryString);
            AdminLogBLL.AddAdminLog(ShopLanguage.ReadLanguage("UpdateRecord"), ShopLanguage.ReadLanguage("LoginPlugins"));
            AdminBasePage.Alert(alertMessage, RequestHelper.RawUrl);
        }
Exemplo n.º 24
0
        protected void SubmitButton_Click(object sender, EventArgs E)
        {
            int queryString = RequestHelper.GetQueryString <int>("ID");

            if (queryString != -2147483648)
            {
                string newPassword = StringHelper.Password(this.NewPassword.Text, (PasswordType)ShopConfig.ReadConfigInfo().PasswordType);
                UserBLL.ChangePassword(queryString, newPassword);
                AdminLogBLL.AddAdminLog(ShopLanguage.ReadLanguage("ChangeUserPassword"), queryString);
                AdminBasePage.Alert(ShopLanguage.ReadLanguage("UpdateOK"), RequestHelper.RawUrl);
            }
        }
Exemplo n.º 25
0
        protected void SubmitButton_Click(object sender, EventArgs e)
        {
            AdInfo ad = new AdInfo();

            ad.ID           = RequestHelper.GetQueryString <int>("ID");
            ad.Title        = this.Title.Text;
            ad.Introduction = this.Introduction.Text;
            ad.AdClass      = Convert.ToInt32(this.AdClass.Text);
            if (ad.AdClass == 1)
            {
                ad.Display = this.TextDisplay.Text;
                ad.Url     = this.TextURL.Text;
            }
            else if (ad.AdClass == 2)
            {
                ad.Display = this.PictureDisplay.Text;
                ad.Url     = this.PictureURL.Text;
            }
            else if (ad.AdClass == 3)
            {
                ad.Display = this.FlashDisplay.Text;
                ad.Url     = string.Empty;
            }
            else
            {
                ad.Display = this.CodeDisplay.Text;
                ad.Url     = string.Empty;
            }
            ad.Width     = Convert.ToInt32(this.Width.Text);
            ad.Height    = Convert.ToInt32(this.Height.Text);
            ad.StartDate = Convert.ToDateTime(this.StartDate.Text);
            ad.EndDate   = Convert.ToDateTime(this.EndDate.Text).AddDays(1.0).AddSeconds(-1.0);
            ad.Remark    = this.Remark.Text;
            ad.IsEnabled = Convert.ToInt32(this.IsEnabled.Text);
            string alertMessage = ShopLanguage.ReadLanguage("AddOK");

            if (ad.ID == -2147483648)
            {
                base.CheckAdminPower("AddAd", PowerCheckType.Single);
                int id = AdBLL.AddAd(ad);
                AdminLogBLL.AddAdminLog(ShopLanguage.ReadLanguage("AddRecord"), ShopLanguage.ReadLanguage("Ad"), id);
            }
            else
            {
                base.CheckAdminPower("UpdateAd", PowerCheckType.Single);
                AdBLL.UpdateAd(ad);
                AdminLogBLL.AddAdminLog(ShopLanguage.ReadLanguage("UpdateRecord"), ShopLanguage.ReadLanguage("Ad"), ad.ID);
                alertMessage = ShopLanguage.ReadLanguage("UpdateOK");
            }
            AdminBasePage.Alert(alertMessage, RequestHelper.RawUrl);
        }
Exemplo n.º 26
0
        protected void SubmitButton_Click(object sender, EventArgs e)
        {
            base.CheckAdminPower("UpdateCourse", PowerCheckType.Single);
            string courseID = RequestHelper.GetQueryString <string>("CourseID");

            if (this.CateId.SelectedValue == "-1")
            {
                ScriptHelper.Alert("请选择类别");
            }

            CourseBLL.UpdateCourse(courseID, Convert.ToInt32(this.CateId.SelectedValue));
            AdminLogBLL.AddAdminLog(ShopLanguage.ReadLanguage("UpdateRecord"), ShopLanguage.ReadLanguage("Course"), courseID);
            AdminBasePage.Alert(ShopLanguage.ReadLanguage("UpdateOK"), RequestHelper.RawUrl);
        }
Exemplo n.º 27
0
        protected void SubmitButton_Click(object sender, EventArgs e)
        {
            int queryString = RequestHelper.GetQueryString <int>("ID");

            int      ParentId  = RequestHelper.GetForm <int>(ShopConfig.ReadConfigInfo().NamePrefix + "CateId");
            PostInfo PostModel = new PostInfo();

            PostModel.PostName   = this.PostName.Text;
            PostModel.PostId     = queryString;
            PostModel.ParentId   = ParentId;
            PostModel.OrderIndex = int.Parse(OrderIndex.Text);
            PostModel.CompanyID  = RequestHelper.GetForm <int>("CompanyId");
            if (IsPost.Checked)
            {
                PostModel.IsPost = 1;
            }
            else
            {
                PostModel.IsPost = 0;
            }

            //PostModel.PostPlan = RequestHelper.GetIntsForm("SelectId");
            string alertMessage = ShopLanguage.ReadLanguage("AddOK");

            if (PostModel.PostId == -2147483648)
            {
                base.CheckAdminPower("AddPost", PowerCheckType.Single);
                int id = PostBLL.AddPost(PostModel);

                //自动把客户公司专属的岗位添加到对应的公司信息里
                if (PostModel.CompanyID > 0 && PostModel.IsPost == 1)
                {
                    CompanyInfo company = CompanyBLL.ReadCompany(PostModel.CompanyID);
                    company.Post = string.IsNullOrEmpty(company.Post) ? id.ToString() : company.Post + "," + id.ToString();
                    CompanyBLL.UpdateCompany(company);
                }
                AdminLogBLL.AddAdminLog(ShopLanguage.ReadLanguage("AddRecord"), ShopLanguage.ReadLanguage("Post"), id);
            }
            else
            {
                base.CheckAdminPower("UpdatePost", PowerCheckType.Single);
                PostModel.PostPlan = PostBLL.ReadPost(queryString).PostPlan;
                PostBLL.UpdatePost(PostModel);
                AdminLogBLL.AddAdminLog(ShopLanguage.ReadLanguage("UpdateRecord"), ShopLanguage.ReadLanguage("Post"), queryString);
                alertMessage = ShopLanguage.ReadLanguage("UpdateOK");
            }
            AdminBasePage.Alert(alertMessage, RequestHelper.RawUrl);
        }
Exemplo n.º 28
0
        protected void SubmitButton_Click(object sender, EventArgs e)
        {
            EmailSendRecordInfo info;

            info           = new EmailSendRecordInfo();
            info.Title     = this.Title.Text;
            info.Content   = this.Content.Text;
            info.IsSystem  = 0;
            info.EmailList = RequestHelper.GetForm <string>("ToUserEmail");
            info.IsStatisticsOpendEmail = 0;
            info.SendStatus             = 1;
            info.AddDate  = RequestHelper.DateNow;
            info.SendDate = RequestHelper.DateNow;
            info.ID       = EmailSendRecordBLL.AddEmailSendRecord(info);
            EmailSendRecordBLL.SendEmail(info);
            AdminBasePage.Alert(ShopLanguage.ReadLanguage("SendEmailOK"), RequestHelper.RawUrl);
        }
Exemplo n.º 29
0
        protected void SubmitButton_Click(object sender, EventArgs e)
        {
            ThemeActivityInfo themeActivity = new ThemeActivityInfo();

            themeActivity.ID          = RequestHelper.GetQueryString <int>("ID");
            themeActivity.Name        = this.Name.Text;
            themeActivity.Photo       = this.Photo.Text;
            themeActivity.Description = this.Description.Text;
            themeActivity.Css         = this.Css.Text;
            int    form = RequestHelper.GetForm <int>("ProductGroupCount");
            string str  = string.Empty;

            for (int i = 0; i < form; i++)
            {
                if (RequestHelper.GetForm <string>("ProductGroupValue" + i) != string.Empty)
                {
                    str = str + RequestHelper.GetForm <string>("ProductGroupValue" + i) + "#";
                }
            }
            if (str.EndsWith("#"))
            {
                str = str.Substring(0, str.Length - 1);
            }
            themeActivity.ProductGroup = str;
            themeActivity.Style        = string.Concat(new object[] {
                this.TopImage.Text, '|', this.BackgroundImage.Text, '|', this.BottomImage.Text, '|', this.ProductColor.Text, '|', this.ProductSize.Text, '|', this.PriceColor.Text, '|', this.PriceSize.Text, '|', this.OtherColor.Text, '|',
                this.OtherSize.Text
            });
            string alertMessage = ShopLanguage.ReadLanguage("AddOK");

            if (themeActivity.ID == -2147483648)
            {
                base.CheckAdminPower("AddThemeActivity", PowerCheckType.Single);
                int id = ThemeActivityBLL.AddThemeActivity(themeActivity);
                AdminLogBLL.AddAdminLog(ShopLanguage.ReadLanguage("AddRecord"), ShopLanguage.ReadLanguage("ThemeActivity"), id);
            }
            else
            {
                base.CheckAdminPower("UpdateThemeActivity", PowerCheckType.Single);
                ThemeActivityBLL.UpdateThemeActivity(themeActivity);
                AdminLogBLL.AddAdminLog(ShopLanguage.ReadLanguage("UpdateRecord"), ShopLanguage.ReadLanguage("ThemeActivity"), themeActivity.ID);
                alertMessage = ShopLanguage.ReadLanguage("UpdateOK");
            }
            AdminBasePage.Alert(alertMessage, RequestHelper.RawUrl);
        }
Exemplo n.º 30
0
        protected void SubmitButton_Click(object sender, EventArgs e)
        {
            UserMessageInfo userMessage = new UserMessageInfo();

            userMessage.ID                = RequestHelper.GetQueryString <int>("ID");
            userMessage.IsHandler         = Convert.ToInt32(this.IsHandler.Text);
            userMessage.AdminReplyContent = this.AdminReplyContent.Text;
            userMessage.AdminReplyDate    = RequestHelper.DateNow;
            userMessage.IsChecked         = Convert.ToInt32(this.IsChecked.Text);
            string alertMessage = ShopLanguage.ReadLanguage("ReplyOK");

            if (userMessage.ID > 0)
            {
                base.CheckAdminPower("UpdateUserMessage", PowerCheckType.Single);
                UserMessageBLL.UpdateUserMessage(userMessage);
                AdminLogBLL.AddAdminLog(ShopLanguage.ReadLanguage("UpdateRecord"), ShopLanguage.ReadLanguage("UserMessage"), userMessage.ID);
            }
            AdminBasePage.Alert(alertMessage, RequestHelper.RawUrl);
        }