protected void Page_Load(object sender, EventArgs e) { INovel novel = BllFactory.BllAccess.CreateINovelBLL(); string userID = Request["id"]; string[] userId = userID.Substring(0, userID.Length - 1).Split(','); try { int i; for (i = 0; i < userId.Length; i++) { novel.Recommand(Convert.ToInt32(userId[i])); } Response.Write("{success:true,msg:'操作成功'}"); } catch (Exception ex) { string msg = ex.Message.ToStr(); Response.Write("{success:false,msg:'" + msg + "'}"); } }
//推荐小说 public int Recommand(int bookId) { return(novel.Recommand(bookId)); }