home *** CD-ROM | disk | FTP | other *** search
/ Tricks of the Windows Gam…ming Gurus (2nd Edition) / Disc2.iso / msdn_vcb / samples / vc98 / sdk / dbmsg / ado / employee / empbiz.h < prev    next >
Encoding:
C/C++ Source or Header  |  1997-11-18  |  1.2 KB  |  54 lines

  1. // EmpBiz.h : header file
  2. //
  3.  
  4. /////////////////////////////////////////////////////////////////////////////
  5. // CEmpBiz dialog
  6.  
  7. class CEmpBiz 
  8. {
  9. // Construction
  10. public:
  11.     CEmpBiz();    // standard constructor
  12.     ~CEmpBiz();
  13.  
  14. // Attributes
  15. public:
  16.     ADORecordset*    m_piEmpRecordSet;
  17.     BOOL            m_fConnected;
  18.     BOOL            m_fRecordsetEmpty;
  19.  
  20. protected:
  21.     ADOConnection*        m_piConnection;
  22.     COleVariant            m_varLastGoodRecord;
  23.  
  24. // Operations
  25. public:
  26.     BOOL    ConnectToDatabase(); //Opens a database 
  27.     long    GetEmployeeId(); 
  28.     CString GetFirstName(); 
  29.     CString GetLastName(); 
  30.     CString GetHomePhone() ;
  31.     CString GetTitle() ;
  32.     void    AddRecord() ;
  33.     void    DeleteRecord(); 
  34.     BOOL    MoveNext()     ;
  35.     BOOL    MovePrevious();       
  36.     BOOL    MoveFirst() ;
  37.     BOOL    MoveLast(); 
  38.     BOOL    FindForward(CString strCriteria) ;
  39.     void    ClearFilter(); 
  40.     BOOL    IsAddMode(); 
  41.     void    UpdateEmpRec(CString &strFirstName, 
  42.                         CString &strHomePhone, CString &strLastName,
  43.                         CString &strTitle);
  44.     void    CancelPendingAdd();
  45. };
  46.  
  47. void PopupErrorMessage(HRESULT hr);
  48.  
  49. #define EMP_EMPLOYEE_ID        L"EmployeeID"
  50. #define    EMP_LAST_NAME        L"LastName"
  51. #define    EMP_FIRST_NAME        L"FirstName"
  52. #define EMP_TITLE            L"Title"
  53. #define EMP_HOME_PHONE        L"HomePhone"
  54.