/[H6]/h6-udlånssystemDlg.cpp
ViewVC logotype

Diff of /h6-udlånssystemDlg.cpp

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 9 by torben, Wed Aug 30 21:57:57 2006 UTC revision 41 by torben, Tue Sep 5 12:50:38 2006 UTC
# Line 1  Line 1 
1  // h6-udlånssystemDlg.cpp : implementation file  /*
2  //   * Developed by Torben H. Nielsen
3     */
4    
5    
6  #include "stdafx.h"  #include "stdafx.h"
7  #include "h6-udlånssystem.h"  #include "h6-udlånssystem.h"
# Line 8  Line 10 
10    
11  #include "commonstorage.h"  #include "commonstorage.h"
12  #include "databaselayer.h"  #include "databaselayer.h"
13    #include "microsoftdblayer.h"
14    #include "mysqllayer.h"
15    
16  #ifdef _DEBUG  #ifdef _DEBUG
17  #define new DEBUG_NEW  #define new DEBUG_NEW
# Line 76  END_MESSAGE_MAP() Line 80  END_MESSAGE_MAP()
80  BOOL Ch6udlnssystemDlg::OnInitDialog()  BOOL Ch6udlnssystemDlg::OnInitDialog()
81  {  {
82          CDialog::OnInitDialog();          CDialog::OnInitDialog();
83            CWaitCursor wait;
84    
85          // Add "About..." menu item to system menu.          // Add "About..." menu item to system menu.
86    
# Line 107  BOOL Ch6udlnssystemDlg::OnInitDialog() Line 112  BOOL Ch6udlnssystemDlg::OnInitDialog()
112          m_tabs.SetCurSel(0);          m_tabs.SetCurSel(0);
113    
114    
115          DatabaseLayer *dbl = new DatabaseLayer;          try {
116          CommonStorage::Instance()->setDBLayer(dbl);                  //DatabaseLayer *dbl = new DatabaseLayer;
117                    DatabaseLayer *dbl = new MySQLLayer;
118                    CommonStorage::Instance()->setDBLayer(dbl);
119            } catch (...) {
120                    MessageBox(CString("Could not establish connection to the database server\r\n") +
121                                       "Please contact your network administrator\r\n" +
122                                       "(This application shuts down automatically)");
123                    OnOK();
124            }
125    
126    
127          // TODO: Add extra initialization here          // TODO: Add extra initialization here
# Line 167  HCURSOR Ch6udlnssystemDlg::OnQueryDragIc Line 180  HCURSOR Ch6udlnssystemDlg::OnQueryDragIc
180    
181  void Ch6udlnssystemDlg::OnHelpAbout()  void Ch6udlnssystemDlg::OnHelpAbout()
182  {  {
183          MessageBox("DA6H :: Udlånssystem\r\nLavet af:\r\nKevin, Hedin & Torben");          CAboutDlg about;
184            about.DoModal();
185  }  }
186    
187  void Ch6udlnssystemDlg::OnFileExit()  void Ch6udlnssystemDlg::OnFileExit()

Legend:
Removed from v.9  
changed lines
  Added in v.41

  ViewVC Help
Powered by ViewVC 1.1.20