/[H6]/DatabaseLayer.cpp
ViewVC logotype

Diff of /DatabaseLayer.cpp

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

revision 27 by torben, Sun Sep 3 09:14:24 2006 UTC revision 36 by torben, Mon Sep 4 08:53:10 2006 UTC
# Line 1  Line 1 
1    /*
2     * Primary developers: Hedin & Kevin
3     */
4    
5  #include "StdAfx.h"  #include "StdAfx.h"
6  #include ".\databaselayer.h"  #include ".\databaselayer.h"
# Line 351  void DatabaseLayer::FillEquipmentVector( Line 353  void DatabaseLayer::FillEquipmentVector(
353                  }                  }
354          }          }
355  }  }
356    //Developed by Torben H. Nielsen
357  void DatabaseLayer::checkReservations(CString barcode)  void DatabaseLayer::checkReservations(CString barcode)
358  {  {
359          CString scount,status;          CString scount,status;
# Line 371  void DatabaseLayer::checkReservations(CS Line 373  void DatabaseLayer::checkReservations(CS
373          }          }
374          rs.Close();          rs.Close();
375    
376            if (reservationCount > 0 && status == "3") {//equipment is available and has at lease one reservation
         if (reservationCount > 0 && status == 3) {//equipment is available and has at lease one reservation  
377                  SQL = "UPDATE Udstyr SET Status = 2 WHERE Stregkode = '" + barcode + "'";                  SQL = "UPDATE Udstyr SET Status = 2 WHERE Stregkode = '" + barcode + "'";
378                  db.ExecuteSQL(SQL);                  db.ExecuteSQL(SQL);
379          }          }
380  }  }
381    
382    //Developed by Torben H. Nielsen
383  bool DatabaseLayer::DeleteReservation(CString barcode, CString resid)  bool DatabaseLayer::DeleteReservation(CString barcode, CString resid)
384  {  {
385          CString SQL = "DELETE FROM Resevation WHERE resevationid = " + resid;          CString SQL = "DELETE FROM Resevation WHERE resevationid = " + resid;

Legend:
Removed from v.27  
changed lines
  Added in v.36

  ViewVC Help
Powered by ViewVC 1.1.20