ion established ) ;. close ();
} (Exception e)
{. err.println ( Can not connect to database server ) ;. printStackTrace ();
} list;
}
//============================================================ArrayListlt;DS_Shiftgt; selectShifts ()
{conn=null; .sql.Statement S; result=null; rs=null; lt; DS_Shift gt; list=new ArrayList lt; DS_Shift gt; (); _ Shift ds;
{. forName ( com.mysql.jdbc.Driver ). newInstance ();=DriverManager.getConnection (DB_HOST, DB_USER, DB_PASSWORD);=conn.createStatement ();
queryStr= call S_Select () raquo ;;=S.executeQuery (queryStr);=result.getMetaData ();
(result.next ())
{= _ds.new DS_Shift () ;. fname=result.getString ( FName ) ;. mname=result.getString ( MName ) ;. lname=result.getString ( LName ) ;. shiftNum=result.getInt ( shift_nom ) ;. idShift=result.getInt ( count ) ;. timeOn=result.getTime ( TimeOn ) ;. timeOff=result. getTime ( TimeOff ) ;. add (ds);
}
. out.println ( Database connection established ) ;. close ();
} (Exception e)
{. err.println ( Can not connect to database server ) ;. printStackTrace ();
} list;
}
//============================================================ArrayListlt;DS_Rategt; selectRates ()
{conn=null; .sql.Statement S; result=null; rs=null; lt; DS_Rate gt; list=new ArrayList lt; DS_Rate gt; (); _ Rate ds;
{. forName ( com.mysql.jdbc.Driver ). newInstance ();=DriverManager.getConnection (DB_HOST, DB_USER, DB_PASSWORD);=conn.createStatement ();
queryStr= call R_Select () raquo ;;=S.executeQuery (queryStr);=result.getMetaData ();
(result.next ())
{= _ds.new DS_Rate () ;. idRate=result.getInt ( count ) ;. tariff=result.getInt ( tariff ) ;. dateOn=result.getDate ( DateOn ) ;. dateOff=result.getDate ( DateOff ) ;. add (ds);
}
. out.println ( Database connection established ) ;. close ();
} (Exception e)
{. err.println ( Can not connect to database server ) ;. printStackTrace ();
} list;
}
//============================================================ArrayListlt;DS_Usergt; selectUsers ()
{conn=null; .sql.Statement S; result=null; rs=null; lt; DS_User gt; list=new ArrayList lt; DS_User gt; (); _ User ds;
{. forName ( com.mysql.jdbc.Driver ). newInstance ();=DriverManager.getConnection (DB_HOST, DB_USER, DB_PASSWORD);=conn.createStatement ();
queryStr= call U_Select () raquo ;;=S.executeQuery (queryStr);=result.getMetaData ();
(result.next ())
{= _ds.new DS_User () ;. fname=result.getString ( FName ) ;. mname=result.getString ( MName ) ;. lname=result.getString ( LName ) ;. login=result.getString ( login ) ;. password=result.getString ( password ) ;. level=result.getInt ( level ) ;. idUser=result. getInt ( id_user ) ;. add (ds);
}
. out.println ( Database connection established ) ;. close ();
} (Exception e)
{. err.println ( Can not connect to database server ) ;. printStackTrace ();
} list;
}
//======================================== ==================== void setClient (String FName, String LName, String MName, String Telephone, String Addres, int Count)
{conn=null; .sql.Statement S=null; result=null; rs=null;
sql=new StringBuffer () ;. append ( call CL_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(Telephone);.append(laquo;raquo;raquo;);.append(laquo;,raquo;);.append(laquo;laquo;raquo;);.append(Addres);.append(laquo;raquo;raquo;);.append(laquo;,raquo;);.append(Count);.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.to...