git-svn-id: svn://10.65.10.50/branches/R_10_00@23069 c028cbd2-c16b-5b4b-a496-9718f37d4682

This commit is contained in:
guy 2015-04-27 13:40:39 +00:00
parent 5ed8a6b90d
commit a3cbd76437

45
sc/sc1600.cpp Normal file
View File

@ -0,0 +1,45 @@
#include <applicat.h>
#include <progind.h>
#include <recset.h>
#include <relation.h>
#include "../cg/cgsaldac.h"
class TCheckClosed : public TSkeleton_application
{
public:
virtual void main_loop();
};
void TCheckClosed::main_loop()
{
TISAM_recordset part("USE PART SELECT (CHIUSA!=\"X\")&&(NUMRIG<\"9999\")");
const TRectype& rec = part.cursor()->curr();
const TRecnotype games = part.items();
TProgress_monitor pi(games, title());
TRecnotype found = 0;
for (bool ok = part.move_first(); ok; ok = part.move_next())
{
if (!rec.get_bool(PART_CHIUSA))
{
TPartita p(rec);
if (p.chiusa(true))
{
p.rewrite();
found++;
}
}
if (!pi.add_status())
break;
}
message_box(FR("Sono state allineate %ld partite chiuse"), found);
}
int sc1600(int argc, char** argv)
{
TCheckClosed a;
a.run(argc, argv, TR("Controllo partite chiuse"));
return 0;
}