Package org.blueoxygen.common.dal

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


                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();
                        role_id = rs.getString("role_id");
                    }
View Full Code Here


                    DbBean db = new DbBean();                       
                    db.connect();            

                    int id = 0;
                    String mySQL = "SELECT MAX(id) from pos";
                    ResultSet rs = db.execSQL(mySQL);                      
                    while (rs.next()) {
                       id = rs.getInt(1);
                    }            
                    g.drawString("No.",10,20);
                    g.drawString(String.valueOf(id),25,20);
View Full Code Here

                    g.drawString("No.",10,20);
                    g.drawString(String.valueOf(id),25,20);
                   
                    int x=5,y=35;
                    mySQL = "SELECT posId, name, quantity, price FROM product_pos a JOIN pos b on a.posId=b.id JOIN product c on c.code=a.productCode WHERE posId = '" + id + "'";
                    rs = db.execSQL(mySQL);
                    while (rs.next()) {
                        name = (rs.getString("name"));
                        qty = (rs.getInt("quantity"));                       
                        subtotal = qty * (rs.getDouble("price"));
                        total = total + subtotal;                        
View Full Code Here

            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");
                        price = Double.parseDouble(rs.getString("price"));
                    }
View Full Code Here

                    db.execute(mySQL);
                }

                int id = 0;
                mySQL = "SELECT MAX(id) from pos";
                ResultSet rs = db.execSQL(mySQL);                      
                while (rs.next()) {
                    id = rs.getInt(1);
                }                    

                int transId = 0;
View Full Code Here

                    id = rs.getInt(1);
                }                    

                int transId = 0;
                mySQL = "SELECT MAX(id) from pos_transaction";
                rs = db.execSQL(mySQL);                      
                while (rs.next()) {
                    transId = rs.getInt(1);
                }

                int a = model.getRowCount();
View Full Code Here

                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");
                    }
                    db.close();
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.