Package org.blueoxygen.common.dal

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


                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);

                //mySQL = "INSERT INTO pos_transaction (create_date) VALUES ('" + date + "')";
                //db.execute(mySQL);

                if(paymentType.getSelectedItem().equals("Cash")){
View Full Code Here


                //mySQL = "INSERT INTO pos_transaction (create_date) VALUES ('" + date + "')";
                //db.execute(mySQL);

                if(paymentType.getSelectedItem().equals("Cash")){
                    mySQL = "INSERT INTO pos_transaction(paymentType, totalPayment, totalReturn, create_date) VALUES('" + paymentType.getSelectedItem() + "'," + pay + "," + payReturn + ",'" + date + "')";
                    db.execute(mySQL);                           
                }else{
                    mySQL = "INSERT INTO pos_transaction(paymentType, name, creditCardNo, create_date) VALUES('" + paymentType.getSelectedItem() + "','" + txtName.getText() + "','" + txtNumber.getText() + "','" + date + "')";
                    db.execute(mySQL);
                }
View Full Code Here

                if(paymentType.getSelectedItem().equals("Cash")){
                    mySQL = "INSERT INTO pos_transaction(paymentType, totalPayment, totalReturn, create_date) VALUES('" + paymentType.getSelectedItem() + "'," + pay + "," + payReturn + ",'" + date + "')";
                    db.execute(mySQL);                           
                }else{
                    mySQL = "INSERT INTO pos_transaction(paymentType, name, creditCardNo, create_date) VALUES('" + paymentType.getSelectedItem() + "','" + txtName.getText() + "','" + txtNumber.getText() + "','" + date + "')";
                    db.execute(mySQL);
                }

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

                }

                int a = model.getRowCount();
                for(int i=0 ; i<a ; i++){
                    mySQL = "INSERT INTO product_pos (posId, Quantity, productCode, pos_transId) VALUES (" + id + "," + model.getValueAt(i,3) + ",'" + model.getValueAt(i,0) + "'," + transId + ")";
                    db.execute(mySQL);                       
                }                           

                db.close();
            } catch (SQLException e) {     
                e.printStackTrace();
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.