123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201 |
- // DBServerDlg.h : header file
- //
- #if !defined(AFX_APPLICATIONDLG_H__D3E3BA87_EEFA_11D5_AB1C_00D0B70C3D79__INCLUDED_)
- #define AFX_APPLICATIONDLG_H__D3E3BA87_EEFA_11D5_AB1C_00D0B70C3D79__INCLUDED_
- #if _MSC_VER > 1000
- #pragma once
- #endif // _MSC_VER > 1000 GenSPhoto
- #include "TracePage.h"
- #include "OnlineUsersPage.h"
- #include "ConfigurationPage.h"
- #include "StatisticsPage.h"
- #include "SecurityPage.h"
- #include "DialogResize.h"
- #include "FTPEventSink.h"
- #include "InfobarCtrl.h"
- #include "TrayIcon.h"
- class CDBServerDlg : public CDialog, CFTPEventSink
- {
- CString m_bakserver5;
- HINSTANCE hInst;
- CTrayIcon m_TrayIcon;
- // Construction
- public:
- void GenYLGL();
- void AutoDelBakPhoto();
- void ManagePhoto();
- void RestoreHQ();
- void CheckConnCount();
- void AddOneConn();
- //void LoadDB();
- void LoadHistoryDB(); // Jeff¼ÓÔØÀúÊ·Êý¾Ý¿â;
- void GenUPhoneData();
- void CheckRegCode(); //
- CString GetRegCode(int m_id, int m_time1, int m_time2);
- void CheckBakState();
- void CheckMemberMsg();
- BOOL m_bNetWorkOK;
- void LoadBranchInfo2();
- void ReleaseBranchDB();
- void LoadBranchInfo();
- void UpdateBalance();
- void GetFileDate();
- void OnExit2();
- void MyExitWindows();
- void ShutDown();
- void LoadThumbImages2();
- void BakPhoto();
- BOOL DelPhoto1(CString path, CString id);
- void AutoDelPhoto();
- void UpdateDate();
- void MyExecuteSQL(CDatabase* pdb, CString sql);
- BOOL CheckSendReg(CDatabase *pdb1, CDatabase *pdb2, CString id);
- BOOL CheckDinDanExist(CDatabase *pdb1, CDatabase *pdb2, CString id, CStringArray *pretarray);
- BOOL CheckPayOutExist(CDatabase *pdb1, CDatabase *pdb2, CString id);
- BOOL CheckIncomeExist(CDatabase *pdb1, CDatabase *pdb2, CString id, CStringArray *pretarray);
- BOOL CheckIncomeMoneyExist(CDatabase *pdb1, CDatabase *pdb2, CString id);
- int TransDinDan(CDatabase *pdb1, CDatabase *pdb2, CString id, int year);
- BOOL TransPayOut(CDatabase *pdb1, CDatabase *pdb2, CString id, int year);
- BOOL TransIncome(CDatabase *pdb1, CDatabase *pdb2, CString id, int year);
- BOOL TransIncomeMoney(CDatabase *pdb1, CDatabase *pdb2, CString id, int year);
- BOOL Checkclient2phonerecordExist(CDatabase *pdb1, CDatabase *pdb2, CString id);
- BOOL Transclient2phonerecord(CDatabase *pdb1, CDatabase *pdb2, CString id, int year);
- BOOL Checkclient2phonerecordoutExist(CDatabase *pdb1, CDatabase *pdb2, CString id);
- BOOL Transclient2phonerecordout(CDatabase *pdb1, CDatabase *pdb2, CString id, int year);
- BOOL Checkclient3phonerecordExist(CDatabase *pdb1, CDatabase *pdb2, CString id);
- BOOL Transclient3phonerecord(CDatabase *pdb1, CDatabase *pdb2, CString id, int year);
- BOOL Checkclient3phonerecordoutExist(CDatabase *pdb1, CDatabase *pdb2, CString id);
- BOOL Transclient3phonerecordout(CDatabase *pdb1, CDatabase *pdb2, CString id, int year);
- BOOL CheckemployeephonerecordExist(CDatabase *pdb1, CDatabase *pdb2, CString id);
- BOOL Transemployeephonerecord(CDatabase *pdb1, CDatabase *pdb2, CString id, int year);
- BOOL CheckemployeephonerecordoutExist(CDatabase *pdb1, CDatabase *pdb2, CString id);
- BOOL Transemployeephonerecordout(CDatabase *pdb1, CDatabase *pdb2, CString id, int year);
- BOOL CheckphonerecordExist(CDatabase *pdb1, CDatabase *pdb2, CString id);
- BOOL Transphonerecord(CDatabase *pdb1, CDatabase *pdb2, CString id, int year);
- BOOL CheckphonerecordoutExist(CDatabase *pdb1, CDatabase *pdb2, CString id);
- BOOL Transphonerecordout(CDatabase *pdb1, CDatabase *pdb2, CString id, int year);
- BOOL CheckunknownphonerecordExist(CDatabase *pdb1, CDatabase *pdb2, CString id);
- BOOL Transunknownphonerecord(CDatabase *pdb1, CDatabase *pdb2, CString id, int year);
- BOOL CheckunknownphonerecordoutExist(CDatabase *pdb1, CDatabase *pdb2, CString id);
- BOOL Transunknownphonerecordout(CDatabase *pdb1, CDatabase *pdb2, CString id, int year);
- BOOL CheckmisscallrecordExist(CDatabase *pdb1, CDatabase *pdb2, CString id);
- BOOL Transmisscallrecord(CDatabase *pdb1, CDatabase *pdb2, CString id, int year);
- BOOL TransSendReg(CDatabase *pdb1, CDatabase *pdb2, CString id, int year);
- CDatabase* GetDB(int year);
- void CheckYear(int year);
- void CheckHistoryData(CDatabase *pSrcdb=NULL, int nSrcYear=0, BOOL bMode2=0);
- void InitLia();
- bool m_bRunning; // Flag to whether thread is on running or not
- bool m_bTerminate; // Flag to Thread to be terminated
- unsigned int m_dwThreadID; // Thread ID
- HANDLE m_hThread; // Thread and Event handle
- bool m_bRunning2; // Flag to whether thread is on running or not
- bool m_bTerminate2; // Flag to Thread to be terminated
- unsigned int m_dwThreadID2; // Thread ID
- HANDLE m_hThread2; // Thread and Event handle
- bool m_bRunning3; // Flag to whether thread is on running or not
- bool m_bTerminate3; // Flag to Thread to be terminated
- unsigned int m_dwThreadID3; // Thread ID
- HANDLE m_hThread3; // Thread and Event handle
- BOOL TerminateThread();
- BOOL TerminateThread2();
-
- void LoadThumbImages();
- void RunTimer();
- void StopTimer();
- CDBServerDlg(CWnd* pParent = NULL); // standard constructor
- virtual ~CDBServerDlg();
-
- CTracePage m_TracePage;
- COnlineUsersPage m_OnlineUsersPage;
- CConfigurationPage m_ConfigurationPage;
- CStatisticsPage m_StatisticsPage;
- CSecurityPage m_SecurityPage;
- // Dialog Data
- enum { IDD = IDD_APPLICATION };
- CInfobarCtrl m_InfobarCtrl;
- CListCtrl m_OutlookBar;
- //}}AFX_DATA
- // ClassWizard generated virtual function overrides
- public:
- virtual BOOL PreTranslateMessage(MSG* pMsg);
- protected:
- virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
- //}}AFX_VIRTUAL
- // Implementation
- protected:
- char* FormatSize(DWORD dwSizeLow, DWORD dwSizeHigh);
- void SetOnlineLed(BOOL bOnline);
- void SetOfflineLed(BOOL bOffline);
- BOOL m_bInitialized;
- HICON m_hIcon;
- void SetupOutlookBar();
- CImageList m_ImageList;
- void MoveChilds();
- void ActivatePage(int nIndex);
- BOOL ServerStart();
- BOOL CreateStatusbar();
- CStatusBar m_wndStatusBar;
- CToolBar m_wndToolBar;
- // Generated message map functions
- virtual BOOL OnInitDialog();
- afx_msg void OnButton1();
- afx_msg void OnDestroy();
- afx_msg void OnServerStart();
- afx_msg void OnUpdateServerStart(CCmdUI* pCmdUI);
- afx_msg void OnServerStop();
- afx_msg void OnUpdateServerStop(CCmdUI* pCmdUI);
- afx_msg void OnServerExit();
- afx_msg void OnClickOutlookBar(NMHDR* pNMHDR, LRESULT* pResult);
- afx_msg void OnKeydownOutlookBar(NMHDR* pNMHDR, LRESULT* pResult);
- afx_msg void OnUserAccounts();
- afx_msg void OnClose();
- afx_msg void OnViewTrace();
- afx_msg void OnViewOnlineUsers();
- afx_msg void OnViewConfiguration();
- afx_msg void OnUpdateViewTrace(CCmdUI* pCmdUI);
- afx_msg void OnUpdateViewOnlineUsers(CCmdUI* pCmdUI);
- afx_msg void OnUpdateViewConfiguration(CCmdUI* pCmdUI);
- afx_msg void OnApply();
- afx_msg void OnViewStatistics();
- afx_msg void OnUpdateViewStatistics(CCmdUI* pCmdUI);
- afx_msg void OnViewSecurity();
- afx_msg void OnUpdateViewSecurity(CCmdUI* pCmdUI);
- afx_msg void OnAccountWizard();
- virtual void OnCancel();
- virtual void OnOK();
- afx_msg void OnTimer(UINT nIDEvent);
- afx_msg void OnOpen();
- afx_msg void OnExit();
- afx_msg void OnAutorun();
- //}}AFX_MSG
- LRESULT OnTrayNotification(WPARAM wParam,LPARAM lParam);
- LRESULT OnAbortClose(WPARAM wParam, LPARAM lParam);
- LRESULT OnFtpStatistic(WPARAM wParam, LPARAM lParam);
- DECLARE_MESSAGE_MAP()
- virtual void OnFTPUserConnected(DWORD nThreadID, LPCTSTR lpszUser, LPCSTR lpszAddress);
- virtual void OnFTPUserDisconnected(DWORD nThreadID, LPCTSTR lpszUser);
- virtual void OnFTPStatusChange(int nType, LPCTSTR lpszText);
- virtual void OnFTPReceivedBytesChange(int nBytes);
- virtual void OnFTPSentBytesChange(int nBytes);
- virtual void OnFTPStatisticChange(int nType, int nValue);
- };
- //{{AFX_INSERT_LOCATION}}
- // Microsoft Visual C++ will insert additional declarations immediately before the previous line.
- #endif // !defined(AFX_APPLICATIONDLG_H__D3E3BA87_EEFA_11D5_AB1C_00D0B70C3D79__INCLUDED_)
|