static bool InsertOneSite(OD_1_1_1DataSet.SitesDataTable sitesTable, SiteInfoType stinfo, SqlConnection sqlConn) { OD_1_1_1DataSet.SitesRow row = sitesTable.NewSitesRow(); row.SiteCode = stinfo.siteCode[0].network + "|" + stinfo.siteCode[0].Value; string cond = "SiteCode = '" + row.SiteCode + "'"; if (OD_Utils.Exists(row.Table.TableName, cond, sqlConn)) { return(false); } row.SiteName = stinfo.siteName; LatLonPointType glt = (LatLonPointType)stinfo.geoLocation.geogLocation; row.Latitude = glt.latitude; row.Longitude = glt.longitude; row.LatLongDatumID = 0; row.Elevation_m = stinfo.elevation_m; if (stinfo.verticalDatum != null) { row.VerticalDatum = stinfo.verticalDatum; } row.LocalProjectionID = 0; //row.LocalX = 0; //row.LocalY = 0; //row.LocalProjectionID = 0; //row.PosAccuracy_m = 0; if (stinfo.note != null) { for (int i = 0; i < stinfo.note.Count(); i++) { NoteType note = stinfo.note[i]; switch (note.title) { case "State": row.State = note.Value; break; case "County": row.County = note.Value; break; case "agency": row.Comments = note.Value; break; } } } sitesTable.AddSitesRow(row); return(true); }