protected void Page_Load(object sender, EventArgs e) { //随机显示3条数据 DataSet ds1 = bbl.GetBooksByRandom(3); ramdomBooks = bbl.DataTableToList(ds1.Tables[0]); if (Request["zi"] != null) { searchWord = Request["zi"]; Maticsoft.Model.SearchDetails sd = new Maticsoft.Model.SearchDetails() { KeyWords = searchWord, SearchDateTime = DateTime.Now }; new SearchDetailsBll().Add(sd); } DataSet ds = new BooksBll().searchResult(searchWord); searchList = new BooksBll().DataTableToList(ds.Tables[0]); }
/// <summary> /// 更新一条数据 /// </summary> public bool Update(Maticsoft.Model.SearchDetails model) { return(dal.Update(model)); }
/// <summary> /// 增加一条数据 /// </summary> public bool Add(Maticsoft.Model.SearchDetails model) { return(dal.Add(model)); }