MainTable.h 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. #if !defined(AFX_MAINTABLE_H__F5CFB0A6_A6E1_4C55_A685_AB5F1A0FCF53__INCLUDED_)
  2. #define AFX_MAINTABLE_H__F5CFB0A6_A6E1_4C55_A685_AB5F1A0FCF53__INCLUDED_
  3. #if _MSC_VER > 1000
  4. #pragma once
  5. #endif // _MSC_VER > 1000
  6. #include "ArrayEx.h"
  7. #include "Misc.h"
  8. class CMainTable : public CDaoRecordset
  9. {
  10. public:
  11. CMainTable(CDaoDatabase* pDatabase = NULL);
  12. DECLARE_DYNAMIC(CMainTable)
  13. // Field/Param Data
  14. //{{AFX_FIELD(CMainTable, CDaoRecordset)
  15. long m_lID;
  16. long m_lDate;
  17. CString m_strText;
  18. long m_lShortCut;
  19. long m_lDontAutoDelete;
  20. long m_lTotalCopySize;
  21. BOOL m_bIsGroup;
  22. long m_lParentID;
  23. double m_dOrder;
  24. long m_lDataID;
  25. //}}AFX_FIELD
  26. // Overrides
  27. // ClassWizard generated virtual function overrides
  28. //{{AFX_VIRTUAL(CMainTable)
  29. public:
  30. virtual CString GetDefaultDBName(); // Default database name
  31. virtual CString GetDefaultSQL(); // Default SQL for Recordset
  32. virtual void DoFieldExchange(CDaoFieldExchange* pFX); // RFX support
  33. virtual void Open(int nOpenType = AFX_DAO_USE_DEFAULT_TYPE, LPCTSTR lpszSql = NULL, int nOptions = 0);
  34. virtual void Requery();
  35. //}}AFX_VIRTUAL
  36. public:
  37. CString GetDisplayText();
  38. void AddNew(); // assigns the new autoincr ID to m_lID
  39. void OnQuery();
  40. int m_nFieldCount;
  41. bool m_bBindFields;
  42. bool SetBindFields(bool bVal);
  43. // long GetID();
  44. // int m_nCurPos;
  45. // long m_lCurID; // used to validate m_nCurPos
  46. // copies the current source record to this current record
  47. void CopyRec( CMainTable& source );
  48. // makes a new copy of the current record and moves to the copy record
  49. void NewCopyRec();
  50. // ONLY deletes from Main
  51. static BOOL DeleteAll();
  52. static void LoadAcceleratorKeys( CAccels& accels );
  53. void Open(LPCTSTR lpszFormat,...);
  54. // Implementation
  55. #ifdef _DEBUG
  56. virtual void AssertValid() const;
  57. virtual void Dump(CDumpContext& dc) const;
  58. #endif
  59. };
  60. //{{AFX_INSERT_LOCATION}}
  61. // Microsoft Visual C++ will insert additional declarations immediately before the previous line.
  62. #endif // !defined(AFX_MAINTABLE_H__F5CFB0A6_A6E1_4C55_A685_AB5F1A0FCF53__INCLUDED_)