Patch level : 12.00 1388
Files correlati : cg0.exe ve0.exe Commento: Trasformazione occasionali in clienti/fornitori
This commit is contained in:
parent
f2633c1a29
commit
98be734862
@ -1,3 +1,4 @@
|
||||
#include <applicat.h>
|
||||
#include <array.h>
|
||||
#include <config.h>
|
||||
#include <execp.h>
|
||||
@ -6,6 +7,7 @@
|
||||
#include <strings.h>
|
||||
#include <transaction.h>
|
||||
#include <utility.h>
|
||||
#include <strings.h>
|
||||
#include <tabutil.h>
|
||||
#include <tabmod.h>
|
||||
#include <xml.h>
|
||||
@ -715,6 +717,34 @@ bool TTransaction::get_warnings(TString_array & warnings) const
|
||||
return warnings.items() > 0;
|
||||
}
|
||||
|
||||
bool TTransaction::set_user(const char * u)
|
||||
{
|
||||
const char * wrk_user = u != nullptr ? u : user();
|
||||
|
||||
return set("User", wrk_user, -1, nullptr);
|
||||
}
|
||||
|
||||
bool TTransaction::set_hostname(const char * h)
|
||||
{
|
||||
const char * wrk_host = h != nullptr ? h : get_hostname();
|
||||
|
||||
return set("HostName", wrk_host, -1, nullptr);
|
||||
}
|
||||
|
||||
bool TTransaction::set_version()
|
||||
{
|
||||
int year, release, tag, patch;
|
||||
|
||||
if (main_app().get_version_info(year, release, tag, patch))
|
||||
{
|
||||
TString80 ver;
|
||||
ver.format("%d %d.%d-%d", year, release, tag, patch);
|
||||
set("Version", ver, -1, nullptr);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
bool TTransaction::read()
|
||||
{
|
||||
if (_type == ini_transaction)
|
||||
|
@ -168,7 +168,10 @@ public:
|
||||
bool set_stop_on_error(bool val) { return set("StopOnError", val ? 1 : 0, -1, nullptr); }
|
||||
bool set_caller(const TString & caller) { return set("From", caller, -1, nullptr); }
|
||||
bool set_firm(int firm) { return set("Firm", firm, -1, nullptr); }
|
||||
const char * ext() const { return _type == ini_transaction ? "ini" : "xml"; }
|
||||
bool set_user(const char * u = nullptr);
|
||||
bool set_hostname(const char * h = nullptr);
|
||||
bool set_version();
|
||||
const char * ext() const { return _type == ini_transaction ? "ini" : "xml"; }
|
||||
|
||||
bool read();
|
||||
bool write();
|
||||
|
Loading…
x
Reference in New Issue
Block a user