public HandHistoryFile GetHandHistoryFile(string path, SQLiteConnection connection) { if (string.IsNullOrEmpty(path)) { return(null); } string sql = string.Format("SELECT * FROM HandHistoryFiles WHERE Path = '{0}'", path); DataTable dt = GetData(sql, connection); int rowCount = dt.Rows.Count; if (rowCount > 0) { DataRow row = dt.Rows[0]; HandHistoryFile file = new HandHistoryFile(row); return(file); } return(null); }
public HandHistoryFile GetHandHistoryFile(string path, SQLiteConnection connection) { if (string.IsNullOrEmpty(path)) { return null; } string sql = string.Format("SELECT * FROM HandHistoryFiles WHERE Path = '{0}'", path); DataTable dt = GetData(sql, connection); int rowCount = dt.Rows.Count; if (rowCount > 0) { DataRow row = dt.Rows[0]; HandHistoryFile file = new HandHistoryFile(row); return file; } return null; }