{. err.println ( Error in Shift Set ) ;. printStackTrace ();
}
}
//======================================== ==================== void updateShift (int IDShift, int Shift, String TimeOn, String TimeOff, int IDDriver)
{conn=null; .sql.Statement S=null; result=null; rs=null;
sql=new StringBuffer () ;. append ( call S_Update(raquo;);.append(IDShift);.append(laquo;,raquo;);.append(Shift);.append(laquo;,raquo;);.append(laquo;laquo;raquo;);.append(TimeOn);.append(laquo;raquo;raquo;);.append(laquo;,raquo;);.append(laquo;laquo;raquo;);.append(TimeOff);.append(laquo;raquo;raquo;);.append(laquo;,raquo;);.append(IDDriver);.append(laquo;);raquo;);
{. forName ( com.mysql.jdbc.Driver ). newInstance ();=DriverManager.getConnection (DB_HOST, DB_USER, DB_PASSWORD);=conn.createStatement ();
. out.println (sql);
=S.executeQuery (sql.toString ());=result.getMetaData ();
. out.println ( Database connection established ) ;. close ();
} catch (Exception e)
{. err.println ( Error in Shift Set ) ;. printStackTrace ();
}
}
//======================================== ==================== void userSet (String FName, String LName, String MName, String Login, String Password, int Level)
{conn=null; .sql.Statement S=null; result=null; rs=null;
sql=new StringBuffer () ;. append ( call U_Set(raquo;);.append(laquo;laquo;raquo;);.append(FName);.append(laquo;raquo;raquo;);.append(laquo;,raquo;);.append(laquo;laquo;raquo;);.append(LName);.append(laquo;raquo;raquo;);.append(laquo;,raquo;);.append(laquo;laquo;raquo;);.append(MName);.append(laquo;raquo;raquo;);.append(laquo;,raquo;);.append(laquo;laquo;raquo;);.append(Login);.append(laquo;raquo;raquo;);.append(laquo;,raquo;);.append(laquo;laquo;raquo;);.append(Password);.append(laquo;raquo;raquo;);.append(laquo;,raquo;);.append(Level);.append(laquo;);raquo;);
{. forName ( com.mysql.jdbc.Driver ). newInstance ();=DriverManager.getConnection (DB_HOST, DB_USER, DB_PASSWORD);=conn.createStatement ();
. out.println (sql);
=S.executeQuery (sql.toString ());=result.getMetaData ();
. out.println ( Database connection established ) ;. close ();
} catch (Exception e)
{. err.println ( Error in User Set ) ;. printStackTrace ();
}
}
//======================================== ==================== void updateUser (int IDUser, String FName, String LName, String MName, String Login, String Password, int Level)
{conn=null; .sql.Statement S=null; result=null; rs=null;
sql=new StringBuffer () ;. append ( call U_Update(raquo;);.append(IDUser);.append(laquo;,raquo;);.append(laquo;laquo;raquo;);.append(FName);.append(laquo;raquo;raquo;);.append(laquo;,raquo;);.append(laquo;laquo;raquo;);.append(LName);.append(laquo;raquo;raquo;);.append(laquo;,raquo;);.append(laquo;laquo;raquo;);.append(MName);.append(laquo;raquo;raquo;);.append(laquo;,raquo;);.append(laquo;laquo;raquo;);.append(Login);.append(laquo;raquo;raquo;);.append(laquo;,raquo;);.append(laquo;laquo;raquo;);.append(Password);.append(laquo;raquo;raquo;);.append(laquo;,raquo;);.append(Level);.append(laquo;);raquo;);
{. forName ( com.mysql.jdbc.Driver ). newInstance ();=DriverManager.getConnection (DB_HOST, DB_USER, DB_PASSWORD);=conn.createStatement ();
. out.println (sql);
=S.executeQuery (sql.toString ());=result.getMetaData ();
. out.println ( Database connection established ) ;. close ();
} catch (Exception e)
{. err.println ( Error in User Set ) ;. printStackTrace ();
}
}
//======================================== ==================== boolean DeleteCar (int idCar)
{conn=null; .sql.Statement S=null; result=null; rs=null; resQuery=false; sql=new StringBuffer () ;. append ( call C_Del ( ) ;. append (idCar) ;. append (); );
{. forName ( com.mysql.jdbc.Driver ). newInstance ();=DriverManager.getConnection (DB_HOST, DB_USER, DB_PASSWORD);=conn.createStatement ();
. out.println (sql);
=S.executeQuery (sql.toString ());=result.getMetaData ();
. out.println ( Database connection established ) ;. close ();=true;
...