Example #1
0
 public int selectUser(String value, String fieldName)
 {
     Console.WriteLine(String.Format(fieldName, value));
     if (DatabaseTool.ExcelSelectResult(String.Format(selectSql, fieldName, value)))  //如果查询到,返回1,否则返回-1
     {
         return(1);
     }
     else
     {
         return(-1);
     }
 }
Example #2
0
 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);
     }
 }
Example #3
0
 public bool searchNotRead(String userID)
 {
     return(DatabaseTool.ExcelSelectResult(String.Format(selectNotRead, userID)));
 }