Package org.jallinone.sales.discounts.java

Examples of org.jallinone.sales.discounts.java.CustomerDiscountVO


    /**
     * Callback method invoked when the user has clicked on the insert button
     * @param valueObject empty value object just created: the user can manage it to fill some attribute values
     */
    public void createValueObject(ValueObject valueObject) throws Exception {
      CustomerDiscountVO vo = (CustomerDiscountVO)valueObject;
      Subject customerVO = (Subject)frame.getCurrentForm().getVOModel().getValueObject();
      vo.setCompanyCodeSys01SAL03(customerVO.getCompanyCodeSys01REG04());
      Response res =  ClientUtils.getData("loadCompany",vo.getCompanyCodeSys01SAL03());
      if (!res.isError()) {
        OrganizationVO compVO = (OrganizationVO)((VOResponse)res).getVo();
        if (compVO.getCurrencyCodeReg03()!=null && !compVO.getCurrencyCodeReg03().equals("")) {
          vo.setCurrencyCodeReg03SAL03(compVO.getCurrencyCodeReg03());
          frame.getColCurrencyCode().forceValidate(frame.getDiscountsGrid().getSelectedRow()==-1?0:frame.getDiscountsGrid().getSelectedRow());
        }
      }
    }
View Full Code Here


   * @param rowNumbers row indexes related to the new rows to save
   * @param newValueObjects list of new value objects to save
   * @return an ErrorResponse value object in case of errors, VOListResponse if the operation is successfully completed
   */
  public Response insertRecords(int[] rowNumbers, ArrayList newValueObjects) throws Exception {
    CustomerDiscountVO vo = null;
    Response response = null;
    Subject customerVO = (Subject)frame.getCurrentForm().getVOModel().getValueObject();

    for(int i=0;i<newValueObjects.size();i++) {
      vo = (CustomerDiscountVO) newValueObjects.get(i);
      response = validateDiscount(vo);
      if (response.isError())
        return response;
      vo.setCompanyCodeSys01SAL03(customerVO.getCompanyCodeSys01REG04());
      vo.setProgressiveReg04SAL08(customerVO.getProgressiveREG04());
    }

    response = ClientUtils.getData("insertCustomerDiscounts",newValueObjects);
    return response;
  }
View Full Code Here

   * @param persistentObjects value objects relatied to the changed rows
   * @return an ErrorResponse value object in case of errors, VOListResponse if the operation is successfully completed
   */
  public Response updateRecords(int[] rowNumbers,ArrayList oldPersistentObjects,ArrayList persistentObjects) throws Exception {
    Response response = null;
    CustomerDiscountVO vo = null;
    for(int i=0;i<persistentObjects.size();i++) {
      vo = (CustomerDiscountVO)persistentObjects.get(i);
      response = validateDiscount(vo);
      if (response.isError())
        return response;
View Full Code Here

TOP

Related Classes of org.jallinone.sales.discounts.java.CustomerDiscountVO

Copyright © 2018 www.massapicom. 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.