107 lines
2.7 KiB
OpenEdge ABL
107 lines
2.7 KiB
OpenEdge ABL
VERSION 1.0 CLASS
|
|
BEGIN
|
|
MultiUse = -1 'True
|
|
Persistable = 0 'NotPersistable
|
|
DataBindingBehavior = 0 'vbNone
|
|
DataSourceBehavior = 0 'vbNone
|
|
MTSTransactionMode = 0 'NotAnMTSObject
|
|
END
|
|
Attribute VB_Name = "CPrueffehler"
|
|
Attribute VB_GlobalNameSpace = False
|
|
Attribute VB_Creatable = True
|
|
Attribute VB_PredeclaredId = False
|
|
Attribute VB_Exposed = False
|
|
Attribute VB_Ext_KEY = "SavedWithClassBuilder6" ,"Yes"
|
|
Attribute VB_Ext_KEY = "Top_Level" ,"Yes"
|
|
Option Explicit
|
|
|
|
'lokale Variable(n) zum Zuweisen der Eigenschaft(en)
|
|
Private mvarSerienNr As Long 'lokale Kopie
|
|
Private mvarPruefgangNr As Long 'lokale Kopie
|
|
Private mvarPruefdatum As Date 'lokale Kopie
|
|
Private mvarFehler(10) As Double 'lokale Kopie
|
|
Private mvarAusdruckPruefstationDatum As Date 'lokale Kopie
|
|
|
|
|
|
Public Property Let AusdruckPruefstationDatum(ByVal vData As Date)
|
|
mvarAusdruckPruefstationDatum = vData
|
|
End Property
|
|
|
|
Public Property Get AusdruckPruefstationDatum() As Date
|
|
AusdruckPruefstationDatum = mvarAusdruckPruefstationDatum
|
|
End Property
|
|
|
|
Public Property Let Fehler(Index As Integer, ByVal vData As Double)
|
|
mvarFehler(Index) = vData
|
|
End Property
|
|
|
|
|
|
Public Property Get Fehler(Index As Integer) As Double
|
|
Fehler = mvarFehler(Index)
|
|
End Property
|
|
|
|
Public Property Let Pruefdatum(ByVal vData As Date)
|
|
mvarPruefdatum = vData
|
|
End Property
|
|
|
|
Public Property Get Pruefdatum() As Date
|
|
Pruefdatum = mvarPruefdatum
|
|
End Property
|
|
|
|
Public Property Let PruefgangNr(ByVal vData As Long)
|
|
mvarPruefgangNr = vData
|
|
End Property
|
|
|
|
Public Property Get PruefgangNr() As Long
|
|
PruefgangNr = mvarPruefgangNr
|
|
End Property
|
|
|
|
Public Property Let SerienNr(ByVal vData As Long)
|
|
mvarSerienNr = vData
|
|
End Property
|
|
|
|
Public Property Get SerienNr() As Long
|
|
SerienNr = mvarSerienNr
|
|
End Property
|
|
|
|
|
|
|
|
Public Function save() As Boolean
|
|
Dim Index As Integer
|
|
On Error GoTo saveErr
|
|
|
|
Dim rs As CRecordset
|
|
Dim sSQL As String
|
|
|
|
sSQL = "SELECT * from Prueffehler where SerienNr = " & mvarSerienNr _
|
|
& " and PruefgangNr =" & mvarPruefgangNr & ";"
|
|
|
|
Set rs = New CRecordset
|
|
|
|
rs.openRS (sSQL)
|
|
|
|
If rs.EOF Then
|
|
' Datensatz noch nicht vorhanden
|
|
rs.addNew
|
|
Call rs.setValue("SerienNr", mvarSerienNr)
|
|
Call rs.setValue("PruefgangNr", mvarPruefgangNr)
|
|
Else
|
|
' Aktualisieren
|
|
End If
|
|
|
|
Call rs.setValue("Pruefdatum", mvarPruefdatum)
|
|
Call rs.setValue("AusdruckPruefstationDatum", mvarAusdruckPruefstationDatum)
|
|
|
|
' Prüfpunktspezifische Daten im Array
|
|
For Index = 1 To 10
|
|
Call rs.setValue("PP" & CStr(Index) & "_Fehler", mvarFehler(Index))
|
|
Next
|
|
|
|
rs.update
|
|
save = True
|
|
Exit Function
|
|
saveErr:
|
|
Call showError("save")
|
|
Exit Function
|
|
End Function
|