359 lines
6.9 KiB
C++
359 lines
6.9 KiB
C++
// Version: 2014.9.2 16:30:15
|
|
|
|
#ifndef _T_LOV_STEELGRADE_H
|
|
#define _T_LOV_STEELGRADE_H
|
|
#include <stdio.h>
|
|
#include <string.h>
|
|
#include <stdlib.h>
|
|
#ifdef _MSC_VER
|
|
#pragma warning(disable:4996)
|
|
#pragma warning(disable:4267)
|
|
#endif
|
|
#include "T_LOV_STEELGRADEDBAX.h"
|
|
class T_LOV_STEELGRADE{
|
|
friend class T_LOV_STEELGRADEDBAX;
|
|
private:
|
|
//aggregation to DB Class
|
|
T_LOV_STEELGRADEDBAX 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_SteelGrade[30+1];
|
|
char c_OrderQuality[30+1];
|
|
short s_OrderQualityZi;
|
|
char c_SteelClass[30+1];
|
|
short s_SteelClassZi;
|
|
short s_SGCode[10];
|
|
short s_SGCodeZi[10];
|
|
char c_toc[27];
|
|
short s_tocZi;
|
|
char c_tom[27];
|
|
short s_tomZi;
|
|
char c_mop[121];
|
|
short s_mopZi;
|
|
char c_mou[31];
|
|
short s_mouZi;
|
|
// arguments for Primary key
|
|
char c_k_SteelGrade[30+1];
|
|
public:
|
|
//
|
|
// LTA Structure
|
|
struct STR_T_LOV_STEELGRADE{
|
|
char SteelGrade[30+1];
|
|
char OrderQuality[30+1];
|
|
char SteelClass[30+1];
|
|
short SGCode[10];
|
|
char toc[27];
|
|
char tom[27];
|
|
char mop[121];
|
|
char mou[31];
|
|
}structTable;
|
|
// LTA Structure Zi
|
|
struct STR_T_LOV_STEELGRADEZi{
|
|
short OrderQualityZi;
|
|
short SteelClassZi;
|
|
short SGCodeZi[10];
|
|
short tocZi;
|
|
short tomZi;
|
|
short mopZi;
|
|
short mouZi;
|
|
}structTableZi;
|
|
//
|
|
//C O N S T R U C T O R S
|
|
//=======================
|
|
//
|
|
public:
|
|
T_LOV_STEELGRADE();
|
|
//D E S T R U C T O R S
|
|
//=======================
|
|
//
|
|
virtual ~T_LOV_STEELGRADE();
|
|
//
|
|
//C O P Y - C O N S T R U C T O R
|
|
//=======================
|
|
T_LOV_STEELGRADE(const T_LOV_STEELGRADE &inst);
|
|
// For Constructors with parameters the flag dbAccess
|
|
// informs you if the access was successfully or not
|
|
T_LOV_STEELGRADE( const char* arg1);
|
|
|
|
//methods
|
|
public:
|
|
char* getCreationTime() {return "2014.9.2 16:30:15";};
|
|
//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_LOV_STEELGRADE operator+(const T_LOV_STEELGRADE &inst) const;
|
|
|
|
//
|
|
//O P E R A T O R =
|
|
//===================
|
|
//
|
|
public:
|
|
const T_LOV_STEELGRADE& operator=(const T_LOV_STEELGRADE &inst);
|
|
char* SteelGrade() const;//{
|
|
//return((char*)c_SteelGrade );
|
|
//}
|
|
|
|
|
|
void set_SteelGrade( const char* arg );//{
|
|
//strncpy((char*)c_SteelGrade , arg , sizeof(c_SteelGrade));
|
|
//c_SteelGrade[sizeof(c_SteelGrade)-1] = '\0';
|
|
//return;
|
|
//}
|
|
|
|
|
|
char* OrderQuality() const;//{
|
|
//return((char*)c_OrderQuality );
|
|
//}
|
|
|
|
short OrderQualityZi() const;//{
|
|
//return( s_OrderQualityZi);
|
|
//}
|
|
|
|
void set_OrderQuality( const char* arg );//{
|
|
//strncpy((char*)c_OrderQuality , arg , sizeof(c_OrderQuality));
|
|
//c_OrderQuality[sizeof(c_OrderQuality)-1] = '\0';
|
|
//s_OrderQualityZi= 0;
|
|
//return;
|
|
//}
|
|
|
|
void set_OrderQualityZi( short arg ) ;//{
|
|
//s_OrderQualityZi = arg;
|
|
//}
|
|
|
|
char* SteelClass() const;//{
|
|
//return((char*)c_SteelClass );
|
|
//}
|
|
|
|
short SteelClassZi() const;//{
|
|
//return( s_SteelClassZi);
|
|
//}
|
|
|
|
void set_SteelClass( const char* arg );//{
|
|
//strncpy((char*)c_SteelClass , arg , sizeof(c_SteelClass));
|
|
//c_SteelClass[sizeof(c_SteelClass)-1] = '\0';
|
|
//s_SteelClassZi= 0;
|
|
//return;
|
|
//}
|
|
|
|
void set_SteelClassZi( short arg ) ;//{
|
|
//s_SteelClassZi = arg;
|
|
//}
|
|
|
|
int SGCodeArraySize();//{
|
|
//return(10);
|
|
//}
|
|
|
|
short SGCode(int colInd) const;//{
|
|
//return((short)s_SGCode[colInd] );
|
|
//}
|
|
|
|
short SGCodeZi(int colInd) const;//{
|
|
//return( s_SGCodeZi[colInd]);
|
|
//}
|
|
|
|
void set_SGCode( int colInd, short arg );//{
|
|
//s_SGCode[colInd] = arg;
|
|
//s_SGCodeZi[colInd]= 0;
|
|
//return;
|
|
//}
|
|
|
|
void set_SGCodeZi( int colInd, short arg );// {
|
|
//s_SGCodeZi[colInd] = arg;
|
|
//}
|
|
|
|
public:
|
|
char* toc() const;//{
|
|
//return((char*)c_toc );
|
|
//}
|
|
|
|
short tocZi() const;//{
|
|
//return( s_tocZi);
|
|
//}
|
|
|
|
protected:
|
|
void set_toc( char* arg );//{
|
|
//strncpy((char*)c_toc , arg , sizeof(c_toc));
|
|
//c_toc[sizeof(c_toc)-1] = '\0';
|
|
//s_tocZi= 0;
|
|
//return;
|
|
//}
|
|
|
|
void set_tocZi( short arg );//{
|
|
//s_tocZi = arg;
|
|
//}
|
|
|
|
public:
|
|
char* tom() const;//{
|
|
//return((char*)c_tom );
|
|
//}
|
|
|
|
short tomZi() const;//{
|
|
//return( s_tomZi);
|
|
//}
|
|
|
|
protected:
|
|
void set_tom( char* arg );//{
|
|
//strncpy((char*)c_tom , arg , sizeof(c_tom));
|
|
//c_tom[sizeof(c_tom)-1] = '\0';
|
|
//s_tomZi= 0;
|
|
//return;
|
|
//}
|
|
|
|
void set_tomZi( short arg );//{
|
|
//s_tomZi = arg;
|
|
//}
|
|
|
|
public:
|
|
char* mop() const;//{
|
|
//return((char*)c_mop );
|
|
//}
|
|
|
|
short mopZi() const;//{
|
|
//return( s_mopZi);
|
|
//}
|
|
|
|
protected:
|
|
void set_mop( char* arg );//{
|
|
//strncpy((char*)c_mop , arg , sizeof(c_mop));
|
|
//c_mop[sizeof(c_mop)-1] = '\0';
|
|
//s_mopZi= 0;
|
|
//return;
|
|
//}
|
|
|
|
void set_mopZi( short arg );//{
|
|
//s_mopZi = arg;
|
|
//}
|
|
|
|
public:
|
|
char* mou() const;//{
|
|
//return((char*)c_mou );
|
|
//}
|
|
|
|
short mouZi() const;//{
|
|
//return( s_mouZi);
|
|
//}
|
|
|
|
protected:
|
|
void set_mou( char* arg );//{
|
|
//strncpy((char*)c_mou , arg , sizeof(c_mou));
|
|
//c_mou[sizeof(c_mou)-1] = '\0';
|
|
//s_mouZi= 0;
|
|
//return;
|
|
//}
|
|
|
|
void set_mouZi( short arg );//{
|
|
//s_mouZi = arg;
|
|
//}
|
|
|
|
public:
|
|
// methodes for Primary key
|
|
char* k_SteelGrade();//{
|
|
//return((char*)c_k_SteelGrade );
|
|
//}
|
|
|
|
void set_k_SteelGrade( char* arg );//{
|
|
//strncpy((char*)c_k_SteelGrade , arg , sizeof(c_k_SteelGrade));
|
|
//c_k_SteelGrade[sizeof(c_k_SteelGrade)-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_LOV_STEELGRADE");
|
|
//}
|
|
///////////////////////////////////////////////////
|
|
int getSqlCode();//{
|
|
//return( db.dbSqlCode);
|
|
//}
|
|
///////////////////////////////////////////////////
|
|
int getRowsProcessed();//{
|
|
//return( db.dbRowsProcessed);
|
|
//}
|
|
};
|
|
#endif
|