Quintiq file version 2.0 
 | 
#parent: #root 
 | 
Method Update ( 
 | 
  Unit owner, 
 | 
  DateTime start, 
 | 
  String timeunit, 
 | 
  Duration maintenance, 
 | 
  Real efficiency, 
 | 
  Real allocation, 
 | 
  ShiftPattern shiftpattern, 
 | 
  Real maxloadpercentage, 
 | 
  Number nrofunitsopen, 
 | 
  Real minimumloadthreshold, 
 | 
  Boolean isfromdb 
 | 
) 
 | 
{ 
 | 
  Description: 'Update unit availability.' 
 | 
  TextBody: 
 | 
  [* 
 | 
    // Soh Yee Jul-17-2012 (created) 
 | 
    owner.UnitAvailability( relmove, this );; 
 | 
    this.UpdateTypeIndex( owner.ID(), start ); 
 | 
     
 | 
    shiftpatternname := guard( shiftpattern.Name(), '' ) 
 | 
    this.UpdateForeignKey( shiftpatternname ); 
 | 
     
 | 
    this.TimeUnit( timeunit ); 
 | 
    this.Maintenance( maintenance ); 
 | 
    this.Efficiency( efficiency ); 
 | 
    this.Allocation( allocation ); 
 | 
    this.MaximumLoadPercentage( maxloadpercentage ); 
 | 
    this.NrOfUnitsOpen( nrofunitsopen ) 
 | 
    this.MinimumLoadThreshold( minimumloadthreshold ); 
 | 
    this.IsManuallyConfigured( not isfromdb ); 
 | 
  *] 
 | 
} 
 |