/** * Move this product cost from to virtual fields to the ProductCost * field in recProduct. Also move the status to the product cost status. * (Override this to set the correct fields!). */ public void setupScreenStatus(Record recProduct, int iStatus) { recProduct.getField(Product.DISPLAY_INVENTORY_STATUS_ID).setValue(iStatus); }
/** * Called when a valid record is read from the table/query. * @param bDisplayOption If true, display any changes. */ public void doValidRecord(boolean bDisplayOption) { super.doValidRecord(bDisplayOption); m_iLastCheckNo++; m_fldCount.setValue(m_iLastCheckNo); } /**
/** * Move this product cost from to virtual fields to the ProductCost * field in recProduct. Also move the status to the product cost status. * (Override this to set the correct fields!). */ public void setupScreenStatus(Record recProduct, int iStatus) { recProduct.getField(Product.DISPLAY_INVENTORY_STATUS_ID).setValue(iStatus); }
/** * User pressed a header button; change the key value to match (and reorder). */ public void clickColumn(int iIndex) { this.getOwner().setValue(iIndex - m_gridScreen.getNavCount()); // Set the grid value (will call this listener if change) } /**
/** * User pressed a header button; change the key value to match (and reorder). */ public void clickColumn(int iIndex) { this.getOwner().setValue(iIndex - m_gridScreen.getNavCount()); // Set the grid value (will call this listener if change) } /**
/** * Zero this part of the transaction. */ public boolean onVoidTrx() { this.getField(BankTrx.AMOUNT).setValue(0); return super.onVoidTrx(); } /**
/** * User pressed a header button; change the key value to match (and reorder). */ public void clickColumn(int iIndex) { this.getOwner().setValue(iIndex - m_gridScreen.getNavCount()); // Set the grid value (will call this listener if change) } /**
/** * SetMainStatus Method. */ public void setMainStatus(int iMainStatus) { RecordOwner screen = this.getOwner().getRecordOwner(); if (screen != null) { Record recBooking = (Record)screen.getRecord(Booking.BOOKING_FILE); if (recBooking != null) recBooking.getField(Booking.PRICING_STATUS_ID).setValue(iMainStatus); } }
/** * SetMainStatus Method. */ public void setMainStatus(int iMainStatus) { RecordOwner screen = this.getOwner().getRecordOwner(); if (screen != null) { Record recBooking = (Record)screen.getRecord(Booking.BOOKING_FILE); if (recBooking != null) recBooking.getField(Booking.PRICING_STATUS_ID).setValue(iMainStatus); } }
/** * MarkupPriceFromCost Method. */ public void markupPriceFromCost(double dMarkup, boolean bMarkupOnlyIfNoPrice) { if ((!bMarkupOnlyIfNoPrice) || (this.getField(Product.PRODUCT_PRICE_LOCAL).getValue() == 0)) { if (dMarkup == 0.00) this.getField(Product.PRODUCT_PRICE_LOCAL).setData(null); else this.getField(Product.PRODUCT_PRICE_LOCAL).setValue(Math.floor(this.getField(Product.PRODUCT_COST_LOCAL).getValue() * (1 + dMarkup) * 100 + 0.5) / 100); } }
/** * MarkupPriceFromCost Method. */ public void markupPriceFromCost(double dMarkup, boolean bMarkupOnlyIfNoPrice) { if ((!bMarkupOnlyIfNoPrice) || (this.getField(Product.PRODUCT_PRICE_LOCAL).getValue() == 0)) { if (dMarkup == 0.00) this.getField(Product.PRODUCT_PRICE_LOCAL).setData(null); else this.getField(Product.PRODUCT_PRICE_LOCAL).setValue(Math.floor(this.getField(Product.PRODUCT_COST_LOCAL).getValue() * (1 + dMarkup) * 100 + 0.5) / 100); } }
/** * DoEndKey Method. */ public void doEndKey() { this.getOwner().getField(LandPricing.CLASS_ID).setValue(m_iSicPmc); this.getOwner().getField(LandPricing.CLASS_ID).setModified(true); super.doEndKey(); // This is the starting key, set the initial position } /**
/** * DoEndKey Method. */ public void doEndKey() { this.getOwner().getField(LandPricing.CLASS_ID).setValue(m_iSicPmc); this.getOwner().getField(LandPricing.CLASS_ID).setModified(true); super.doEndKey(); // This is the starting key, set the initial position } /**
/** * DoNewRecord Method. */ public void doNewRecord(boolean bDisplayOption) { super.doNewRecord(bDisplayOption); BaseField fldTarget = this.getOwner().getField(m_iTypeField); boolean[] rgbEnabled = fldTarget.setEnableListeners(false); InitOnceFieldHandler listener = (InitOnceFieldHandler)fldTarget.getListener(InitOnceFieldHandler.class.getName()); if (listener != null) listener.setFirstTime(true); // Special case - you shouldn't have put this listener here, but since you did... fldTarget.setValue(m_iTargetValue, DBConstants.DISPLAY, DBConstants.INIT_MOVE); fldTarget.setModified(false); fldTarget.setEnableListeners(rgbEnabled); } /**
/** * DoInitialKey Method. */ public void doInitialKey() { this.getOwner().getField(LandPricing.CLASS_ID).setValue(m_iSicPmc); this.getOwner().getField(LandPricing.CLASS_ID).setModified(true); ((DateTimeField)this.getOwner().getField(LandPricing.END_DATE)).setDate(m_dateTarget, DBConstants.DISPLAY, DBConstants.SCREEN_MOVE); this.getOwner().getField(LandPricing.END_DATE).setModified(true); this.getOwner().getField(LandPricing.TO_PAX).setValue(m_sTargetPax); this.getOwner().getField(LandPricing.TO_PAX).setModified(true); super.doInitialKey(); // This is the starting key, set the initial position } /**
/** * DoInitialKey Method. */ public void doInitialKey() { this.getOwner().getField(LandPricing.CLASS_ID).setValue(m_iSicPmc); this.getOwner().getField(LandPricing.CLASS_ID).setModified(true); ((DateTimeField)this.getOwner().getField(LandPricing.END_DATE)).setDate(m_dateTarget, DBConstants.DISPLAY, DBConstants.SCREEN_MOVE); this.getOwner().getField(LandPricing.END_DATE).setModified(true); this.getOwner().getField(LandPricing.TO_PAX).setValue(m_sTargetPax); this.getOwner().getField(LandPricing.TO_PAX).setModified(true); super.doInitialKey(); // This is the starting key, set the initial position } /**
public Object doGetData() { double dStartBalance = this.getOwner().getRecord().getField(GenledScreenRecord.START_BALANCE).getValue(); double dChangeBalance = this.getOwner().getRecord().getField(GenledScreenRecord.CHANGE_BALANCE).getValue(); this.getOwner().setValue(dStartBalance + dChangeBalance); return super.doGetData(); } });
/** * FieldChanged Method. */ public int fieldChanged(boolean bDisplayOption, int iMoveMode) { double dGross = this.getOwner().getRecord().getField(Mco.GROSS).getValue(); double dCommAmt = this.getOwner().getRecord().getField(Mco.COMM_AMT).getValue(); double dSvcAmt = this.getOwner().getRecord().getField(Mco.SVC_AMT).getValue(); double dTaxAmt = this.getOwner().getRecord().getField(Mco.TAX_AMT).getValue(); double dNet = Math.floor((dGross - dCommAmt - dSvcAmt - dTaxAmt) * 100.00 + 0.5) / 100.00; this.getOwner().getRecord().getField(Mco.NET).setValue(dNet); return super.fieldChanged(bDisplayOption, iMoveMode); }
/** * FieldChanged Method. */ public int fieldChanged(boolean bDisplayOption, int iMoveMode) { double dGross = this.getOwner().getRecord().getField(Mco.GROSS).getValue(); double dCommAmt = this.getOwner().getRecord().getField(Mco.COMM_AMT).getValue(); double dSvcAmt = this.getOwner().getRecord().getField(Mco.SVC_AMT).getValue(); double dTaxAmt = this.getOwner().getRecord().getField(Mco.TAX_AMT).getValue(); double dNet = Math.floor((dGross - dCommAmt - dSvcAmt - dTaxAmt) * 100.00 + 0.5) / 100.00; this.getOwner().getRecord().getField(Mco.NET).setValue(dNet); return super.fieldChanged(bDisplayOption, iMoveMode); }
/** * Add the behaviors. */ public void addListeners() { super.addListeners(); this.getMainRecord().setKeyArea(MessageLog.kTimeoutKey); int iMessageStatus = ((ReferenceField)this.getScreenRecord().getField(MessageTimeoutScreenRecord.kMessageStatusID)).getIDFromCode(MessageStatus.SENT); this.getScreenRecord().getField(MessageTimeoutScreenRecord.kMessageStatusID).setValue(iMessageStatus); this.getMainRecord().addListener(new SubFileFilter(this.getScreenRecord().getField(MessageTimeoutScreenRecord.kMessageStatusID), MessageLog.kMessageStatusID, null, -1, null, -1)); this.getScreenRecord().getField(MessageTimeoutScreenRecord.kStartTimeout).setToLimit(DBConstants.START_SELECT_KEY); this.getMainRecord().addListener(new CompareFileFilter(this.getMainRecord().getField(MessageLog.kTimeoutTime), this.getScreenRecord().getField(MessageTimeoutScreenRecord.kStartTimeout), ">=")); } /**