3 Star 0 Fork 2

leegoobin/DBConvert

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
dbsetdata.h 5.01 KB
一键复制 编辑 原始数据 按行查看 历史
leegoobin 提交于 2020-09-16 17:30 . 李国斌加了几个菜单
// DBSetData.h: interface for the CDBSetData class.
//
//////////////////////////////////////////////////////////////////////
#if !defined(AFX_DBSETDATA_H__85B9BDA5_2BF0_4DD3_8926_C8FE2389A125__INCLUDED_)
#define AFX_DBSETDATA_H__85B9BDA5_2BF0_4DD3_8926_C8FE2389A125__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
#define ITYPENUMS 8 //部件种类数:管部、根部、连接件、弹簧、螺栓螺母、型钢等共8种
enum{
iPA=0,
iPAFIX,
iPART,
iSA,
iSPRING,
iCSPRING,
iATTACHEMENT,
iBOLTSNUTS,
iSSTEEL
};
#define IDBNUMS 10 //数据库数组个数
bool FileExists(CString FileName);
class CDBSetData
{
public:
CDBSetData();
virtual ~CDBSetData();
static CDBSetData& Instance();
public:
bool CreateCrudeFromEHS2PHS(CString strDBPhs,CString strDBEhs);
bool CreateCrudeFromSY2sy0(CString);
bool iMaxRecordCount3(_RecordsetPtr& rs1,_RecordsetPtr& rs2,CString,int& iMaxRec1,int& iMaxRec2);
bool iMaxRecordCount(_RecordsetPtr& rs1,_RecordsetPtr& rs2,CString,int & iMaxRecordByCustomID,short iType);
bool FieldsCompare(_RecordsetPtr& rs1,_RecordsetPtr& rs2,short i1,short i2,int &,int &iMaxRecordCount1, int &iMaxRecordCount2);
bool AddNewRecord(CString strCustomID,CString strID2,CString, CString FdNamePHS, CString , CString FdNameEHS,_ConnectionPtr& pCon);
bool CreateTable(CString strTableName,CString);
bool CreateCrudeFromEHS2PHS_onePart(CString strDBPHS, CString strDBEHS, short iType);
bool FindFieldNameFromEHS_Type2(CString strDBPHS,CString strDBEHS,short iType, CProgressCtrl &m_progress);
bool FindFieldNameFromEHS_Type3(CString strDBPHS,CString strDBEHS,short iType, CProgressCtrl &m_progress);
bool WriteFieldName2Table(CString strCustomID,CString strFDNamePHS,CString strFDNameEHS);
bool GetSumFieldSQL(CString strTableName, _ConnectionPtr pConn,CString& strSQLsum,short&);
bool GetSumFieldSQL2(_RecordsetPtr&,CString& strSQLsum,short&);
bool AddMaterialToTableX();
bool AddCHNToFAO(CProgressCtrl &m_Progress,int nMode);
short AddCHNSTATToFAOSTAT(CString strCHNTable,CString strFAOTable,int iYear,short nFlag);
short AddMaterialToMaterialPropertyTable(CString strTable);
short AddMaterialXFindMaterial(_RecordsetPtr pRSrc,_RecordsetPtr pRDest);
short AddMaterialToMaterialCodeFind(CString strTable);
short AddMaterialToMaterialCode(CString strTable);
short AddMaterialToMaterial(CString strTable);
bool FindFieldNameFromEHS(CString,CString,CProgressCtrl&);
bool UpdateCustomIDandBH();
void CreatePrimaryMode();
void CreateRODDiaofCSPR();
void GetDataMDB();
void WriteWeight();
void SetStandard( const CString& strStandard );
void SetDBPath( const CString& strDBFile );
void SetDbDir( const CString strDbDir );
float fBminFBmax(int flag,long DH);
CString HDcrudeSYid(CString CustomID);
const CString& GetStandard() const;
bool ConnectionDatamdb();
void CreateHDCrude();
protected:
int FilterPRsDY(_RecordsetPtr &pRs,CString str);
private:
BOOL DeleteTableRecord( const CString& strTbl );
BOOL RemoveTable( const CString &strTbl );
BOOL ExecuteSQL( const CString& strSQL );
BOOL CopyTableData( const CString& strTblTo, const CString& strTblFrom );
BOOL OpenTable( _RecordsetPtr& pReRecord, const CString& strTbl, const CString& strOrder = _T("") ) const;
void GetXYValue( float& x, float& y, const CString& CustomID, const long& DH );
void SetRecordValue( _RecordsetPtr& pRs, const _RecordsetPtr& pRsSource );
long GetNextDisplacement( const _RecordsetPtr& pRs, const long& lCurDisplace );
CString ConversionCustomID( const CString& strCustID, int nInputIDCol = 1 ) const;
void WritefBmax();
void AddData_sy(CString strKey);
public:
private:
_ConnectionPtr m_pCon;
_RecordsetPtr m_pRsDispRange;
_RecordsetPtr m_pRD;
_RecordsetPtr m_pRes;
_RecordsetPtr m_pRsy;
CString m_strDBPathName;//数据库文件名带路径
CString m_strDBDir;//数据库目录
CString m_strStandard;//恒力弹簧标准字符:CZ-常州电力, SY-江苏苏源, 2010-电力ZD2010
CString m_strHDCrude;//恒吊数据表
CString m_strHDWeight;//恒吊重量表
CString m_strHDDisplacementRange;//恒吊位移范围表
CString m_strHDDisplacementSerial;//恒吊位移系列表
CString m_strHDCustomid;//恒吊类别对照表,必须含有CustomID、CustomID1两个字段
CString m_strHDLugDiaofCSPR;//恒吊拉杆直径表
CString m_strHDLugDiaofCSPR1;//恒吊拉杆直径表
CString m_strHDsourceRODDiaOfCSPR;//恒吊拉杆直径原始数据表
CString m_strHDcrudeid;//恒吊通用类别数据表
CString m_strHDDIM_Primary1;//恒吊尺寸表
CString m_strHDDIM_Primary;//恒吊尺寸表
CString m_strHDDIM_PrimaryMode;//恒吊尺寸表
CString m_strHDCSPR_FieldNameSizeVar;//恒吊尺寸字段对照表
CString strFDNTableData[ITYPENUMS],strFDNID[ITYPENUMS];
CString strTableData[ITYPENUMS],strID[ITYPENUMS],strPhsManu[ITYPENUMS];
CString strFDNTableData2[ITYPENUMS],strFDNID2[ITYPENUMS];
CString strTableData2[ITYPENUMS],strID2[ITYPENUMS];
CString strTableData3[ITYPENUMS];
//added by ligb 2018.11.15
int m_iAutoPSA_ID;
int m_iCODE_ID;
public:
bool DBConvertEHS2PHS_SA(CString strDBPHS,CString strDBEHS);
CString sourceNM[IDBNUMS],sourceDB[IDBNUMS],source2DB[IDBNUMS];
};
#endif // !defined(AFX_DBSETDATA_H__85B9BDA5_2BF0_4DD3_8926_C8FE2389A125__INCLUDED_)
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/uesoft/DBConvert.git
git@gitee.com:uesoft/DBConvert.git
uesoft
DBConvert
DBConvert
master

搜索帮助

D67c1975 1850385 1daf7b77 1850385