Example #1
0
        /// <summary>
        /// 提交按钮点击方法
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void SubmitButton_Click(object sender, EventArgs e)
        {
            CheckAdminPower("UpdateConfig", PowerCheckType.Single);
            ShopConfigInfo config = ShopConfig.ReadConfigInfo();
            //满立减
            decimal orderMoney = 0; decimal orderDiscount = 0;

            config.PayDiscount = RequestHelper.GetForm <int>("ctl00$ContentPlaceHolder$PayDiscount");
            if (config.PayDiscount == 1)
            {
                if (!decimal.TryParse(OrderMoney.Text, out orderMoney) || !decimal.TryParse(OrderDisCount.Text, out orderDiscount))
                {
                    ScriptHelper.Alert("满立减金额填写错误");
                }
                if (orderMoney <= orderDiscount)
                {
                    ScriptHelper.Alert("满立减金额必须小于订单金额");
                }
            }
            config.OrderMoney    = orderMoney;
            config.OrderDisCount = orderDiscount;
            ShopConfig.UpdateConfigInfo(config);
            AdminLogBLL.Add(ShopLanguage.ReadLanguage("UpdateConfig"));
            ScriptHelper.Alert(ShopLanguage.ReadLanguage("UpdateOK"), RequestHelper.RawUrl);
        }
Example #2
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);
            }
        }
Example #3
0
        protected void SubmitButton_Click(object sender, EventArgs e)
        {
            base.CheckAdminPower("Sitemap", PowerCheckType.Single);
            ShopConfigInfo config = ShopConfig.ReadConfigInfo();

            config.Domain    = this.Domain.Text;
            config.Frequency = this.Frequency.Text;
            config.Priority  = this.Priority.Text;
            ShopConfig.UpdateConfigInfo(config);
            ScriptHelper.Alert(ShopLanguage.ReadLanguage("UpdateOK"), RequestHelper.RawUrl);
        }
Example #4
0
        protected void SubmitButton_Click(object sender, EventArgs e)
        {
            base.CheckAdminPower("TaobaoProduct", PowerCheckType.Single);
            ShopConfigInfo config = ShopConfig.ReadConfigInfo();

            config.AppKey             = this.AppKey.Text;
            config.AppSecret          = this.AppSecret.Text;
            config.NickName           = this.NickName.Text;
            config.DeleteProductClass = Convert.ToInt32(this.DeleteProductClass.Text);
            ShopConfig.UpdateConfigInfo(config);
            ScriptHelper.Alert(ShopLanguage.ReadLanguage("UpdateOK"), RequestHelper.RawUrl);
        }
Example #5
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!this.Page.IsPostBack)
     {
         base.CheckAdminPower("Template", PowerCheckType.Single);
         string queryString = RequestHelper.GetQueryString <string>("Action");
         string str2        = RequestHelper.GetQueryString <string>("Path");
         if ((queryString == "Active") && (str2 != string.Empty))
         {
             ShopConfigInfo config = ShopConfig.ReadConfigInfo();
             config.TemplatePath = str2;
             ShopConfig.UpdateConfigInfo(config);
             ScriptHelper.Alert("ÆôÓóɹ¦", "Template.aspx");
         }
         this.templatePluginsList = TemplatePlugins.ReadTemplatePluginsList();
     }
 }
        protected void SubmitButton_Click(object sender, EventArgs E)
        {
            int tempAdminID = RequestHelper.GetQueryString <int>("ID");

            if (tempAdminID != int.MinValue)
            {
                string newPassword = StringHelper.Password(NewPassword.Text, (PasswordType)ShopConfig.ReadConfigInfo().PasswordType);
                AdminBLL.ChangePassword(tempAdminID, newPassword);
                Task.Run(() => {
                    //安全码
                    ShopConfigInfo config = ShopConfig.ReadConfigInfo();
                    config.SecureKey      = Convert.ToBase64String(Guid.NewGuid().ToByteArray());
                    ShopConfig.UpdateConfigInfo(config);
                });
                AdminLogBLL.Add(ShopLanguage.ReadLanguage("ChangeAdminPassword"), tempAdminID);
                ScriptHelper.Alert(ShopLanguage.ReadLanguage("UpdateOK"), RequestHelper.RawUrl);
            }
        }
Example #7
0
        /// <summary>
        /// 提交按钮点击方法
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void SubmitButton_Click(object sender, EventArgs e)
        {
            CheckAdminPower("UpdateConfig", PowerCheckType.Single);
            ShopConfigInfo config = ShopConfig.ReadConfigInfo();

            #region 微信登录参数
            config.AppID            = AppID.Text.Trim();
            config.Appsecret        = AppSecret.Text.Trim();
            config.Token            = Token.Text.Trim();
            config.EncodingAESKey   = EncodingAESKey.Text.Trim();
            config.WechatLoginURL   = WechatLoginURL.Text.Trim();
            config.AttentionTitle   = AttentionTitle.Text;
            config.AttentionSummary = AttentionSummary.Text;
            config.AttentionPicture = AttentionPicture.Text;
            config.DefaultReply     = DefaultReply.Text;
            #endregion
            ShopConfig.UpdateConfigInfo(config);
            AdminLogBLL.Add(ShopLanguage.ReadLanguage("UpdateConfig"));
            ScriptHelper.Alert(ShopLanguage.ReadLanguage("UpdateOK"), RequestHelper.RawUrl);
        }
        /// <summary>
        /// 提交按钮点击方法
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void SubmitButton_Click(object sender, EventArgs e)
        {
            CheckAdminPower("UpdateConfig", PowerCheckType.Single);
            ShopConfigInfo config = ShopConfig.ReadConfigInfo();

            //订单支付模板Id
            config.OrderPayTemplateId = OrderPayTemplateId.Text.Trim();
            //订单自提模板Id
            config.SelfPickTemplateId = SelfPickTemplateId.Text.Trim();
            //开团成功模板Id
            config.OpenGroupTemplateId = OpenGroupTemplateId.Text.Trim();
            //参团成功模板Id
            config.GroupSignTemplateId = GroupSignTemplateId.Text.Trim();
            //砍价成功模板Id
            config.BarGainTemplateId = BarGainTemplateId.Text.Trim();
            //拼团成功模板Id
            config.GroupSuccessTemplateId = GroupSuccessTemplateId.Text.Trim();
            //拼团失败模板Id
            config.GroupFailTemplateId = GroupFailTemplateId.Text.Trim();
            //积分抵现功能是否开启
            config.EnablePointPay = RequestHelper.GetForm <int>("ctl00$ContentPlaceHolder$EnablePointPay");
            config.PointToMoney   = Convert.ToInt32(PointToMoney.Text) < 0 ? 0 : Convert.ToInt32(PointToMoney.Text);
            if (config.EnablePointPay == 1 && (config.PointToMoney <= 0 || config.PointToMoney > 100))
            {
                ScriptHelper.Alert("积分抵现百分比必须大于0小于100");
            }

            if ((config.VoteStartDate - config.VoteEndDate).Days > 0)
            {
                ScriptHelper.Alert("投票结束日期不得小于开始日期");
            }
            //订单付款时限,不小于0
            config.OrderPayTime = Convert.ToInt32(OrderPayTime.Text) < 0 ? 0 : Convert.ToInt32(OrderPayTime.Text);
            //订单单自动收货天数
            config.OrderRecieveShippingDays = Convert.ToInt32(OrderRecieveShippingDays.Text) < 0 ? 0 : Convert.ToInt32(OrderRecieveShippingDays.Text);

            ShopConfig.UpdateConfigInfo(config);
            AdminLogBLL.Add(ShopLanguage.ReadLanguage("UpdateConfig"));
            ScriptHelper.Alert(ShopLanguage.ReadLanguage("UpdateOK"), RequestHelper.RawUrl);
        }
Example #9
0
        /// <summary>
        /// ajaxfileUpload 上传图片
        /// </summary>
        /// <returns></returns>
        protected void UploadPhoto()
        {
            var    flag         = true;
            string originalFile = string.Empty;

            if (HttpContext.Current.Request.Files[0].FileName != string.Empty)
            {
                try
                {
                    //上传文件
                    UploadHelper upload = new UploadHelper();
                    upload.Path     = "/Upload/WaterPhoto/" + RequestHelper.DateNow.ToString("yyyyMM") + "/";
                    upload.FileType = ShopConfig.ReadConfigInfo().UploadFile;
                    FileInfo file = upload.SaveAs();
                    //生成处理
                    originalFile = upload.Path + file.Name;
                    string otherFile = string.Empty;
                    string makeFile  = string.Empty;
                    //Dictionary<int, int> dic = new Dictionary<int, int>();
                    //dic.Add(70, 70);
                    //dic.Add(190, 190);
                    //foreach (KeyValuePair<int, int> kv in dic)
                    //{
                    //    makeFile = originalFile.Replace("Original", kv.Key.ToString() + "-" + kv.Value.ToString());
                    //    otherFile += makeFile + "|";
                    //    ImageHelper.MakeThumbnailImage(ServerHelper.MapPath(originalFile), ServerHelper.MapPath(makeFile), kv.Key, kv.Value, ThumbnailType.InBox);
                    //}
                    //otherFile = otherFile.Substring(0, otherFile.Length - 1);
                    ////保存数据库
                    //UploadInfo tempUpload = new UploadInfo();
                    //tempUpload.TableID = UserBLL.TableID;
                    //tempUpload.ClassID = 0;
                    //tempUpload.RecordID = 0;
                    //tempUpload.UploadName = originalFile;
                    //tempUpload.OtherFile = otherFile;
                    //tempUpload.Size = Convert.ToInt32(file.Length);
                    //tempUpload.FileType = file.Extension;
                    //tempUpload.Date = RequestHelper.DateNow;
                    //tempUpload.IP = ClientHelper.IP;
                    //UploadBLL.AddUpload(tempUpload);
                }
                catch (Exception ex)
                {
                    ExceptionHelper.ProcessException(ex, false);
                }
            }
            if (!string.IsNullOrEmpty(originalFile))
            {
                flag = true;
                #region shopconfig设置
                ShopConfigInfo config = ShopConfig.ReadConfigInfo();
                config.AdminLogo = originalFile;
                ShopConfig.UpdateConfigInfo(config);
                #endregion
            }
            else
            {
                flag = false;
            }
            //return originalFile;
            Response.Clear();
            Response.Write(JsonConvert.SerializeObject(new { flag = flag, imgPath = originalFile }));
            Response.End();
        }
Example #10
0
        protected void SubmitButton_Click(object sender, EventArgs e)
        {
            base.CheckAdminPower("UpdateConfig", PowerCheckType.Single);
            ShopConfigInfo config = ShopConfig.ReadConfigInfo();

            config.Title                        = this.Title.Text;
            config.Copyright                    = this.Copyright.Text;
            config.Author                       = this.Author.Text;
            config.Keywords                     = this.Keywords.Text;
            config.Description                  = this.Description.Text;
            config.CodeType                     = Convert.ToInt32(this.CodeType.Text);
            config.CodeLength                   = Convert.ToInt32(this.CodeLength.Text);
            config.CodeDot                      = Convert.ToInt32(this.CodeDot.Text);
            config.StartYear                    = Convert.ToInt32(this.StartYear.Text);
            config.EndYear                      = Convert.ToInt32(this.EndYear.Text);
            config.Tel                          = this.Tel.Text;
            config.RecordCode                   = this.RecordCode.Text;
            config.StaticCode                   = this.StaticCode.Text;
            config.VoteID                       = Convert.ToInt32(this.VoteID.Text);
            config.AllowAnonymousVote           = Convert.ToInt32(this.AllowAnonymousVote.Text);
            config.VoteRestrictTime             = Convert.ToInt32(this.VoteRestrictTime.Text);
            config.SaveAutoClosePop             = Convert.ToInt32(this.SaveAutoClosePop.Text);
            config.PopCloseRefresh              = Convert.ToInt32(this.PopCloseRefresh.Text);
            config.UploadFile                   = this.UploadFile.Text;
            config.HotKeyword                   = this.HotKeyword.Text;
            config.ProductStorageType           = Convert.ToInt32(this.ProductStorageType.Text);
            config.AllowAnonymousComment        = Convert.ToInt32(this.AllowAnonymousComment.Text);
            config.CommentDefaultStatus         = Convert.ToInt32(this.CommentDefaultStatus.Text);
            config.CommentRestrictTime          = Convert.ToInt32(this.CommentRestrictTime.Text);
            config.AllowAnonymousCommentOperate = Convert.ToInt32(this.AllowAnonymousCommentOperate.Text);
            config.CommentOperateRestrictTime   = Convert.ToInt32(this.CommentOperateRestrictTime.Text);
            config.AllowAnonymousReply          = Convert.ToInt32(this.AllowAnonymousReply.Text);
            config.ReplyRestrictTime            = Convert.ToInt32(this.ReplyRestrictTime.Text);
            config.AllowAnonymousAddTags        = Convert.ToInt32(this.AllowAnonymousAddTags.Text);
            config.AddTagsRestrictTime          = Convert.ToInt32(this.AddTagsRestrictTime.Text);
            config.EmailUserName                = this.EmailUserName.Text;
            config.EmailPassword                = this.EmailPassword.Text;
            config.EmailServer                  = this.EmailServer.Text;
            config.EmailServerPort              = Convert.ToInt32(this.EmailServerPort.Text);
            config.ForbiddenName                = this.ForbiddenName.Text;
            config.PasswordMinLength            = Convert.ToInt32(this.PasswordMinLength.Text);
            config.PasswordMaxLength            = Convert.ToInt32(this.PasswordMaxLength.Text);
            config.UserNameMinLength            = Convert.ToInt32(this.UserNameMinLength.Text);
            config.UserNameMaxLength            = Convert.ToInt32(this.UserNameMaxLength.Text);
            config.RegisterCheck                = Convert.ToInt32(this.RegisterCheck.Text);
            config.Agreement                    = this.Agreement.Text;
            config.FindPasswordTimeRestrict     = Convert.ToDouble(this.FindPasswordTimeRestrict.Text);
            config.AllowAnonymousAddCart        = Convert.ToInt32(this.AllowAnonymousAddCart.Text);
            config.PayOrder                     = Convert.ToInt32(this.PayOrder.Text);
            config.CancleOrder                  = Convert.ToInt32(this.CancleOrder.Text);
            config.CheckOrder                   = Convert.ToInt32(this.CheckOrder.Text);
            config.SendOrder                    = Convert.ToInt32(this.SendOrder.Text);
            config.ReceivedOrder                = Convert.ToInt32(this.ReceivedOrder.Text);
            config.ChangeOrder                  = Convert.ToInt32(this.ChangeOrder.Text);
            config.ReturnOrder                  = Convert.ToInt32(this.ReturnOrder.Text);
            config.BackOrder                    = Convert.ToInt32(this.BackOrder.Text);
            config.RefundOrder                  = Convert.ToInt32(this.RefundOrder.Text);
            config.WaterType                    = Convert.ToInt32(this.WaterType.Text);
            config.WaterPossition               = Convert.ToInt32(this.WaterPossition.Text);
            config.Text                         = this.Text.Text;
            config.TextFont                     = this.TextFont.Text;
            config.TextSize                     = Convert.ToInt32(this.TextSize.Text);
            config.TextColor                    = this.TextColor.Text;
            config.WaterPhoto                   = this.WaterPhoto.Text;
            config.TestInterval                 = Convert.ToInt32(this.TestInterval.Text);
            config.IconFontPath                 = this.IconFontPath.Text;
            config.ManageIconFontPath           = this.ManageIconFontPath.Text;
            ShopConfig.UpdateConfigInfo(config);
            AdminLogBLL.AddAdminLog(ShopLanguage.ReadLanguage("UpdateConfig"));
            ScriptHelper.Alert(ShopLanguage.ReadLanguage("UpdateOK"), RequestHelper.RawUrl);
        }
Example #11
0
        /// <summary>
        /// 提交按钮点击方法
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void SubmitButton_Click(object sender, EventArgs e)
        {
            CheckAdminPower("UpdateConfig", PowerCheckType.Single);
            ShopConfigInfo config = ShopConfig.ReadConfigInfo();

            config.CommentDefaultStatus = RequestHelper.GetForm <int>("ctl00$ContentPlaceHolder$CommentDefaultStatus");
            int allImageWidth = 0;

            if (!int.TryParse(AllImageWidth.Text.Trim(), out allImageWidth))
            {
                ScriptHelper.Alert("图片宽度必须是数字");
            }
            config.AllImageWidth = allImageWidth < 0 ? 0 : allImageWidth;
            //config.AllImageWidth = Convert.ToInt32(AllImageWidth.Text) < 0 ? 0 : Convert.ToInt32(AllImageWidth.Text);
            config.AllImageIsNail = RequestHelper.GetForm <int>("ctl00$ContentPlaceHolder$AllImageIsNail");
            #region 启用整站压缩 图片宽度不得小于600px
            if (config.AllImageIsNail == 1 && config.AllImageWidth < 600)
            {
                ScriptHelper.Alert("整站图片压缩宽度不得小于600PX");
            }
            #endregion
            config.SelfPick     = RequestHelper.GetForm <int>("ctl00$ContentPlaceHolder$SelfPick");
            config.GroupBuyDays = Convert.ToInt32(GroupBuyDays.Text) < 0 ? 2 : Convert.ToInt32(GroupBuyDays.Text);
            config.PrintSN      = PrintSN.Text;
            //分销商是否需要审核
            config.CheckToBeDistributor = RequestHelper.GetForm <int>("ctl00$ContentPlaceHolder$CheckToBeDistributor");
            decimal _d1 = 0, _d2 = 0;
            //1级分销返佣
            if (decimal.TryParse(FirstLevelDistributorRebatePercent.Text.Trim(), out _d1))
            {
                if (_d1 > 0 && _d1 <= 40)
                {
                    config.FirstLevelDistributorRebatePercent = _d1;
                }
                else
                {
                    ScriptHelper.Alert("1级返佣比例必须是0~40之间的数字");
                }
            }
            else
            {
                ScriptHelper.Alert("1级返佣比例必须大于0且不超过40");
            }

            //2级分销返佣
            if (decimal.TryParse(SecondLevelDistributorRebatePercent.Text.Trim(), out _d2))
            {
                if (_d2 > 0 && _d2 <= _d1)
                {
                    config.SecondLevelDistributorRebatePercent = _d2;
                }
                else
                {
                    ScriptHelper.Alert("2级返佣比例必须大于0且不超过1级返佣比例");
                }
            }
            else
            {
                ScriptHelper.Alert("2级返佣比例必须大于0且不超过1级返佣比例");
            }

            ShopConfig.UpdateConfigInfo(config);
            AdminLogBLL.Add(ShopLanguage.ReadLanguage("UpdateConfig"));
            ScriptHelper.Alert(ShopLanguage.ReadLanguage("UpdateOK"), RequestHelper.RawUrl);
        }
Example #12
0
        protected void SubmitButton_Click(object sender, EventArgs e)
        {
            //如果账号不存在
            if (!string.Equals(NewPassword.Text, NewPassword2.Text, StringComparison.OrdinalIgnoreCase))
            {
                ScriptHelper.AlertFront("两次密码不一致");
            }
            else
            {
                #region 滑块验证码
                GeetestLib geetest = new GeetestLib("b46d1900d0a894591916ea94ea91bd2c", "36fc3fe98530eea08dfc6ce76e3d24c4");
                Byte       gt_server_status_code = (Byte)Session[GeetestLib.gtServerStatusSessionKey];
                String     userID    = (String)Session["userID"];
                int        result    = 0;
                String     challenge = Request.Form.Get(GeetestLib.fnGeetestChallenge);
                String     validate  = Request.Form.Get(GeetestLib.fnGeetestValidate);
                String     seccode   = Request.Form.Get(GeetestLib.fnGeetestSeccode);
                try
                {
                    if (gt_server_status_code != null && gt_server_status_code == 1)
                    {
                        result = geetest.enhencedValidateRequest(challenge, validate, seccode, userID);
                    }
                    else
                    {
                        result = geetest.failbackValidateRequest(challenge, validate, seccode);
                    }
                }
                catch (Exception ex)
                {
                    result = -1;//极验验证码出错,不进行验证
                }
                if (result == 1 || result == -1)
                {// 验证通过,重置密码
                    string checkCode   = RequestHelper.GetForm <string>("CheckCode");
                    string decode      = StringHelper.Decode(checkCode, ShopConfig.ReadConfigInfo().SecureKey);
                    int    adminID     = Convert.ToInt32(decode.Split('|')[0]);
                    string newPassword = StringHelper.Password(NewPassword.Text, (PasswordType)ShopConfig.ReadConfigInfo().PasswordType);
                    // 重置密码
                    AdminBLL.ChangePassword(adminID, newPassword);
                    Task.Run(() => {
                        //安全码
                        ShopConfigInfo config = ShopConfig.ReadConfigInfo();
                        config.SecureKey      = Convert.ToBase64String(Guid.NewGuid().ToByteArray());
                        ShopConfig.UpdateConfigInfo(config);
                    });
                    //清空safecode,finddate恢复
                    AdminBLL.ChangeAdminSafeCode(adminID, string.Empty, RequestHelper.DateNow);
                    //错误次数清零,解锁
                    AdminBLL.UpdateStatus(adminID);
                    string msg = "恭喜您,密码修改成功!" + "&nbsp;&nbsp;点击<a href=\"/admin/Login.aspx\" style=\"color: #1dd42b;font-size: larger;\">\"使用新密码登录\"</a>";
                    //清除原有的user Cookies
                    CookiesHelper.DeleteCookie(ShopConfig.ReadConfigInfo().AdminCookies);
                    CookiesHelper.DeleteCookie("AdminSign");

                    ResponseHelper.Redirect("/admin/ResetPassword.aspx?Result=" + Server.UrlEncode(msg));
                }
                else
                {
                    //验证失败
                    ScriptHelper.AlertFront("图片验证失败,请拖动图片滑块重新验证。");
                }
                #endregion
            }
        }
        /// <summary>
        /// 提交按钮点击方法
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void SubmitButton_Click(object sender, EventArgs e)
        {
            CheckAdminPower("UpdateConfig", PowerCheckType.Single);
            ShopConfigInfo config = ShopConfig.ReadConfigInfo();

            config.Title       = Title.Text;
            config.Copyright   = Copyright.Text;
            config.Author      = Author.Text;
            config.Keywords    = Keywords.Text;
            config.Description = Description.Text;
            config.CodeType    = Convert.ToInt32(CodeType.Text);
            config.CodeLength  = Convert.ToInt32(CodeLength.Text);
            config.CodeDot     = Convert.ToInt32(CodeDot.Text);
            config.StartYear   = Convert.ToInt32(StartYear.Text);
            config.EndYear     = Convert.ToInt32(EndYear.Text);
            config.Tel         = Tel.Text;
            config.RecordCode  = RecordCode.Text;
            config.StaticCode  = StaticCode.Text;
            config.UploadFile  = UploadFile.Text;

            config.UploadImage = UploadImage.Text;
            config.Fax         = Fax.Text;
            config.PostCode    = PostCode.Text;
            config.Address     = Address.Text;

            config.SiteName          = SiteName.Text;
            config.IcoAddress        = ICOAddress.Text;
            config.LogoAddress       = LogoAddress.Text;
            config.MobileLogoAddress = MobileLogoAddress.Text;

            config.WaterType      = RequestHelper.GetForm <int>("ctl00$ContentPlaceHolder$WaterType");
            config.WaterPossition = RequestHelper.GetForm <int>("ctl00$ContentPlaceHolder$WaterPossition");
            config.Text           = Text.Text;
            config.TextFont       = TextFont.Text;
            config.TextSize       = Convert.ToInt32(TextSize.Text);
            config.TextColor      = TextColor.Value;
            config.WaterPhoto     = WaterPhoto.Text;

            config.UploadFile               = UploadFile.Text;
            config.AllowAnonymousComment    = Convert.ToInt32(AllowAnonymousComment.Text);
            config.CommentDefaultStatus     = RequestHelper.GetForm <int>("ctl00$ContentPlaceHolder$CommentDefaultStatus");
            config.CommentRestrictTime      = Convert.ToInt32(CommentRestrictTime.Text);
            config.EmailUserName            = EmailUserName.Text;
            config.EmailPassword            = EmailPassword.Text;
            config.EmailServer              = EmailServer.Text;
            config.EmailServerPort          = Convert.ToInt32(EmailServerPort.Text);
            config.ForbiddenName            = ForbiddenName.Text;
            config.PasswordMinLength        = Convert.ToInt32(PasswordMinLength.Text);
            config.PasswordMaxLength        = Convert.ToInt32(PasswordMaxLength.Text);
            config.UserNameMinLength        = Convert.ToInt32(UserNameMinLength.Text);
            config.UserNameMaxLength        = Convert.ToInt32(UserNameMaxLength.Text);
            config.RegisterCheck            = Convert.ToInt32(RegisterCheck.Text);
            config.RegisterType             = Convert.ToInt32(RegisterType.Text);
            config.Agreement                = Agreement.Text;
            config.FindPasswordTimeRestrict = Convert.ToDouble(FindPasswordTimeRestrict.Text);
            config.BindEmailTime            = Convert.ToDouble(BindEmailTime.Text);
            #region 邮箱验证时间限制必须>1
            if (config.BindEmailTime < 1)
            {
                config.BindEmailTime = 1;
            }
            #endregion
            config.AllImageWidth  = Convert.ToInt32(AllImageWidth.Text) < 0?0: Convert.ToInt32(AllImageWidth.Text);
            config.AllImageIsNail = RequestHelper.GetForm <int>("ctl00$ContentPlaceHolder$AllImageIsNail");
            #region 启用整站压缩 图片宽度不得小于600px
            if (config.AllImageIsNail == 1 && config.AllImageWidth < 600)
            {
                ScriptHelper.Alert("整站图片压缩宽度不得小于600PX");
            }
            #endregion
            config.QQ          = QQ.Text;
            config.WeiXin      = WeiXin.Text;
            config.MobileImage = MobileImage.Text;
            config.GTel        = GTel.Text;
            config.SiteLink    = SiteLink.Text;

            config.CnzzId     = CnzzId.Text;
            config.HotKeyword = HotKeyword.Text;
            #region 各种logo尺寸
            config.IcoWidth          = Convert.ToInt32(IcoWidth.Text) < 0 ? 0 : Convert.ToInt32(IcoWidth.Text);
            config.IcoHeight         = Convert.ToInt32(IcoHeight.Text) < 0 ? 0 : Convert.ToInt32(IcoHeight.Text);
            config.LogoWidth         = Convert.ToInt32(LogoWidth.Text) < 0 ? 0 : Convert.ToInt32(LogoWidth.Text);
            config.LogoHeight        = Convert.ToInt32(LogoHeight.Text) < 0 ? 0 : Convert.ToInt32(LogoHeight.Text);
            config.MobileLogoWidth   = Convert.ToInt32(MobileLogoWidth.Text) < 0 ? 0 : Convert.ToInt32(MobileLogoWidth.Text);
            config.MobileLogoHeight  = Convert.ToInt32(MobileLogoHeight.Text) < 0 ? 0 : Convert.ToInt32(MobileLogoHeight.Text);
            config.MobilePhotoWidth  = Convert.ToInt32(MobilePhotoWidth.Text) < 0 ? 0 : Convert.ToInt32(MobilePhotoWidth.Text);
            config.MobilePhotoHeight = Convert.ToInt32(MobilePhotoHeight.Text) < 0 ? 0 : Convert.ToInt32(MobilePhotoHeight.Text);
            config.WeixinWidth       = Convert.ToInt32(WeixinWidth.Text) < 0 ? 0 : Convert.ToInt32(WeixinWidth.Text);
            config.WeixinHeight      = Convert.ToInt32(WeixinHeight.Text) < 0 ? 0 : Convert.ToInt32(WeixinHeight.Text);
            config.UPLogo            = UPLogo.Text;
            config.UPLogoWidth       = Convert.ToInt32(UPLogoWidth.Text) < 0 ? 0 : Convert.ToInt32(UPLogoWidth.Text);
            config.UPLogoHeight      = Convert.ToInt32(UPLogoHeight.Text) < 0 ? 0 : Convert.ToInt32(UPLogoHeight.Text);

            config.UserLoginPic       = UserLoginPic.Text;
            config.UserLoginWidth     = Convert.ToInt32(UserLoginWidth.Text) < 0 ? 0 : Convert.ToInt32(UserLoginWidth.Text);
            config.UserLoginHeight    = Convert.ToInt32(UserLoginHeight.Text) < 0 ? 0 : Convert.ToInt32(UserLoginHeight.Text);
            config.UserRegisterPic    = UserRegisterPic.Text;
            config.UserRegisterWidth  = Convert.ToInt32(UserRegisterWidth.Text) < 0 ? 0 : Convert.ToInt32(UserRegisterWidth.Text);
            config.UserRegisterHeight = Convert.ToInt32(UserRegisterHeight.Text) < 0 ? 0 : Convert.ToInt32(UserRegisterHeight.Text);

            #endregion
            //积分抵现功能是否开启
            config.EnablePointPay = RequestHelper.GetForm <int>("ctl00$ContentPlaceHolder$EnablePointPay");
            config.PointToMoney   = Convert.ToInt32(PointToMoney.Text) < 0 ? 0 : Convert.ToInt32(PointToMoney.Text);
            if (config.EnablePointPay == 1 && (config.PointToMoney <= 0 || config.PointToMoney > 100))
            {
                ScriptHelper.Alert("积分抵现百分比必须大于0小于100");
            }
            //config.MoneyToPoint = Convert.ToInt32(MoneyToPoint.Text) < 0 ? 0 : Convert.ToInt32(MoneyToPoint.Text);
            //是否提供发票
            config.Invoicing = RequestHelper.GetForm <int>("ctl00$ContentPlaceHolder$Invoicing");
            #region 订单状态改变是否发送通知(邮件 短信 )
            config.PayOrder           = RequestHelper.GetForm <int>("ctl00$ContentPlaceHolder$PayOrder");
            config.PayOrderEmail      = RequestHelper.GetForm <int>("PayOrderEmail");
            config.PayOrderMsg        = RequestHelper.GetForm <int>("PayOrderMsg");
            config.CancleOrder        = RequestHelper.GetForm <int>("ctl00$ContentPlaceHolder$CancleOrder");
            config.CancleOrderEmail   = RequestHelper.GetForm <int>("CancleOrderEmail");
            config.CancleOrderMsg     = RequestHelper.GetForm <int>("CancleOrderMsg");
            config.CheckOrder         = RequestHelper.GetForm <int>("ctl00$ContentPlaceHolder$CheckOrder");
            config.CheckOrderEmail    = RequestHelper.GetForm <int>("CheckOrderEmail");
            config.CheckOrderMsg      = RequestHelper.GetForm <int>("CheckOrderMsg");
            config.SendOrder          = RequestHelper.GetForm <int>("ctl00$ContentPlaceHolder$SendOrder");
            config.SendOrderEmail     = RequestHelper.GetForm <int>("SendOrderEmail");
            config.SendOrderMsg       = RequestHelper.GetForm <int>("SendOrderMsg");
            config.ReceivedOrder      = RequestHelper.GetForm <int>("ctl00$ContentPlaceHolder$ReceivedOrder");
            config.ReceivedOrderEmail = RequestHelper.GetForm <int>("ReceivedOrderEmail");
            config.ReceivedOrderMsg   = RequestHelper.GetForm <int>("ReceivedOrderMsg");
            config.ChangeOrder        = RequestHelper.GetForm <int>("ctl00$ContentPlaceHolder$ChangeOrder");
            config.ChangeOrderEmail   = RequestHelper.GetForm <int>("ChangeOrderEmail");
            config.ChangeOrderMsg     = RequestHelper.GetForm <int>("ChangeOrderMsg");
            config.ReturnOrder        = RequestHelper.GetForm <int>("ctl00$ContentPlaceHolder$ReturnOrder");
            config.ReturnOrderEmail   = RequestHelper.GetForm <int>("ReturnOrderEmail");
            config.ReturnOrderMsg     = RequestHelper.GetForm <int>("ReturnOrderMsg");
            config.BackOrder          = RequestHelper.GetForm <int>("ctl00$ContentPlaceHolder$BackOrder");
            config.BackOrderEmail     = RequestHelper.GetForm <int>("BackOrderEmail");
            config.BackOrderMsg       = RequestHelper.GetForm <int>("BackOrderMsg");
            config.RefundOrder        = RequestHelper.GetForm <int>("ctl00$ContentPlaceHolder$RefundOrder");
            config.RefundOrderEmail   = RequestHelper.GetForm <int>("RefundOrderEmail");
            config.RefundOrderMsg     = RequestHelper.GetForm <int>("RefundOrderMsg");
            #endregion
            //投票起止时间
            config.VoteStartDate = Convert.ToDateTime(VoteStartDate.Text);
            config.VoteEndDate   = Convert.ToDateTime(VoteEndDate.Text);
            if ((config.VoteStartDate - config.VoteEndDate).Days > 0)
            {
                ScriptHelper.Alert("投票结束日期不得小于开始日期");
            }
            //订单付款时限,不小于0
            config.OrderPayTime = Convert.ToInt32(OrderPayTime.Text) < 0?0:Convert.ToInt32(OrderPayTime.Text);
            //订单单自动收货天数
            config.OrderRecieveShippingDays = Convert.ToInt32(OrderRecieveShippingDays.Text) < 0 ? 0 : Convert.ToInt32(OrderRecieveShippingDays.Text);

            config.AdminLogo     = AdminLogo.Text;
            config.LittlePrgCode = LittlePrgCode.Text;
            config.Qualification = Qualification.Text;
            config.BusinessHours = BusinessHours.Text;

            //安全码
            config.SecureKey = Convert.ToBase64String(Guid.NewGuid().ToByteArray());

            ////满立减
            //decimal orderMoney = 0; decimal orderDiscount = 0;
            //config.PayDiscount = RequestHelper.GetForm<int>("ctl00$ContentPlaceHolder$PayDiscount");
            //if (config.PayDiscount == 1)
            //{
            //    if (!decimal.TryParse(OrderMoney.Text, out orderMoney) || !decimal.TryParse(OrderDisCount.Text, out orderDiscount))
            //    {
            //        ScriptHelper.Alert("满立减金额填写错误");
            //    }
            //    if (orderMoney <= orderDiscount)
            //    {
            //        ScriptHelper.Alert("满立减金额必须小于订单金额");
            //    }
            //}
            //config.OrderMoney = orderMoney;
            //config.OrderDisCount = orderDiscount;

            ShopConfig.UpdateConfigInfo(config);
            AdminLogBLL.Add(ShopLanguage.ReadLanguage("UpdateConfig"));
            ScriptHelper.Alert(ShopLanguage.ReadLanguage("UpdateOK"), RequestHelper.RawUrl);
        }