示例#1
0
 public static bool TryToDelete(string tableName, string field, object value)
 {
     try
     {
         DBExec.ExecuteNonQuery(DBConnection.GetDefaultConnection(), CommandType.Text, SqlScript.DeleteRecord(tableName, field, value));
     }
     catch (Exception e)
     {
         return(false);
     }
     return(true);
 }
示例#2
0
 public static bool ResetServerTable()
 {
     try
     {
         var script = SqlScriptFile.GetScriptFileContent(SqlScriptFile.GetResetServerScriptPath());
         DBExec.ExecBatchSql(DBConnection.GetDefaultConnection(), script);
     }
     catch (Exception e)
     {
         return(false);
     }
     return(true);
 }