public string AddTopic(Topic topic) { if (topic == null) { throw new XinLuClubException(400, "topic不能为null"); } LoginBLL login = new LoginBLL(); var me = login.GetMe(); topic.OwnerID = me.ID; return(bll.AddTopic(topic)); }
//Excel内部有相同题目 继续验证数据库 //数据库中已存在题目 继续验证知识点 //检查知识点 //导入题目 public void InputTopic() { int res = 0; foreach (var item in imputTopics) { res = topicBll.AddTopic(item); if (res == 0) { break; } } if (res > 0) { Response.Write("<script>alert('导入成功');window.location.href='TopicInfo.aspx';</script>"); } }