/[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 57 by torben, Tue Sep 12 17:48:20 2006 UTC revision 60 by torben, Mon Oct 22 13:00:14 2007 UTC
# Line 123  BOOL Ch6udlnssystemDlg::OnInitDialog() Line 123  BOOL Ch6udlnssystemDlg::OnInitDialog()
123                  return true;                  return true;
124          }          }
125    
126            DatabaseLayer *dbl = 0;
127          try {          try {
                 DatabaseLayer *dbl = 0;  
128                  if (config.driver.MakeLower() == "mysql")                  if (config.driver.MakeLower() == "mysql")
129                          dbl = new MySQLLayer(config);                          dbl = new MySQLLayer(config);
130                  else if (config.driver.MakeLower() == "postgresql")                  else if (config.driver.MakeLower() == "postgresql")
# Line 137  BOOL Ch6udlnssystemDlg::OnInitDialog() Line 137  BOOL Ch6udlnssystemDlg::OnInitDialog()
137                          MessageBox(tmp);                          MessageBox(tmp);
138                          OnOK();                          OnOK();
139                  }                  }
                 CommonStorage::Instance()->setDBLayer(dbl);  
140          } catch (CDBException *ex) {          } catch (CDBException *ex) {
141                  MessageBox(CString("Could not establish connection to the database server\r\n") +                  MessageBox(CString("Could not establish connection to the database server\r\n") +
142                                     "Please contact your network administrator\r\n\r\n" +                                     "Please contact your network administrator\r\n\r\n" +
# Line 150  BOOL Ch6udlnssystemDlg::OnInitDialog() Line 149  BOOL Ch6udlnssystemDlg::OnInitDialog()
149                  OnOK();                  OnOK();
150          }          }
151    
152            CommonStorage::Instance()->setDBLayer(dbl);
153    
154          CString title = "H6-Udlånssystem - ";          CString title = "H6-Udlånssystem - ";
155          title += config.driver;          title += config.driver;
156          SetWindowText(title);          SetWindowText(title);

Legend:
Removed from v.57  
changed lines
  Added in v.60

  ViewVC Help
Powered by ViewVC 1.1.20