Patch level :

Files correlati     :
Ricompilazione Demo : [ ]
Commento            :


git-svn-id: svn://10.65.10.50/branches/R_10_00@21907 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
luca 2011-04-06 13:32:29 +00:00
parent 858648de4f
commit 9867be8513
9 changed files with 113 additions and 9 deletions

View File

@ -2,6 +2,7 @@
#include <automask.h>
#include <modtbapp.h>
#include <recset.h>
#include <tabutil.h>
#include "hatbcau.h"
@ -33,10 +34,37 @@ bool THA_table_mask::on_field_event(TOperable_field &o, TField_event e, long jol
class THA_table_app : public TTable_module_application
{
protected: // TRelation_application
virtual bool protected_record(TRectype& record);
virtual void init_query_mode(TMask& m);
virtual void init_query_insert_mode(TMask& m);
};
bool THA_table_app::protected_record(TRectype& record)
{
const TString4 name = get_relation()->file(0).name();
//tabella delle attrezzature
//non si può eliminare una attrezzatura se la medesima ha una storia! rispettiamo gli anziani!
if (name == "ATT")
{
//controlla che l'attrezzatura non abbia record nella tabella della storia attrezzature
TString query;
query << "USE &HAHIS";
query << "\nFROM CODTAB=#CODATTR";
query << "\nTO CODTAB=#CODATTR";
const TString codattr = record.get("CODTAB");
TISAM_recordset attr_recset(query);
attr_recset.set_var("#CODATTR", codattr);
const long items = attr_recset.items();
return items > 0;
}
return true;
}
void THA_table_app::init_query_mode(TMask& m)
{
const TString4 name = get_relation()->file(0).name();

View File

@ -115,7 +115,7 @@ public:
};
void TFatture_recordset::add_field(const char* name, TFE_type type, int len, int pos,
bool required = false, const char* def = NULL)
bool required, const char* def)
{
CHECKS(len > 0, "Lunghezza nulla sul campo ", name);
CHECKS(pos > 0, "Posizione nulla sul campo ", name);

View File

@ -3,7 +3,7 @@
#include "ha3.h"
#define usage "Error - usage : %s -{0|1}"
#define usage "Error - usage : %s -{0|8}"
int main(int argc,char** argv)
{
@ -13,6 +13,7 @@ int main(int argc,char** argv)
switch (r)
{
case 0: rt = ha3100(argc, argv); break; //Gestione giri
case 8: rt = ha3900(argc, argv); break; //Gestione attrezzature
default: error_box(usage, argv[0]); break;
}
return rt;

View File

@ -1 +1,2 @@
int ha3100(int argc, char* argv[]);
int ha3900(int argc, char* argv[]);

View File

@ -195,9 +195,8 @@ void TGestione_attrezzature_mask::fill_sheet_storico(const TString& codattr)
{
TToken_string& row = sf_righe.row(-1); //riga sheet da riempire
row.add(""); //nuova riga
const TString& row_tipo = recset.get("S7").as_string(); //tipo intervento
row.add(row_tipo, _pos_tipo);
const TDate row_data = recset.get("D0").as_date();
/*const TString& row_nr = recset.get("CODTAB[31,35]").as_string();
row.add(row_codattr, _pos_nr);*/
}
//mostra e aggiorna lo sheet

View File

@ -7,8 +7,9 @@ Item_01 = "Gestione listini", [HAMENU_002]
Item_02 = "Gestione contratti premio", [HAMENU_003]
Item_03 = "Collegamento terminalini", [HAMENU_004]
Item_04 = "Procedura Esselunga", [HAMENU_006]
Item_05 = "Gestione dei giri", "ha3 -0", ""
Item_06 = "Servizi", [HAMENU_005]
Item_05 = "Gestione attrezzature", [HAMENU_007]
Item_06 = "Gestione dei giri", "ha3 -0", ""
Item_07 = "Servizi", [HAMENU_005]
[HAMENU_002]
Caption = "Listini"
@ -57,3 +58,11 @@ Flags = "F"
Item_01 = "Gestione file Privat", "ha2 -0", "F"
Item_02 = "Gestione file Fattura", "ha2 -1", "F"
Item_03 = "Tabella clienti Esselunga", "ha0 -0 &CEL", ""
[HAMENU_007]
Caption = "Gestione attrezzature"
Picture = <ha01>
Module = 46
Flags = "F"
Item_01 = "Tabella attrezzature", "ha0 -0 &ATT", ""
Item_02 = "Gestione attrezzature", "ha3 -8", "F"

View File

@ -325,6 +325,10 @@
Name="Sources"
Filter="cpp"
>
<File
RelativePath="..\ba\ba8500.cpp"
>
</File>
<File
RelativePath="..\cg\cg7.cpp"
>
@ -369,13 +373,25 @@
/>
</FileConfiguration>
</File>
<File
RelativePath="..\cg\cg7200.cpp"
>
</File>
<File
RelativePath="..\cg\cglib01.cpp"
>
</File>
</Filter>
<Filter
Name="Masks"
Filter="uml"
>
<File
RelativePath="..\cg\cg7100a.uml"
RelativePath="..\cg\cg7100p.uml"
>
</File>
<File
RelativePath="..\cg\cg7200a.uml"
>
</File>
</Filter>
@ -388,7 +404,23 @@
>
</File>
<File
RelativePath="..\cg\cg7100a.h"
RelativePath="..\cg\cg7100.h"
>
</File>
<File
RelativePath="..\cg\cg7200a.h"
>
</File>
</Filter>
<Filter
Name="Reports"
>
<File
RelativePath="..\cg\cg7100p.rep"
>
</File>
<File
RelativePath="..\cg\cg7200a.rep"
>
</File>
</Filter>

View File

@ -9,6 +9,8 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ha1", "ha1.vcproj", "{5C6DF
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ha2", "ha2.vcproj", "{4C15FF8A-4C27-4243-9E21-E7C96AE94E58}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ha3", "ha3.vcproj", "{9A791169-2B91-451F-8A2C-CE28C9F1F316}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Win32 = Debug|Win32
@ -31,6 +33,10 @@ Global
{4C15FF8A-4C27-4243-9E21-E7C96AE94E58}.Debug|Win32.Build.0 = Debug|Win32
{4C15FF8A-4C27-4243-9E21-E7C96AE94E58}.Release|Win32.ActiveCfg = Release|Win32
{4C15FF8A-4C27-4243-9E21-E7C96AE94E58}.Release|Win32.Build.0 = Release|Win32
{9A791169-2B91-451F-8A2C-CE28C9F1F316}.Debug|Win32.ActiveCfg = Debug|Win32
{9A791169-2B91-451F-8A2C-CE28C9F1F316}.Debug|Win32.Build.0 = Debug|Win32
{9A791169-2B91-451F-8A2C-CE28C9F1F316}.Release|Win32.ActiveCfg = Release|Win32
{9A791169-2B91-451F-8A2C-CE28C9F1F316}.Release|Win32.Build.0 = Release|Win32
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE

View File

@ -334,6 +334,10 @@
RelativePath="..\ha\ha2100.cpp"
>
</File>
<File
RelativePath="..\ha\ha2200.cpp"
>
</File>
</Filter>
<Filter
Name="Headers"
@ -346,6 +350,14 @@
RelativePath="..\ha\ha2100a.h"
>
</File>
<File
RelativePath="..\ha\ha2200a.h"
>
</File>
<File
RelativePath="..\ha\hatbcel.h"
>
</File>
</Filter>
<Filter
Name="Masks"
@ -354,6 +366,14 @@
RelativePath="..\ha\ha2100a.uml"
>
</File>
<File
RelativePath="..\ha\ha2200a.uml"
>
</File>
<File
RelativePath="..\ha\hatbcel.uml"
>
</File>
</Filter>
<File
RelativePath="..\lib\AgaLib.lib"
@ -398,6 +418,14 @@
<File
RelativePath="..\lib\vedocd.lib"
>
<FileConfiguration
Name="Release|Win32"
ExcludedFromBuild="true"
>
<Tool
Name="VCCustomBuildTool"
/>
</FileConfiguration>
</File>
</Files>
<Globals>