eis/inc/dbinc/T_DPI_DATA.h

791 lines
16 KiB
C++

// Version: 2019.6.19 13:7:4
#ifndef _T_DPI_DATA_H
#define _T_DPI_DATA_H
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#ifdef _MSC_VER
#pragma warning(disable:4996)
#pragma warning(disable:4267)
#endif
#include "T_DPI_DATADBAX.h"
class T_DPI_DATA{
friend class T_DPI_DATADBAX;
private:
//aggregation to DB Class
T_DPI_DATADBAX db;
public:
//
//A T T R I B U T E S
//===================
//
bool dbAccess;
char* dbMessage;// pointer for the return values of DBAX methodes
char messageBuffer[200];// temporary message buffer
friend class PapLib;
protected:
//
//A T T R I B U T E S
//===================
//
char c_OrderNo[10+1];
char c_PlanNo[9+1];
short s_PlanNoZi;
char c_ProduceDate[27];
short s_ProduceDateZi;
char c_entId[20+1];
char c_SteelGradeCode[3+1];
short s_SteelGradeCodeZi;
long l_Weight;
short s_WeightZi;
long l_Thickness;
short s_ThicknessZi;
long l_Width;
short s_WidthZi;
long l_Length;
short s_LengthZi;
short s_OutDiameter;
short s_OutDiameterZi;
char c_WorkingKindCode[2+1];
short s_WorkingKindCodeZi;
char c_PaperCode[2+1];
short s_PaperCodeZi;
char c_EntrySleeveUse[1+1];
short s_EntrySleeveUseZi;
char c_EntrySleeveType[1+1];
short s_EntrySleeveTypeZi;
short s_EntrySleeveDia;
short s_EntrySleeveDiaZi;
char c_EntrySleeveCode[4+1];
short s_EntrySleeveCodeZi;
char c_FinishingCode[2+1];
short s_FinishingCodeZi;
char c_BaseSurface[1+1];
short s_BaseSurfaceZi;
char c_APN[4+1];
short s_APNZi;
char c_SpecificationCode[6+1];
short s_SpecificationCodeZi;
char c_PreviousProcess[2+1];
short s_PreviousProcessZi;
char c_NextProcess[2+1];
short s_NextProcessZi;
char c_YardNr[10+1];
short s_YardNrZi;
char c_SpecialCommandCode[3+1];
short s_SpecialCommandCodeZi;
long l_DefectBeginPosition;
short s_DefectBeginPositionZi;
long l_DefectEndPosition;
short s_DefectEndPositionZi;
char c_DefectSurfacePosition[1+1];
short s_DefectSurfacePositionZi;
char c_DefectCode[4+1];
short s_DefectCodeZi;
// arguments for Primary key
char c_k_entId[20+1];
public:
//
// LTA Structure
struct STR_T_DPI_DATA{
char OrderNo[10+1];
char PlanNo[9+1];
char ProduceDate[27];
char entId[20+1];
char SteelGradeCode[3+1];
int Weight;
int Thickness;
int Width;
int Length;
short OutDiameter;
char WorkingKindCode[2+1];
char PaperCode[2+1];
char EntrySleeveUse[1+1];
char EntrySleeveType[1+1];
short EntrySleeveDia;
char EntrySleeveCode[4+1];
char FinishingCode[2+1];
char BaseSurface[1+1];
char APN[4+1];
char SpecificationCode[6+1];
char PreviousProcess[2+1];
char NextProcess[2+1];
char YardNr[10+1];
char SpecialCommandCode[3+1];
int DefectBeginPosition;
int DefectEndPosition;
char DefectSurfacePosition[1+1];
char DefectCode[4+1];
}structTable;
// LTA Structure Zi
struct STR_T_DPI_DATAZi{
short PlanNoZi;
short ProduceDateZi;
short SteelGradeCodeZi;
short WeightZi;
short ThicknessZi;
short WidthZi;
short LengthZi;
short OutDiameterZi;
short WorkingKindCodeZi;
short PaperCodeZi;
short EntrySleeveUseZi;
short EntrySleeveTypeZi;
short EntrySleeveDiaZi;
short EntrySleeveCodeZi;
short FinishingCodeZi;
short BaseSurfaceZi;
short APNZi;
short SpecificationCodeZi;
short PreviousProcessZi;
short NextProcessZi;
short YardNrZi;
short SpecialCommandCodeZi;
short DefectBeginPositionZi;
short DefectEndPositionZi;
short DefectSurfacePositionZi;
short DefectCodeZi;
}structTableZi;
//
//C O N S T R U C T O R S
//=======================
//
public:
T_DPI_DATA();
//D E S T R U C T O R S
//=======================
//
virtual ~T_DPI_DATA();
//
//C O P Y - C O N S T R U C T O R
//=======================
T_DPI_DATA(const T_DPI_DATA &inst);
// For Constructors with parameters the flag dbAccess
// informs you if the access was successfully or not
T_DPI_DATA( const char* arg1);
//methods
public:
char* getCreationTime() {return "2019.6.19 13:7:4";};
//initial data
void initial();
//read data
char* readDB();
//update data
char* updateDB();
//insert data
char* insertDB();
//this methode tries to update a DB record , when the update fails , the methode
//tries an insert of the failed record
char* storeDB();
//delete data
char* deleteDB();
//delete data
char* deleteDB(const char* where , long* count );
//openSetDB data
char* openSetDB(const char* where ,const char* order );
//getSetDB data
char* getSetDB();
//closeSetDB data
char* closeSetDB();
//countDB data
char* countDB(const char* where , long* count );
char* execute(const char* sql , long* count );
char* dbCommit();
char* dbRollback();
public:
//
// public methode setPrimKey
//
// this methode stores the unique key attributes
//
void setPrimKey(const char* arg1 );
// public methode initInsertKeys
//
// this methode stores the unique key attributes
//
void initInsertKeys( const char* arg1 );
public:
//
// public methode setKeysFromRecord
//
// this methode set the unique key attributes from the DB Record Attributes
//
void setKeysFromRecord();
//
//O P E R A T O R +
//===================
//
public:
T_DPI_DATA operator+(const T_DPI_DATA &inst) const;
//
//O P E R A T O R =
//===================
//
public:
const T_DPI_DATA& operator=(const T_DPI_DATA &inst);
char* OrderNo() const;//{
//return((char*)c_OrderNo );
//}
void set_OrderNo( const char* arg );//{
//strncpy((char*)c_OrderNo , arg , sizeof(c_OrderNo));
//c_OrderNo[sizeof(c_OrderNo)-1] = '\0';
//return;
//}
char* PlanNo() const;//{
//return((char*)c_PlanNo );
//}
short PlanNoZi() const;//{
//return( s_PlanNoZi);
//}
void set_PlanNo( const char* arg );//{
//strncpy((char*)c_PlanNo , arg , sizeof(c_PlanNo));
//c_PlanNo[sizeof(c_PlanNo)-1] = '\0';
//s_PlanNoZi= 0;
//return;
//}
void set_PlanNoZi( short arg ) ;//{
//s_PlanNoZi = arg;
//}
char* ProduceDate() const;//{
//return((char*)c_ProduceDate );
//}
short ProduceDateZi() const;//{
//return( s_ProduceDateZi);
//}
void set_ProduceDate( char* arg );//{
//strncpy((char*)c_ProduceDate , arg , sizeof(c_ProduceDate));
//c_ProduceDate[sizeof(c_ProduceDate)-1] = '\0';
//s_ProduceDateZi= 0;
//return;
//}
void set_ProduceDateZi( short arg ) ;//{
//s_ProduceDateZi = arg;
//}
char* entId() const;//{
//return((char*)c_entId );
//}
void set_entId( const char* arg );//{
//strncpy((char*)c_entId , arg , sizeof(c_entId));
//c_entId[sizeof(c_entId)-1] = '\0';
//return;
//}
char* SteelGradeCode() const;//{
//return((char*)c_SteelGradeCode );
//}
short SteelGradeCodeZi() const;//{
//return( s_SteelGradeCodeZi);
//}
void set_SteelGradeCode( const char* arg );//{
//strncpy((char*)c_SteelGradeCode , arg , sizeof(c_SteelGradeCode));
//c_SteelGradeCode[sizeof(c_SteelGradeCode)-1] = '\0';
//s_SteelGradeCodeZi= 0;
//return;
//}
void set_SteelGradeCodeZi( short arg ) ;//{
//s_SteelGradeCodeZi = arg;
//}
long Weight() const;//{
//return((long)l_Weight );
//}
short WeightZi() const;//{
//return( s_WeightZi);
//}
void set_Weight( long arg );//{
//l_Weight = arg;
//s_WeightZi= 0;
//return;
//}
void set_WeightZi( short arg ) ;//{
//s_WeightZi = arg;
//}
long Thickness() const;//{
//return((long)l_Thickness );
//}
short ThicknessZi() const;//{
//return( s_ThicknessZi);
//}
void set_Thickness( long arg );//{
//l_Thickness = arg;
//s_ThicknessZi= 0;
//return;
//}
void set_ThicknessZi( short arg ) ;//{
//s_ThicknessZi = arg;
//}
long Width() const;//{
//return((long)l_Width );
//}
short WidthZi() const;//{
//return( s_WidthZi);
//}
void set_Width( long arg );//{
//l_Width = arg;
//s_WidthZi= 0;
//return;
//}
void set_WidthZi( short arg ) ;//{
//s_WidthZi = arg;
//}
long Length() const;//{
//return((long)l_Length );
//}
short LengthZi() const;//{
//return( s_LengthZi);
//}
void set_Length( long arg );//{
//l_Length = arg;
//s_LengthZi= 0;
//return;
//}
void set_LengthZi( short arg ) ;//{
//s_LengthZi = arg;
//}
short OutDiameter() const;//{
//return((short)s_OutDiameter );
//}
short OutDiameterZi() const;//{
//return( s_OutDiameterZi);
//}
void set_OutDiameter( short arg );//{
//s_OutDiameter = arg;
//s_OutDiameterZi= 0;
//return;
//}
void set_OutDiameterZi( short arg ) ;//{
//s_OutDiameterZi = arg;
//}
char* WorkingKindCode() const;//{
//return((char*)c_WorkingKindCode );
//}
short WorkingKindCodeZi() const;//{
//return( s_WorkingKindCodeZi);
//}
void set_WorkingKindCode( const char* arg );//{
//strncpy((char*)c_WorkingKindCode , arg , sizeof(c_WorkingKindCode));
//c_WorkingKindCode[sizeof(c_WorkingKindCode)-1] = '\0';
//s_WorkingKindCodeZi= 0;
//return;
//}
void set_WorkingKindCodeZi( short arg ) ;//{
//s_WorkingKindCodeZi = arg;
//}
char* PaperCode() const;//{
//return((char*)c_PaperCode );
//}
short PaperCodeZi() const;//{
//return( s_PaperCodeZi);
//}
void set_PaperCode( const char* arg );//{
//strncpy((char*)c_PaperCode , arg , sizeof(c_PaperCode));
//c_PaperCode[sizeof(c_PaperCode)-1] = '\0';
//s_PaperCodeZi= 0;
//return;
//}
void set_PaperCodeZi( short arg ) ;//{
//s_PaperCodeZi = arg;
//}
char* EntrySleeveUse() const;//{
//return((char*)c_EntrySleeveUse );
//}
short EntrySleeveUseZi() const;//{
//return( s_EntrySleeveUseZi);
//}
void set_EntrySleeveUse( const char* arg );//{
//strncpy((char*)c_EntrySleeveUse , arg , sizeof(c_EntrySleeveUse));
//c_EntrySleeveUse[sizeof(c_EntrySleeveUse)-1] = '\0';
//s_EntrySleeveUseZi= 0;
//return;
//}
void set_EntrySleeveUseZi( short arg ) ;//{
//s_EntrySleeveUseZi = arg;
//}
char* EntrySleeveType() const;//{
//return((char*)c_EntrySleeveType );
//}
short EntrySleeveTypeZi() const;//{
//return( s_EntrySleeveTypeZi);
//}
void set_EntrySleeveType( const char* arg );//{
//strncpy((char*)c_EntrySleeveType , arg , sizeof(c_EntrySleeveType));
//c_EntrySleeveType[sizeof(c_EntrySleeveType)-1] = '\0';
//s_EntrySleeveTypeZi= 0;
//return;
//}
void set_EntrySleeveTypeZi( short arg ) ;//{
//s_EntrySleeveTypeZi = arg;
//}
short EntrySleeveDia() const;//{
//return((short)s_EntrySleeveDia );
//}
short EntrySleeveDiaZi() const;//{
//return( s_EntrySleeveDiaZi);
//}
void set_EntrySleeveDia( short arg );//{
//s_EntrySleeveDia = arg;
//s_EntrySleeveDiaZi= 0;
//return;
//}
void set_EntrySleeveDiaZi( short arg ) ;//{
//s_EntrySleeveDiaZi = arg;
//}
char* EntrySleeveCode() const;//{
//return((char*)c_EntrySleeveCode );
//}
short EntrySleeveCodeZi() const;//{
//return( s_EntrySleeveCodeZi);
//}
void set_EntrySleeveCode( const char* arg );//{
//strncpy((char*)c_EntrySleeveCode , arg , sizeof(c_EntrySleeveCode));
//c_EntrySleeveCode[sizeof(c_EntrySleeveCode)-1] = '\0';
//s_EntrySleeveCodeZi= 0;
//return;
//}
void set_EntrySleeveCodeZi( short arg ) ;//{
//s_EntrySleeveCodeZi = arg;
//}
char* FinishingCode() const;//{
//return((char*)c_FinishingCode );
//}
short FinishingCodeZi() const;//{
//return( s_FinishingCodeZi);
//}
void set_FinishingCode( const char* arg );//{
//strncpy((char*)c_FinishingCode , arg , sizeof(c_FinishingCode));
//c_FinishingCode[sizeof(c_FinishingCode)-1] = '\0';
//s_FinishingCodeZi= 0;
//return;
//}
void set_FinishingCodeZi( short arg ) ;//{
//s_FinishingCodeZi = arg;
//}
char* BaseSurface() const;//{
//return((char*)c_BaseSurface );
//}
short BaseSurfaceZi() const;//{
//return( s_BaseSurfaceZi);
//}
void set_BaseSurface( const char* arg );//{
//strncpy((char*)c_BaseSurface , arg , sizeof(c_BaseSurface));
//c_BaseSurface[sizeof(c_BaseSurface)-1] = '\0';
//s_BaseSurfaceZi= 0;
//return;
//}
void set_BaseSurfaceZi( short arg ) ;//{
//s_BaseSurfaceZi = arg;
//}
char* APN() const;//{
//return((char*)c_APN );
//}
short APNZi() const;//{
//return( s_APNZi);
//}
void set_APN( const char* arg );//{
//strncpy((char*)c_APN , arg , sizeof(c_APN));
//c_APN[sizeof(c_APN)-1] = '\0';
//s_APNZi= 0;
//return;
//}
void set_APNZi( short arg ) ;//{
//s_APNZi = arg;
//}
char* SpecificationCode() const;//{
//return((char*)c_SpecificationCode );
//}
short SpecificationCodeZi() const;//{
//return( s_SpecificationCodeZi);
//}
void set_SpecificationCode( const char* arg );//{
//strncpy((char*)c_SpecificationCode , arg , sizeof(c_SpecificationCode));
//c_SpecificationCode[sizeof(c_SpecificationCode)-1] = '\0';
//s_SpecificationCodeZi= 0;
//return;
//}
void set_SpecificationCodeZi( short arg ) ;//{
//s_SpecificationCodeZi = arg;
//}
char* PreviousProcess() const;//{
//return((char*)c_PreviousProcess );
//}
short PreviousProcessZi() const;//{
//return( s_PreviousProcessZi);
//}
void set_PreviousProcess( const char* arg );//{
//strncpy((char*)c_PreviousProcess , arg , sizeof(c_PreviousProcess));
//c_PreviousProcess[sizeof(c_PreviousProcess)-1] = '\0';
//s_PreviousProcessZi= 0;
//return;
//}
void set_PreviousProcessZi( short arg ) ;//{
//s_PreviousProcessZi = arg;
//}
char* NextProcess() const;//{
//return((char*)c_NextProcess );
//}
short NextProcessZi() const;//{
//return( s_NextProcessZi);
//}
void set_NextProcess( const char* arg );//{
//strncpy((char*)c_NextProcess , arg , sizeof(c_NextProcess));
//c_NextProcess[sizeof(c_NextProcess)-1] = '\0';
//s_NextProcessZi= 0;
//return;
//}
void set_NextProcessZi( short arg ) ;//{
//s_NextProcessZi = arg;
//}
char* YardNr() const;//{
//return((char*)c_YardNr );
//}
short YardNrZi() const;//{
//return( s_YardNrZi);
//}
void set_YardNr( const char* arg );//{
//strncpy((char*)c_YardNr , arg , sizeof(c_YardNr));
//c_YardNr[sizeof(c_YardNr)-1] = '\0';
//s_YardNrZi= 0;
//return;
//}
void set_YardNrZi( short arg ) ;//{
//s_YardNrZi = arg;
//}
char* SpecialCommandCode() const;//{
//return((char*)c_SpecialCommandCode );
//}
short SpecialCommandCodeZi() const;//{
//return( s_SpecialCommandCodeZi);
//}
void set_SpecialCommandCode( const char* arg );//{
//strncpy((char*)c_SpecialCommandCode , arg , sizeof(c_SpecialCommandCode));
//c_SpecialCommandCode[sizeof(c_SpecialCommandCode)-1] = '\0';
//s_SpecialCommandCodeZi= 0;
//return;
//}
void set_SpecialCommandCodeZi( short arg ) ;//{
//s_SpecialCommandCodeZi = arg;
//}
long DefectBeginPosition() const;//{
//return((long)l_DefectBeginPosition );
//}
short DefectBeginPositionZi() const;//{
//return( s_DefectBeginPositionZi);
//}
void set_DefectBeginPosition( long arg );//{
//l_DefectBeginPosition = arg;
//s_DefectBeginPositionZi= 0;
//return;
//}
void set_DefectBeginPositionZi( short arg ) ;//{
//s_DefectBeginPositionZi = arg;
//}
long DefectEndPosition() const;//{
//return((long)l_DefectEndPosition );
//}
short DefectEndPositionZi() const;//{
//return( s_DefectEndPositionZi);
//}
void set_DefectEndPosition( long arg );//{
//l_DefectEndPosition = arg;
//s_DefectEndPositionZi= 0;
//return;
//}
void set_DefectEndPositionZi( short arg ) ;//{
//s_DefectEndPositionZi = arg;
//}
char* DefectSurfacePosition() const;//{
//return((char*)c_DefectSurfacePosition );
//}
short DefectSurfacePositionZi() const;//{
//return( s_DefectSurfacePositionZi);
//}
void set_DefectSurfacePosition( const char* arg );//{
//strncpy((char*)c_DefectSurfacePosition , arg , sizeof(c_DefectSurfacePosition));
//c_DefectSurfacePosition[sizeof(c_DefectSurfacePosition)-1] = '\0';
//s_DefectSurfacePositionZi= 0;
//return;
//}
void set_DefectSurfacePositionZi( short arg ) ;//{
//s_DefectSurfacePositionZi = arg;
//}
char* DefectCode() const;//{
//return((char*)c_DefectCode );
//}
short DefectCodeZi() const;//{
//return( s_DefectCodeZi);
//}
void set_DefectCode( const char* arg );//{
//strncpy((char*)c_DefectCode , arg , sizeof(c_DefectCode));
//c_DefectCode[sizeof(c_DefectCode)-1] = '\0';
//s_DefectCodeZi= 0;
//return;
//}
void set_DefectCodeZi( short arg ) ;//{
//s_DefectCodeZi = arg;
//}
public:
// methodes for Primary key
char* k_entId();//{
//return((char*)c_k_entId );
//}
void set_k_entId( char* arg );//{
//strncpy((char*)c_k_entId , arg , sizeof(c_k_entId));
//c_k_entId[sizeof(c_k_entId)-1] = '\0';
//return;
//}
public:
//
// public methode fillStructure
//
// this methode filles the classstructue with the private attributes
//
void fillStructure();//{
//}
///////////////////////////////////////////////////
void fillStructureZi();//{
//}
///////////////////////////////////////////////////
void setStructure();// {
//return;
//}
///////////////////////////////////////////////////
void setStructureZi() ;//{
//}
///////////////////////////////////////////////////
char* getName();//{
//return("T_DPI_DATA");
//}
///////////////////////////////////////////////////
int getSqlCode();//{
//return( db.dbSqlCode);
//}
///////////////////////////////////////////////////
int getRowsProcessed();//{
//return( db.dbRowsProcessed);
//}
};
#endif