Example #1
0
        protected void btnAdd_Click(object sender, System.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;
                string[] array = strArray;
                for (int i = 0; i < array.Length; i++)
                {
                    string str2 = array[i];
                    if (VShopHelper.AddReleatesProdcutBytopicid(this.topicid, System.Convert.ToInt32(str2)))
                    {
                        num++;
                    }
                }
                if (num > 0)
                {
                    this.CloseWindow();
                }
                else
                {
                    this.ShowMsg("添加关联商品失败!", false);
                }
            }
        }