PdcClockLine: Difference between revisions

From External Bemet Wiki
Jump to navigation Jump to search
No edit summary
No edit summary
Line 55: Line 55:


== Code example ==
== Code example ==
The following example code creates a new clock line:
The following example code creates a new clock line according to the PdC default standard:


<source lang="vb">
<source lang="vb">
Dim objClockLine
    Dim ClockLine As PDCEXT.IClockLine


  Set objClockLine = Pdc.ProductRegistration.ClockLines.New
      ClockLine = PDC.App.ProductRegistration.ClockLines.New
  objClockLine.PersonelNo   = "1000"
      ClockLine.PersonelNo = "1000"
  objClockLine.ClockAccount = "LUNCH"
      ClockLine.ClockAccount = "LUNCH"
  objClockLine.StartClocking = Cdate(Date)
      ClockLine.ClockDate = DateTime.Now
  objClockLine.EndClocking  = Cdate(Date)
      ClockLine.StartTime = 9
  objClockLine.WorkedTime    = 2.5
      ClockLine.EndTime = 10
  objClockLine.Save
      If Not ClockLine.Save Then
  Set objClockLine = nothing
        MsgBox(PDC.App.LastError)
      End If
</source>
</source>



Revision as of 15:33, 16 January 2018

Methods

PdcClockLine.Copy
PdcClockLine.Read
PdcClockLine.Save

Properties

PdcClockLine.CalculationNo
PdcClockLine.ClockAccount
PdcClockLine.ClockCode
PdcClockLine.ClockDate
PdcClockLine.CombiTime
PdcClockLine.DateChanged
PdcClockLine.DateCreated
PdcClockLine.DirectLine
PdcClockLine.EndClocking
PdcClockLine.EndTime
PdcClockLine.History
PdcClockLine.HourSurcharge
PdcClockLine.ID
PdcClockLine.IsInterMediate
PdcClockLine.IsNesting
PdcClockLine.NameChanged
PdcClockLine.NameCreated
PdcClockLine.NestingBlock
PdcClockLine.NestingLineID
PdcClockLine.NestingNumber
PdcClockLine.NestingRatio
PdcClockLine.OperationLineNo
PdcClockLine.OperationNo
PdcClockLine.PersonelName
PdcClockLine.PersonelNo
PdcClockLine.PlanPlace
PdcClockLine.PlanPlaceID
PdcClockLine.PlanSeqID
PdcClockLine.ProjectNo
PdcClockLine.Registered
PdcClockLine.ScheduleID
PdcClockLine.StartClocking
PdcClockLine.StartTime
PdcClockLine.Text
PdcClockLine.TimeKind
PdcClockLine.TimeType
PdcClockLine.Userfieldslist
PdcClockLine.WorkedTime
PdcClockLine.YearWeek

Description

Interface object for a clockline

Notes

Represents the ClockLine object. With this object a script can manipulate a single clock line. Pay attention: The sequence of populating the properties is important. See the helpfile for the properties.

Code example

The following example code creates a new clock line according to the PdC default standard:

    Dim ClockLine As PDCEXT.IClockLine

      ClockLine = PDC.App.ProductRegistration.ClockLines.New
      ClockLine.PersonelNo = "1000"
      ClockLine.ClockAccount = "LUNCH"
      ClockLine.ClockDate = DateTime.Now
      ClockLine.StartTime = 9
      ClockLine.EndTime = 10
      If Not ClockLine.Save Then
        MsgBox(PDC.App.LastError)
      End If

The following example code modifies an existing clock line:

Dim aClockLine

  Set aClockLine = Pdc.ProductRegistration.ClockLines.Open(567)
  aClockLine.(parameter)=(value)
  aClockLine.Save
  Set aClockLine = nothing

Availability

Available since july 2008 (from version 3.8).