public int sendMessage(String myID, String otherID, String content) { if (DatabaseTool.ExecSql(String.Format(addMessage, myID, otherID, DateTime.Now, content, 0))) { return(1); } else { return(-1); } }
public int updateRead(String myID, String otherID) { if (DatabaseTool.ExecSql(String.Format(setRead, myID, otherID))) { return(1); } else { return(-1); } }
public int deleteGood(int goodID) { if (DatabaseTool.ExecSql(String.Format(deleteSql, goodID))) { return(1); } else { return(-1); } }
public int insertUser(String phoneNum, String name, String school, String campus, String college, String password, String userID) { if (DatabaseTool.ExecSql(String.Format(insertSql, phoneNum, name, school, campus, college, password, userID))) { return(1); } else { return(-1); } }
public int insertRelease(String goodName, String goodImg, Double price, String address, String category, int bargin, String contact, String newLevel, String detail, String userID) { if (DatabaseTool.ExecSql(String.Format(insertSql, category, price, bargin, contact, goodImg, detail, newLevel, userID, goodName, address))) { return(1); } else { return(-1); } }
public int updateGoodNotPic(String category, Double prize, int bargin, String contact, String description, String new_level, String goodsName, String address, int goodID) { //调用数据库语句,更新商品信息,没写呢 if (DatabaseTool.ExecSql(String.Format(updateSql1, category, prize, bargin, contact, description, new_level, goodsName, address, goodID))) { return(1); } else { return(-1); } }
public int insertColl(String userID, String goodID) { if (DatabaseTool.ExcelSelectResult(String.Format(selectCollection, userID, goodID))) { return(-1); } else if (DatabaseTool.ExecSql(String.Format(insertCollection, userID, goodID))) { return(1); } else { return(-1); } }