mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-05-16 06:05:58 -06:00
37 lines
568 B
C++
37 lines
568 B
C++
#include "Sats.h"
|
|
|
|
void Sats::Setup()
|
|
{
|
|
CtrlLayout(*this, "Soldier Accession Tracking System");
|
|
}
|
|
|
|
GUI_APP_MAIN
|
|
{
|
|
Sats s;
|
|
s.Setup();
|
|
Sqlite3Session db;
|
|
db.LogErrors(true);
|
|
|
|
FileIn fi("satsII.db");
|
|
if(fi.IsError() || fi.GetSize() <= 0) {
|
|
Exclamation(t_("Database file is corrupted"));
|
|
return;
|
|
}
|
|
fi.Close();
|
|
|
|
if(!db.Open(ConfigFile("satsII.db"))) {
|
|
Exclamation(t_("Can't open database"));
|
|
return;
|
|
}
|
|
|
|
SQL = db;
|
|
|
|
SQL * Select(Code).From(Race);
|
|
|
|
while(SQL.Fetch()) {
|
|
s.d_race.Add(SQL[0]);
|
|
}
|
|
|
|
s.Run();
|
|
}
|
|
|