((DateTimeField)this.getField(BookingDetail.DETAIL_DATE)).setDate(dateStart, DBConstants.DISPLAY, DBConstants.SCREEN_MOVE); if (timeDetail != null) ((DateTimeField)this.getField(BookingDetail.DETAIL_DATE)).setTime(timeDetail, DBConstants.DISPLAY, DBConstants.SCREEN_MOVE);
((DateTimeField)this.getField(BookingDetail.DETAIL_DATE)).setDate(dateStart, DBConstants.DISPLAY, DBConstants.SCREEN_MOVE); if (timeDetail != null) ((DateTimeField)this.getField(BookingDetail.DETAIL_DATE)).setTime(timeDetail, DBConstants.DISPLAY, DBConstants.SCREEN_MOVE);
this.getField(ProductPricing.RATE_ID).setValue(iRateTypeID); this.getField(ProductPricing.CLASS_ID).setValue(iRateClassID); ((DateTimeField)this.getField(ProductPricing.END_DATE)).setDate(dateStart, DBConstants.DISPLAY, DBConstants.SCREEN_MOVE); FileListener listener = null; try {
this.getField(ProductPricing.RATE_ID).setValue(iRateTypeID); this.getField(ProductPricing.CLASS_ID).setValue(iRateClassID); ((DateTimeField)this.getField(ProductPricing.END_DATE)).setDate(dateStart, DBConstants.DISPLAY, DBConstants.SCREEN_MOVE); FileListener listener = null; try {
((DateTimeField)this.getScreenRecord().getField(ApReportScreenRecord.START_DATE)).setDate(new Date(), false, DBConstants.INIT_MOVE); Calendar cal = ((DateTimeField)this.getScreenRecord().getField(ApReportScreenRecord.START_DATE)).getCalendar(); cal.add(Calendar.MONTH, -6);
((DateTimeField)this.getScreenRecord().getField(ApReportScreenRecord.START_DATE)).setDate(new Date(), false, DBConstants.INIT_MOVE); Calendar cal = ((DateTimeField)this.getScreenRecord().getField(ApReportScreenRecord.START_DATE)).getCalendar(); cal.add(Calendar.MONTH, -6);
/** * 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 } /**
this.getField(ProductPricing.RATE_ID).setValue(iRateID); this.getField(ProductPricing.CLASS_ID).setValue(iClassID); ((DateTimeField)this.getField(ProductPricing.END_DATE)).setDate(dateTarget, DBConstants.DISPLAY, DBConstants.SCREEN_MOVE); this.getField(ProductPricing.ID).setValue(0); // Since it reads from current.
this.getField(ProductPricing.RATE_ID).setValue(iRateID); this.getField(ProductPricing.CLASS_ID).setValue(iClassID); ((DateTimeField)this.getField(ProductPricing.END_DATE)).setDate(dateTarget, DBConstants.DISPLAY, DBConstants.SCREEN_MOVE); this.getField(ProductPricing.ID).setValue(0); // Since it reads from current.
((DateTimeField)this.getField(ProductPricing.END_DATE)).setDate(dateTarget, DBConstants.DISPLAY, DBConstants.SCREEN_MOVE); this.getField(TransportationPricing.TO_PAX).setValue(sTargetPax); this.getField(ProductPricing.ID).setValue(0); // Since it reads from current.
((DateTimeField)this.getField(ProductPricing.END_DATE)).setDate(dateTarget, DBConstants.DISPLAY, DBConstants.SCREEN_MOVE); this.getField(TransportationPricing.TO_PAX).setValue(sTargetPax); this.getField(ProductPricing.ID).setValue(0); // Since it reads from current.
/** * Add all the screen listeners. */ public void addListeners() { super.addListeners(); this.getScreenRecord().getField(AcctDetailScreenRecord.ACCOUNT_ID).setEnabled(true); this.getRecord(Account.ACCOUNT_FILE).getField(Account.ACCOUNT_NO).setEnabled(true); // Enable Key Field this.getScreenRecord().getField(AcctDetailScreenRecord.START_DATE).addListener(new RegisterValueHandler(null)); this.getScreenRecord().getField(AcctDetailScreenRecord.END_DATE).addListener(new RegisterValueHandler(null)); this.getScreenRecord().getField(AcctDetailScreenRecord.CALC_START).addListener(new RegisterValueHandler(null)); if ((this.getScreenRecord().getField(AcctDetailScreenRecord.START_DATE).isNull()) || (this.getScreenRecord().getField(AcctDetailScreenRecord.END_DATE).isNull())) { // If the starting and ending date haven't been set yet, set them to the current period start and end. Date date = new Date(); // Now Period recPeriod = new Period((RecordOwner)this.getParentScreen()); // Note: I Use READ_MOVE, because RegisterBehavior doesn't respond to it. if (this.getScreenRecord().getField(AcctDetailScreenRecord.START_DATE).isNull()) ((DateTimeField)this.getScreenRecord().getField(AcctDetailScreenRecord.START_DATE)).setDate(recPeriod.getPeriodStartDate(date), DBConstants.DISPLAY, DBConstants.READ_MOVE); if (this.getScreenRecord().getField(AcctDetailScreenRecord.END_DATE).isNull()) ((DateTimeField)this.getScreenRecord().getField(AcctDetailScreenRecord.END_DATE)).setDate(recPeriod.getPeriodEndDate(date), DBConstants.DISPLAY, DBConstants.READ_MOVE); recPeriod.free(); recPeriod = null; } this.getScreenRecord().getField(AcctDetailScreenRecord.START_DATE).setEnabled(true); this.getScreenRecord().getField(AcctDetailScreenRecord.END_DATE).setEnabled(true); this.getScreenRecord().getField(AcctDetailScreenRecord.CALC_START).setEnabled(true); } /**