teQuery (queryStr);=result.getMetaData ();
. out.println ( Database connection established ) ;. close ();
} (Exception e)
{. err.println ( Can not connect to database server ) ;. printStackTrace ();
}
}
//======================================== ==================== void setOnline (int numShift)
{conn=null; .sql.Statement S; result=null; rs=null;
{. forName ( com.mysql.jdbc.Driver ). newInstance ();=DriverManager.getConnection (DB_HOST, DB_USER, DB_PASSWORD);=conn.createStatement ();
sql=new StringBuffer () ;. append ( call DR_SetOnline () ;. append (numShift) ;. append () );=S.executeQuery (sql. toString ());=result.getMetaData ();
. out.println ( Database connection established ) ;. close ();
} (Exception e)
{. err.println ( Can not connect to database server ) ;. printStackTrace ();
}
}
//============================================================ArrayListlt;DS_Drivergt; selectDrivers ()
{conn=null; .sql.Statement S; result=null; rs=null; lt; DS_Driver gt; list=new ArrayList lt; DS_Driver gt; (); _ Driver ds;
{. forName ( com.mysql.jdbc.Driver ). newInstance ();=DriverManager.getConnection (DB_HOST, DB_USER, DB_PASSWORD);=conn.createStatement ();
queryStr= call DR_Select () raquo ;;=S.executeQuery (queryStr);=result.getMetaData ();
(result.next ())
{= _ds.new DS_Driver () ;. fname=result.getString ( FName ) ;. mname=result.getString ( MName ) ;. lname=result.getString ( LName ) ;. phone=result.getString ( telephone ) ;. addres=result.getString ( addres ) ;. isBusy=result.getInt ( isbysy ) ;. online=result. getInt ( online ) ;. idDriver=result.getInt ( id_driver ) ;. add (ds);
}
. out.println ( Database connection established ) ;. close ();
} (Exception e)
{. err.println ( Can not connect to database server ) ;. printStackTrace ();
} list;
}
//============================================================ArrayListlt;DS_Drivergt; comboSelectDrivers ()
{conn=null; .sql.Statement S; result=null; rs=null; lt; DS_Driver gt; list=new ArrayList lt; DS_Driver gt; (); _ Driver ds;
{. forName ( com.mysql.jdbc.Driver ). newInstance ();=DriverManager.getConnection (DB_HOST, DB_USER, DB_PASSWORD);=conn.createStatement ();
queryStr= call ComboSelectDriver () raquo ;;=S.executeQuery (queryStr);=result.getMetaData ();
(result.next ())
{= _ds.new DS_Driver () ;. fname=result.getString ( FName ) ;. mname=result.getString ( MName ) ;. lname=result.getString ( LName ) ;. idDriver=result.getInt ( id_driver ) ;. add (ds);
}
. out.println ( Database connection established ) ;. close ();
} (Exception e)
{. err.println ( Can not connect to database server ) ;. printStackTrace ();
} list;
}
//============================================================ArrayListlt;DS_Clientgt; selectClient ()
{conn=null; .sql.Statement S; result=null; rs=null; lt; DS_Client gt; list=new ArrayList lt; DS_Client gt; (); _ Client ds;
{. forName ( com.mysql.jdbc.Driver ). newInstance ();=DriverManager.getConnection (DB_HOST, DB_USER, DB_PASSWORD);=conn.createStatement ();
queryStr= call Cl_Select () raquo ;;=S.executeQuery (queryStr);=result.getMetaData ();
(result.next ())
{= _ds.new DS_Client () ;. fname=result.getString ( FName ) ;. mname=result.getString ( MName ) ;. lname=result.getString ( LName ) ;. phone=result.getString ( telephone ) ;. addres=result.getString ( addres ) ;. count=result.getInt ( count ) ;. idClient=result. getInt ( id_client ) ;. add (ds);
}
. out.println ( Database connection established ) ;. close ();
} (Exception e)
{. err.println ( Can not connect to database server ) ;. printStackTrace ();
} list;
}
//============================================================ArrayListlt;DS_Clien...