private void btnAddOK_Click(object sender, EventArgs e)
        {
            string str = base.Request.Form["CheckBoxGroup"];

            if (string.IsNullOrEmpty(str))
            {
                ShowMsg("请先选择要下架的商品", false);
            }
            else if (string.IsNullOrEmpty(txtPrefix.Text.Trim()) && string.IsNullOrEmpty(txtSuffix.Text.Trim()))
            {
                ShowMsg("前后缀不能同时为空", false);
            }
            else
            {
                if (SubSiteProducthelper.UpdateProductNames(str, txtPrefix.Text.Trim(), txtSuffix.Text.Trim()))
                {
                    ShowMsg("为商品名称添加前后缀成功", true);
                }
                else
                {
                    ShowMsg("为商品名称添加前后缀失败", false);
                }
                BindProducts();
            }
        }
Beispiel #2
0
        private void btnAddOK_Click(object sender, System.EventArgs e)
        {
            string text = base.Request.Form["CheckBoxGroup"];

            if (string.IsNullOrEmpty(text))
            {
                this.ShowMsg("请先选择要下架的商品", false);
                return;
            }
            if (string.IsNullOrEmpty(this.txtPrefix.Text.Trim()) && string.IsNullOrEmpty(this.txtSuffix.Text.Trim()))
            {
                this.ShowMsg("前后缀不能同时为空", false);
                return;
            }
            if (SubSiteProducthelper.UpdateProductNames(text, Globals.HtmlEncode(this.txtPrefix.Text.Trim()), Globals.HtmlEncode(this.txtSuffix.Text.Trim())))
            {
                this.ShowMsg("为商品名称添加前后缀成功", true);
            }
            else
            {
                this.ShowMsg("为商品名称添加前后缀失败", false);
            }
            this.BindProducts();
        }