public void bookinfochange(string name, string autor, string type, string pubname, string date, string code, byte[] picture, string about, int page, int price) { LibraryDAL.bookop load = new LibraryDAL.bookop(); try { line = load.bookInofUpdata(name, autor, type, pubname, date, code, picture, about, page, price); } catch (Exception e) { throw e; } if (line <= 0) { throw new Exception("信息变更失败"); } }
public void bookCommentCheckIn(string bookname, string commenter, string date, string comment) { if (bookname == null || commenter == null || date == null || comment == null) { throw new Exception("关键字段为空"); } LibraryDAL.bookop load = new LibraryDAL.bookop(); try { line = load.commentUpload(bookname, commenter, date, comment); } catch (Exception e) { throw e; } if (line <= 0) { throw new Exception("评论发布失败"); } }
public void bookCheckIn(string name, string autor, string type, string pubname, string date, string code, byte[] picture, string about, int page, int price) { if (name == null || autor == null || type == null || pubname == null || date == null || code == null || about == null || page == null || price == null) { throw new Exception("关键字段为空"); } LibraryDAL.bookop load = new LibraryDAL.bookop(); try { line = load.Upload(name, autor, type, pubname, date, code, picture, about, page, price); } catch (Exception e) { throw e; } if (line <= 0) { throw new Exception("书本增加失败"); } }
public int bookdelete(ArrayList name) { int line = 0; foreach (string a in name) { LibraryDAL.bookop load = new LibraryDAL.bookop(); try { line += load.Bookdelete(a); } catch (Exception e) { throw e; } } if (line <= 0) { throw new Exception("删除失败"); } return(line); }
public int commentdelete(ArrayList name, ArrayList comment) { int line = 0; for (int i = 0; i < name.Count; i++) { string a = name[i].ToString(); string b = comment[i].ToString(); LibraryDAL.bookop load = new LibraryDAL.bookop(); try { line += load.Bookcommentdelete(a, b); } catch (Exception e) { throw e; } if (line <= 0) { throw new Exception("删除失败"); } } return(line); }