Package org.blueoxygen.common.dal

Examples of org.blueoxygen.common.dal.DbBean.connect()


                role_id="";
                pass="";
                char password[] = new char[100];
                try {
                    DbBean db = new DbBean();
                    db.connect();
                    String mySQL = "SELECT * FROM backend_user WHERE username like '" + lpLogin.getUserName() + "'";
                    ResultSet rs = db.execSQL(mySQL);
                    StringUtils stringutils = new StringUtils();
                    while (rs.next()) {
                        password = (stringutils.decodeBase64(rs.getString("password"))).toCharArray();
View Full Code Here


            date = cal.get(Calendar.DATE) + "-" + (cal.get(Calendar.MONTH) + 1) + "-" + cal.get(Calendar.YEAR;           
            g.setFont(theFont);
            g.drawString("Postila",80,10);
            try{                                  
                    DbBean db = new DbBean();                       
                    db.connect();            

                    int id = 0;
                    String mySQL = "SELECT MAX(id) from pos";
                    ResultSet rs = db.execSQL(mySQL);                      
                    while (rs.next()) {
View Full Code Here

        if(!txtCode.getText().equalsIgnoreCase("")){
            String code = "";
            if(evt.getKeyCode()=='\n'){
                try {
                    DbBean db = new DbBean();
                    db.connect();
                    String mySQL = "SELECT * FROM items WHERE itemsCode like '" + txtCode.getText() + "'";
                    ResultSet rs = db.execSQL(mySQL);
                    while (rs.next()) {
                        lblName.setText(rs.getString("itemsName"));
                        code = rs.getString("itemsCode");
View Full Code Here

    private void jPrintActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jPrintActionPerformed
        if(!txtReturn.getText().equalsIgnoreCase("") || !txtNumber.getText().equalsIgnoreCase("")){
            try {
                DbBean db = new DbBean();     
                db.connect();
                String date = "";
                Calendar cal = new GregorianCalendar();
                date =cal.get(Calendar.YEAR) + "-" + (cal.get(Calendar.MONTH) + 1) + "-" + cal.get(Calendar.DATE;
                String mySQL = "INSERT INTO pos (create_date, pembulatan) VALUES ('" + date + "','" + pembulatan + "')";
                db.execute(mySQL);
View Full Code Here

            public boolean authenticate(String string, char[] c, String string0) throws Exception {
                StringUtils stringutils = new StringUtils();
                char password[] = new char[100];
                try {
                    DbBean db = new DbBean();
                    db.connect();
                    String mySQL = "SELECT * FROM backend_user WHERE username = '"+string+"'";
                    ResultSet rs = db.execSQL(mySQL);
                    while (rs.next()) {
                        password = (stringutils.decodeBase64(rs.getString("password"))).toCharArray();
                        user_id = rs.getString("id");
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.