コード例 #1
0
        protected void btnAdd_Click(object sender, System.EventArgs e)
        {
            string text = base.Request.Form["CheckBoxGroup"];

            if (string.IsNullOrEmpty(text))
            {
                this.ShowMsg("请选择一个专题!", false);
                return;
            }
            string[] array = text.Split(new char[]
            {
                ','
            });
            int num = 0;

            string[] array2 = array;
            for (int i = 0; i < array2.Length; i++)
            {
                string value = array2[i];
                if (VShopHelper.AddHomeTopic(System.Convert.ToInt32(value), ClientType.App, CheckSupplierRole()))
                {
                    num++;
                }
            }
            if (num > 0)
            {
                this.CloseWindow();
                return;
            }
            this.ShowMsg("添加首页专题失败!", false);
        }
コード例 #2
0
        protected void btnAdd_Click(object sender, EventArgs e)
        {
            string str = base.Request.Form["CheckBoxGroup"];

            if (string.IsNullOrEmpty(str))
            {
                this.ShowMsg("请选择一个专题!", false);
            }
            else
            {
                string[] strArray = str.Split(new char[] { ',' });
                int      num      = 0;
                foreach (string str2 in strArray)
                {
                    if (VShopHelper.AddHomeTopic(Convert.ToInt32(str2)))
                    {
                        num++;
                    }
                }
                if (num > 0)
                {
                    this.CloseWindow();
                }
                else
                {
                    this.ShowMsg("添加首页专题失败!", false);
                }
            }
        }