From d7eb4ce4c7b4b38e729f62ef952291c3f2ed0760 Mon Sep 17 00:00:00 2001 From: alex Date: Fri, 25 Jul 2008 21:12:57 +0000 Subject: [PATCH] Patch level : 10.0 no patch Files correlati : Ricompilazione Demo : [ ] Commento : Aggiunti metofi virtuali _write e rewrite alle tabelle di modulo git-svn-id: svn://10.65.10.50/trunk@16951 c028cbd2-c16b-5b4b-a496-9718f37d4682 --- include/tabmod.cpp | 18 ++++++++++++++++++ include/tabmod.h | 4 ++++ 2 files changed, 22 insertions(+) diff --git a/include/tabmod.cpp b/include/tabmod.cpp index 92cf9badd..644c68af9 100755 --- a/include/tabmod.cpp +++ b/include/tabmod.cpp @@ -147,6 +147,24 @@ int TModule_table::_readat(TRectype& rec ,TRecnotype nrec, word lockop) return status(); } +int TModule_table::_write(const TRectype& rec) +{ + ((TRectype &)rec).put("COD", _tabname); + ((TRectype &)rec).put("MOD", _module); + ((TRectype &)rec).put("CUST", _customer); + + return TLocalisamfile::_write(rec); +} + +int TModule_table::_rewrite(const TRectype& rec) +{ + ((TRectype &)rec).put("COD", _tabname); + ((TRectype &)rec).put("MOD", _module); + ((TRectype &)rec).put("CUST", _customer); + + return TLocalisamfile::_rewrite(rec); +} + bool TModule_table::empty() { return read(_isfirst) != NOERR; diff --git a/include/tabmod.h b/include/tabmod.h index 52176e260..4d13f6194 100755 --- a/include/tabmod.h +++ b/include/tabmod.h @@ -30,6 +30,10 @@ protected: void load_module_description(); // @cmember Legge il record e lo copia in

(vedi e ) virtual int _read(TRectype& rec, word op = _isequal, word lockop = _nolock); + // @cmember scrive il record

+ virtual int _write(const TRectype& rec); + // @cmember riscrive il record

+ virtual int _rewrite(const TRectype& rec); // @cmember Legge il record alla posizione

e lo copia in

(vedi ) virtual int _readat(TRectype& rec, TRecnotype nrec, word lockop = _nolock); // @cmember Testa se il record fa parte della tabella