使用soui开发的mbc,只支持windows版本
w1146869587
2022-01-24 0408576e9da10015ffa9da0079b8c985113ce4b3
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
#pragma once
 
#include "MBWatchDef.h"
 
/************************************************************************/
/*  mb_watch.db  Á¬½Ó
/************************************************************************/ 
class CMBWatchDBConnect : public CDBConnect
{
public:
    CMBWatchDBConnect();
    virtual ~CMBWatchDBConnect();
// Attributers
public:
    CString                m_strLogin;        // User Login Name
    CString                m_strServerID;    // Server ID
    CString                m_strDBFile;    // DB File Name 
private:
    int                    m_nAddRef;
    BOOL                m_bOpenDB;
// Operations
public:
    BOOL        OpenDB( CString strLogin,CString strPassword,  CString strServerID,BOOL bCheckFile, BOOL &bFirstDB );
    BOOL        CloseDB();
    BOOL        IsThisDB( CString strLogin, CString strServerID );
    CString        GetTemplateDBFile( );
    void        AddRef();
    void        Release();
    BOOL        IsDBOpen(){return m_bOpenDB;};
    
};
 
 
/************************************************************************/
/*  mb_watch.db¹ÜÀí 
/************************************************************************/ 
class AFX_EXT_CLASS CMBWatchDBMgr
{
public:
    CMBWatchDBMgr(void);
    ~CMBWatchDBMgr(void);
private:
    CString                    m_strLogin;        // User Login Name
    CString                    m_strServerID;    // Server ID 
    BOOL                    m_bIsCloseDB;
    CStringArray            m_arBatchSql; 
private:
    CMBWatchDBConnect    *m_pDBConnect;
public:
    BOOL        Logined( CString strLogin, CString strPassword, CString strServerID, BOOL &bFirstDB, BOOL bCheckFile = FALSE);
    BOOL        GetDBVersion( int &dwVersion );
    BOOL        SetDBVersion( int dwVersion );
    BOOL        UpdateNewDBTableInfo(int nVer );
    void        CleanDBConnect();
    BOOL        IsDBOpen();
    CMBWatchDBConnect* GetWatchDBConnect(  );
    BOOL        UpdatePropStringData(  CString strPropClass,
    CString strPropName, int nPropVer,CString strPropValue, CString strPropExtValue );
    BOOL        GetPropStringData(CString strPropClass,
    CString strPropName, int &nPropVer,CString &strPropValue, CString &strPropExtValue );
public:
    void        WriteLog(CString strLog );
public: 
    BOOL        GetBackupDirChangeCMD(CArraySyncDirCmd &arBackupDirCmd,bool bFirst  = false  );
    BOOL        GetBackupDirChangeFailedCMD(CArraySyncDirCmd &arBackupDirCmd );
    BOOL        UpdateBackupDirChangeCMD( CString strGUID, int nState, CString strErr = _T(""), int nErrID = 0);
    BOOL        ResetBackupDirChangeCMD( CString strGUID, CString strFilePath, CString strOperateType, CString strFileParam =_T(""));
    BOOL        RemoveBackupDirChangeCMD( CString strGUID);
    BOOL        RemoveBackupDirCMD( CString strDir);
    BOOL        RemoveAllBackupDirFailedCMD( );
    BOOL        ResetAllBackupDirFailedCMD( );
    BOOL        ResetBackupDirCMDInitState(CString strGUID );
    BOOL        InsertChangeDirCMD(CString strFilePath, CString strOperateType, CString strFileParam );
    BOOL        ResetBackupDirAllCMD( );
public:
    BOOL        GetBackupDirInfo(CArraySyncDirInfo &arBackupDirInfo );
    BOOL        NewBackupDirInfoToDB(CString strRootGUID, CString strGUID,CString strName,int nType, CString strDir); 
    BOOL        RemoveBackupDirInfo( CString strRootGUID,CString strGUID,int nType); 
    BOOL        RenameBackupDirInfo( CString strRootGUID, CString strGUID,CString strName,int nType);
    BOOL        BatchRunSQL( CStringArray &arSQL);
};