This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static int CountBirds(string baseBirds = "*", string baseBirder = "*", string baseRegion = "*", string baseDate = "*") | |
{ | |
SqlCommand selectCommand; | |
string sql = "SELECT SUM(BirdCount.Counted) FROM Bird INNER JOIN BirdCount ON Bird.BirdID = BirdCount.BirdID " + | |
"INNER JOIN Birder ON BirdCount.BirderID = Birder.BirderID INNER JOIN Region ON BirdCount.RegionID = Region.RegionID " + | |
"where BirdCount.BirdID ='" + baseBirds + "' AND BirdCount.BirderID = '" + baseBirder + "' AND BirdCount.RegionID = '" + baseRegion + "' AND BirdCount.CountDate = '" + baseDate + "'"; | |
if (baseBirds == "*") | |
{ | |
sql.Replace("BirdCount.BirdID ='" + baseBirds + "' AND", String.Empty); |
OlderNewer