public void questionCheckIn(string title, string type, string about, string filename, string uploadTime, string questionerId) { if (title == null || type == null || about == null || uploadTime == null || questionerId == null) { throw new Exception("关键字段为空"); } LibraryDAL.questionop load = new LibraryDAL.questionop(); try { line = load.questionUpload(title, type, about, filename, uploadTime, questionerId); } catch (Exception e) { throw e; } if (line <= 0) { throw new Exception("评论发布失败"); } }
public void answerCheckIn(string intro, int questionId, string answerName, string answertime, string fileName) { if (intro == null || questionId == null || answerName == null || answertime == null || fileName == null) { throw new Exception("关键字段为空"); } LibraryDAL.questionop load = new LibraryDAL.questionop(); try { line = load.answerUpload(intro, questionId, answerName, answertime, fileName); } catch (Exception e) { throw e; } if (line <= 0) { throw new Exception("评论发布失败"); } }
public int questiondelete(ArrayList name) { int line = 0; for (int i = 0; i < name.Count; i++) { string a = name[i].ToString(); LibraryDAL.questionop load = new LibraryDAL.questionop(); try { line += load.questioncommentdelete(a); } catch (Exception e) { throw e; } if (line <= 0) { throw new Exception("删除失败"); } } return(line); }