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 (ProductHelper.AddSuggestProdcut(System.Convert.ToInt32(value), ClientType.PC)) { num++; } } if (num > 0) { this.CloseWindow(); return; } this.ShowMsg("添加首页猜你喜欢商品失败!", false); }