public void updateVisitedFlagsFromBase(Boolean newSystem = true, Boolean newStation = true)
{
String sqlString;
try
{
if(newSystem)
{
sqlString = "update tbSystems S left join tbVisitedSystems V on S.id = V.system_id" +
" set visited = if(V.system_id is null, 0, 1)";
Program.DBCon.Execute(sqlString);
}
if(newStation)
{
sqlString = "update tbStations S left join tbVisitedStations V on S.id = V.station_id" +
" set visited = if(V.station_id is null, 0, 1)";
Program.DBCon.Execute(sqlString);
}
}
catch (Exception ex)
{
throw new Exception("Error while updating the visited systems from log", ex);
}
}