Package com.zesped.model

Examples of com.zesped.model.CustomerAccount.save()


            cacc.put("address_billing",getAddress());
            cacc.put("postcode_billing",getPostcode());
            cacc.put("city_billing",getCity());
            cacc.put("state_billing",getState());
            cacc.put("country_billing",getCountry());
            cacc.save(oSes);
            oSes.commit();
     
            order = cacc.createOrder(oSes);
            order.put("user_id", getSessionAttribute("user_docid"));
            order.put("credits_bought", selectedProduct.getCredits());
View Full Code Here


                Long oCreditsLeft = new Long(cacc.getBigDecimal("credits_left").longValue());
                if (null == oCreditsLeft) {
                    oCreditsLeft = new Long(0l);
                }
                cacc.put("credits_left", new Long(oCreditsLeft.longValue() + selectedProduct.getCredits().longValue()));
                cacc.save(oSes);
        commit();
       
                Log.out.info("Added " + selectedProduct.getCredits().toString() + " credits to customer " + getSessionAttribute("customer_acount"));
                DAO.log(oSes, cacc.getDocument(), CustomerAccount.class, "UPDATE CREDITS", AtrilEvent.Level.INFO, cacc.getDocument().id() + ";" + cacc.get("credits_left"));
View Full Code Here

          BigDecimal oCredits = oSrvFlv.credits();
        oSes = DAO.getAdminSession("CreditBurner");
        oSes.autoCommit(false);
        CustomerAccount oAcc = new CustomerAccount(oSes.getDms(), sCustAcc);
        oAcc.burnCredits(oSes, oCredits);
        oAcc.save(oSes);
        DAO.log(oSes, oAcc.getDocument(), CustomerAccount.class, "BURN CREDITS", AtrilEvent.Level.INFO, oCredits.toString()+";"+oSrvFlv.uid()+";"+sUser);
        switch (oAcc.getCreditsLeft().signum()) {
          case 0:
              DAO.log(oSes, oAcc.getDocument(), CustomerAccount.class, "NO CREDITS LEFT", AtrilEvent.Level.WARNING, "0;"+oSrvFlv.uid()+";"+sUser);
              break;
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.