700 lines
25 KiB
Plaintext
700 lines
25 KiB
Plaintext
VERSION 5.00
|
|
Object = "{5E9E78A0-531B-11CF-91F6-C2863C385E30}#1.0#0"; "msflxgrd.ocx"
|
|
Object = "{831FDD16-0C5C-11D2-A9FC-0000F8754DA1}#2.2#0"; "MSCOMCTL.OCX"
|
|
Begin VB.Form frmFertigmeldenMAV
|
|
Caption = "Fertigmelden in MAV"
|
|
ClientHeight = 6375
|
|
ClientLeft = 60
|
|
ClientTop = 345
|
|
ClientWidth = 8190
|
|
LinkTopic = "Form2"
|
|
ScaleHeight = 6375
|
|
ScaleWidth = 8190
|
|
StartUpPosition = 3 'Windows-Standard
|
|
Begin VB.CommandButton cmdBefundPrfFertigmelden
|
|
Caption = "Befund-/Eingangsprüfungen fertigmelden"
|
|
Height = 435
|
|
Left = 120
|
|
TabIndex = 10
|
|
ToolTipText = $"frmFertigmeldenMAV.frx":0000
|
|
Top = 5400
|
|
Width = 3225
|
|
End
|
|
Begin VB.CommandButton cmdPDA
|
|
Caption = "PDA"
|
|
Height = 435
|
|
Left = 5880
|
|
TabIndex = 9
|
|
Top = 5430
|
|
Width = 675
|
|
End
|
|
Begin MSComctlLib.StatusBar StatusBar1
|
|
Align = 2 'Unten ausrichten
|
|
Height = 285
|
|
Left = 0
|
|
TabIndex = 8
|
|
Top = 6090
|
|
Width = 8190
|
|
_ExtentX = 14446
|
|
_ExtentY = 503
|
|
Style = 1
|
|
_Version = 393216
|
|
BeginProperty Panels {8E3867A5-8586-11D1-B16A-00C0F0283628}
|
|
NumPanels = 1
|
|
BeginProperty Panel1 {8E3867AB-8586-11D1-B16A-00C0F0283628}
|
|
EndProperty
|
|
EndProperty
|
|
End
|
|
Begin MSComctlLib.ProgressBar ProgressBar1
|
|
Height = 255
|
|
Left = 1440
|
|
TabIndex = 7
|
|
Top = 5940
|
|
Visible = 0 'False
|
|
Width = 5535
|
|
_ExtentX = 9763
|
|
_ExtentY = 450
|
|
_Version = 393216
|
|
Appearance = 1
|
|
End
|
|
Begin VB.CommandButton cmdInfo
|
|
Caption = "Info"
|
|
Height = 345
|
|
Index = 0
|
|
Left = 5220
|
|
TabIndex = 5
|
|
ToolTipText = "Zeigt die Prüfergebnisse der Zähler an"
|
|
Top = 5280
|
|
Width = 465
|
|
End
|
|
Begin VB.PictureBox Picture1
|
|
Height = 465
|
|
Left = 4950
|
|
Picture = "frmFertigmeldenMAV.frx":008E
|
|
ScaleHeight = 405
|
|
ScaleWidth = 675
|
|
TabIndex = 3
|
|
Top = 5460
|
|
Visible = 0 'False
|
|
Width = 735
|
|
End
|
|
Begin VB.CommandButton cmdClose
|
|
Caption = "Schließen"
|
|
Default = -1 'True
|
|
Height = 435
|
|
Left = 6630
|
|
TabIndex = 2
|
|
Top = 5430
|
|
Width = 1125
|
|
End
|
|
Begin MSFlexGridLib.MSFlexGrid MSFlexGrid1
|
|
Height = 3915
|
|
Left = 0
|
|
TabIndex = 0
|
|
Top = 1320
|
|
Width = 7875
|
|
_ExtentX = 13891
|
|
_ExtentY = 6906
|
|
_Version = 393216
|
|
ScrollBars = 0
|
|
AllowUserResizing= 1
|
|
End
|
|
Begin VB.CommandButton cmdFertigmelden
|
|
Caption = "jetzt fertig melden"
|
|
Height = 345
|
|
Index = 0
|
|
Left = 4080
|
|
TabIndex = 1
|
|
Top = 5280
|
|
Width = 1425
|
|
End
|
|
Begin VB.Label lblHinweis
|
|
BackColor = &H0080FFFF&
|
|
Caption = "Hinweis: Klicken Sie auch auf den Button ""jetzt fertig melden"", wenn sie eine Grenzwertabweichung akzeptieren!"
|
|
Enabled = 0 'False
|
|
Height = 405
|
|
Left = 390
|
|
TabIndex = 6
|
|
Top = 840
|
|
Width = 7335
|
|
End
|
|
Begin VB.Label lblMessage
|
|
Alignment = 2 'Zentriert
|
|
Caption = "Label1"
|
|
BeginProperty Font
|
|
Name = "MS Sans Serif"
|
|
Size = 9.75
|
|
Charset = 0
|
|
Weight = 700
|
|
Underline = 0 'False
|
|
Italic = 0 'False
|
|
Strikethrough = 0 'False
|
|
EndProperty
|
|
Height = 675
|
|
Left = 150
|
|
TabIndex = 4
|
|
Top = 90
|
|
Width = 7725
|
|
End
|
|
End
|
|
Attribute VB_Name = "frmFertigmeldenMAV"
|
|
Attribute VB_GlobalNameSpace = False
|
|
Attribute VB_Creatable = False
|
|
Attribute VB_PredeclaredId = True
|
|
Attribute VB_Exposed = False
|
|
Option Explicit
|
|
|
|
Private mblnMitGrenzwertueberschreitung As Boolean
|
|
|
|
Private mblnActivated As Boolean
|
|
Public m_colEinbauplaetze As Collection
|
|
Public mstrMessage As String
|
|
|
|
|
|
Private Sub cmdBefundPrfFertigmelden_Click()
|
|
Dim intZeile As Integer
|
|
Dim lngAuftragNr As Long
|
|
Dim intPosNr As Integer
|
|
Dim Index As Integer
|
|
|
|
|
|
For intZeile = 1 To MSFlexGrid1.Rows - 1
|
|
lngAuftragNr = MSFlexGrid1.TextMatrix(intZeile, 0)
|
|
intPosNr = MSFlexGrid1.TextMatrix(intZeile, 1)
|
|
|
|
' fertigmelde Button zur Zeile sichtbar machen
|
|
For Index = 0 To cmdFertigmelden.Count - 1
|
|
Debug.Print "Zeile " & cmdFertigmelden(Index).Tag
|
|
If Val(cmdFertigmelden(Index).Tag) = intZeile Then
|
|
cmdFertigmelden(Index).Visible = False
|
|
End If
|
|
Next
|
|
|
|
|
|
If Val(MSFlexGrid1.TextMatrix(intZeile, 5)) = 0 Then
|
|
If Fertigmelden(lngAuftragNr, intPosNr) Then
|
|
MSFlexGrid1.row = intZeile
|
|
MSFlexGrid1.col = 6
|
|
Set MSFlexGrid1.CellPicture = Picture1.Picture
|
|
MSFlexGrid1.CellPictureAlignment = MSFlexGridLib.AlignmentSettings.flexAlignCenterCenter
|
|
End If
|
|
End If
|
|
Next
|
|
UpdateGrid
|
|
cmdBefundPrfFertigmelden.Enabled = False
|
|
End Sub
|
|
|
|
|
|
Private Sub cmdClose_Click()
|
|
Dim lngReturn As Long
|
|
Call UpdateGrid
|
|
|
|
If mblnMitGrenzwertueberschreitung = True Then
|
|
lngReturn = MsgBox("Sie können Positionen mit Grenzwertüberschreitungen fertigmelden." & vbCrLf & "Sind Sie sicher, daß Sie das Fenster schließen wollen?", vbYesNo Or vbDefaultButton2, "Formular schließen")
|
|
Else
|
|
lngReturn = vbYes
|
|
End If
|
|
|
|
If lngReturn = vbYes Then
|
|
cmdClose.Enabled = False
|
|
Unload Me
|
|
End If
|
|
End Sub
|
|
|
|
Private Sub cmdFertigmelden_Click(Index As Integer)
|
|
Dim lngAuftragNr As Long
|
|
Dim intPosNr As Integer
|
|
Dim lngZeile As Long
|
|
|
|
cmdFertigmelden(Index).Enabled = False
|
|
cmdClose.Enabled = False
|
|
|
|
lngZeile = Val(cmdFertigmelden(Index).Tag)
|
|
|
|
MSFlexGrid1.row = lngZeile
|
|
MSFlexGrid1.col = 0
|
|
lngAuftragNr = Val(MSFlexGrid1.text)
|
|
MSFlexGrid1.col = 1
|
|
intPosNr = Val(MSFlexGrid1.text)
|
|
|
|
If Fertigmelden(lngAuftragNr, intPosNr) Then
|
|
cmdFertigmelden(Index).Visible = False
|
|
MSFlexGrid1.col = 6
|
|
Set MSFlexGrid1.CellPicture = Picture1.Picture
|
|
MSFlexGrid1.CellPictureAlignment = MSFlexGridLib.AlignmentSettings.flexAlignCenterCenter
|
|
End If
|
|
|
|
'''''''''''''''''''''
|
|
|
|
Dim objForm As frmTrefferquotenueberwachung
|
|
Set objForm = New frmTrefferquotenueberwachung
|
|
objForm.m_blnSendeMail = True
|
|
objForm.m_lngAuftragNr = lngAuftragNr
|
|
objForm.m_intPositionNr = intPosNr
|
|
objForm.Show vbModal, Me
|
|
'''''''''''''''''''''
|
|
cmdClose.Enabled = True
|
|
|
|
End Sub
|
|
|
|
Private Function Fertigmelden(lngAuftragNr As Long, intPosNr As Integer) As Boolean
|
|
Dim AuftragPosition As CAuftragPosition
|
|
Dim Auftrag As CAuftrag
|
|
Dim Nummernband As CNummernband
|
|
Dim IdentNrObj As CIdentNr
|
|
Dim AnzahlInProzent As Byte
|
|
|
|
Set AuftragPosition = New CAuftragPosition
|
|
If AuftragPosition.load(lngAuftragNr, intPosNr) Then
|
|
ShowStatus "Auftrag " & lngAuftragNr & "/" & intPosNr & " wird fertig gemeldet..."
|
|
Fertigmelden = AuftragPosition.AlsGeprueftFertigmelden()
|
|
ShowStatus ""
|
|
End If
|
|
|
|
Set AuftragPosition = Nothing
|
|
End Function
|
|
|
|
Private Sub UpdateGrid()
|
|
On Error GoTo Errorhandler
|
|
|
|
Dim Einbauplatz As CEinbauplatz
|
|
Dim Pruefzaehler As CPruefzaehler
|
|
Dim TempPruefzaehler As CPruefzaehler
|
|
|
|
Dim AuftragPosition As CAuftragPosition
|
|
Dim lngSerienNr As Long
|
|
|
|
Dim lngAnzahlZaehler As Long
|
|
Dim lngAnzahlZaehlerZuPruefen As Long
|
|
|
|
Dim lngAnzahlUngeprueft As Long
|
|
Dim lngAnzahlGeprueftOK As Long
|
|
Dim lngAnzahlGeprueftOK_WPV As Long
|
|
|
|
Dim lngAnzahlGrenzwert As Long
|
|
Dim Prozentsatz As Double
|
|
|
|
Dim strAuftragPosition As String
|
|
Dim strUniqueAuftragPositionListe As String
|
|
Dim lngZeile As Long
|
|
|
|
mblnMitGrenzwertueberschreitung = False
|
|
cmdBefundPrfFertigmelden.Enabled = False
|
|
|
|
cmdInfo(0).Visible = False
|
|
cmdFertigmelden(0).Visible = False
|
|
|
|
Dim i As Integer
|
|
On Error Resume Next
|
|
For i = 1 To cmdFertigmelden.UBound
|
|
Unload cmdFertigmelden(i)
|
|
Next
|
|
For i = 1 To cmdInfo.UBound
|
|
Unload cmdInfo(i)
|
|
Next
|
|
On Error GoTo Errorhandler
|
|
|
|
MSFlexGrid1.FixedRows = 1
|
|
MSFlexGrid1.Cols = 7
|
|
MSFlexGrid1.FixedCols = 2
|
|
MSFlexGrid1.row = 0
|
|
|
|
MSFlexGrid1.col = 0
|
|
MSFlexGrid1.text = "AuftragNr"
|
|
MSFlexGrid1.CellAlignment = MSFlexGridLib.AlignmentSettings.flexAlignCenterCenter
|
|
|
|
|
|
MSFlexGrid1.col = 1
|
|
MSFlexGrid1.text = "Position"
|
|
MSFlexGrid1.CellAlignment = MSFlexGridLib.AlignmentSettings.flexAlignCenterCenter
|
|
|
|
MSFlexGrid1.col = 2
|
|
MSFlexGrid1.text = "Anzahl"
|
|
MSFlexGrid1.CellAlignment = MSFlexGridLib.AlignmentSettings.flexAlignCenterCenter
|
|
|
|
MSFlexGrid1.col = 3
|
|
MSFlexGrid1.text = "geprüft OK"
|
|
MSFlexGrid1.CellAlignment = MSFlexGridLib.AlignmentSettings.flexAlignCenterCenter
|
|
|
|
MSFlexGrid1.col = 4
|
|
MSFlexGrid1.text = "Grenzwert"
|
|
MSFlexGrid1.CellAlignment = MSFlexGridLib.AlignmentSettings.flexAlignCenterCenter
|
|
|
|
MSFlexGrid1.col = 5
|
|
MSFlexGrid1.text = "ungeprüft"
|
|
MSFlexGrid1.CellAlignment = MSFlexGridLib.AlignmentSettings.flexAlignCenterCenter
|
|
|
|
MSFlexGrid1.col = 6
|
|
MSFlexGrid1.text = "fertig gemeldet"
|
|
MSFlexGrid1.CellAlignment = MSFlexGridLib.AlignmentSettings.flexAlignCenterCenter
|
|
|
|
MSFlexGrid1.ColWidth(1) = 810
|
|
MSFlexGrid1.ColWidth(2) = 810
|
|
MSFlexGrid1.ColWidth(3) = 910
|
|
MSFlexGrid1.ColWidth(4) = 810
|
|
|
|
DoEvents
|
|
|
|
lngZeile = 0
|
|
For Each Einbauplatz In m_colEinbauplaetze
|
|
Set Pruefzaehler = Einbauplatz.getPruefzaehler
|
|
If Not Pruefzaehler Is Nothing Then
|
|
|
|
' SerienNr der eingebauten Prüfzähler
|
|
lngSerienNr = Pruefzaehler.getSerienNr
|
|
|
|
' AuftragPosition der SerienNr bestimmen
|
|
Set TempPruefzaehler = New CPruefzaehler
|
|
TempPruefzaehler.loadForSerienNr lngSerienNr, Pruefzaehler.getAuftrag.getNr
|
|
Set AuftragPosition = TempPruefzaehler.getAuftragPosition
|
|
|
|
If Not AuftragPosition Is Nothing Then
|
|
If AuftragPosition.getAuftragNr = 100 Then GoTo SkipAuftragposition
|
|
|
|
strAuftragPosition = AuftragPosition.getAuftragNr & "/" & AuftragPosition.getNr
|
|
If InStr(1, strUniqueAuftragPositionListe, "|" & strAuftragPosition & "|") = 0 Then
|
|
' diese AuftragPosition wurde noch nicht im Grid angezeigt
|
|
|
|
' diese AuftragPosition wird nun im Grid angezeigt, deshalb merken
|
|
strUniqueAuftragPositionListe = strUniqueAuftragPositionListe & "|" & strAuftragPosition & "|"
|
|
|
|
lngZeile = lngZeile + 1
|
|
MSFlexGrid1.Rows = lngZeile + 1
|
|
|
|
' ">= 0" alle Zaehler
|
|
' "<= 22" ungeprüft + abgebrochen
|
|
' "<= 24" ungeprüft + ausgefallen
|
|
' ">= 25" geprüft (OK + Grenzwert)
|
|
' "= 25" Grenzwertüberschreitung Prüfstation
|
|
' ">= 30" geprüft OK
|
|
|
|
' insgesamt
|
|
lngAnzahlZaehler = AuftragPosition.GetAnzahlZaehlerFromStatus(">= 0")
|
|
|
|
' Grenzwert überschritten
|
|
lngAnzahlGrenzwert = AuftragPosition.GetAnzahlZaehlerFromStatus("= 25")
|
|
If lngAnzahlGrenzwert > 0 Then
|
|
cmdBefundPrfFertigmelden.Enabled = True
|
|
End If
|
|
|
|
' ungeprüft (0,22) + ausgefallen (24)
|
|
' RH 2015-11-18: Die Anzahl der Zähler mit Fertigungsstatus = 23 (Ausfall) werden unter "ungeprüft" angezeigt.
|
|
lngAnzahlUngeprueft = AuftragPosition.GetAnzahlZaehlerFromStatus("<= 24")
|
|
''''''lngAnzahlUngeprueft = AuftragPosition.GetAnzahlZaehlerFromStatus("<= 22")
|
|
|
|
' erfolgreich geprüfte (30)
|
|
lngAnzahlGeprueftOK = AuftragPosition.GetAnzahlZaehlerFromStatus(">= 30")
|
|
|
|
MSFlexGrid1.row = lngZeile
|
|
|
|
MSFlexGrid1.col = 0
|
|
MSFlexGrid1.text = AuftragPosition.getAuftragNr
|
|
MSFlexGrid1.CellAlignment = MSFlexGridLib.AlignmentSettings.flexAlignCenterCenter
|
|
|
|
MSFlexGrid1.col = 1
|
|
MSFlexGrid1.text = AuftragPosition.getNr
|
|
MSFlexGrid1.CellAlignment = MSFlexGridLib.AlignmentSettings.flexAlignCenterCenter
|
|
|
|
|
|
MSFlexGrid1.col = 2
|
|
MSFlexGrid1.text = lngAnzahlZaehler
|
|
MSFlexGrid1.CellAlignment = MSFlexGridLib.AlignmentSettings.flexAlignCenterCenter
|
|
|
|
Prozentsatz = ProzentsatzDerZuPruefendenZaehler(AuftragPosition.getAuftragNr, AuftragPosition.getNr)
|
|
If Prozentsatz < 100 And Prozentsatz > 0 Then
|
|
MSFlexGrid1.text = AuftragPosition.getMenge & "*" & Prozentsatz & "%=" & lngAnzahlZaehler
|
|
MSFlexGrid1.ColWidth(2) = 1300
|
|
End If
|
|
|
|
|
|
MSFlexGrid1.col = 3
|
|
If lngAnzahlGeprueftOK > 0 Then
|
|
MSFlexGrid1.text = lngAnzahlGeprueftOK
|
|
End If
|
|
MSFlexGrid1.CellAlignment = MSFlexGridLib.AlignmentSettings.flexAlignCenterCenter
|
|
|
|
|
|
MSFlexGrid1.col = 4
|
|
If lngAnzahlGrenzwert > 0 Then
|
|
MSFlexGrid1.text = lngAnzahlGrenzwert
|
|
End If
|
|
MSFlexGrid1.CellAlignment = MSFlexGridLib.AlignmentSettings.flexAlignCenterCenter
|
|
|
|
|
|
MSFlexGrid1.col = 5
|
|
If lngAnzahlUngeprueft > 0 Then
|
|
MSFlexGrid1.text = lngAnzahlUngeprueft
|
|
End If
|
|
MSFlexGrid1.CellAlignment = MSFlexGridLib.AlignmentSettings.flexAlignCenterCenter
|
|
|
|
If TempPruefzaehler.IstVerbundZaehler() = True Then
|
|
' bei Verbundzählern wird zusätzlich geprüft, ob diese auch am Öffnen/Schließen Prüfpunkt geprüft worden sind
|
|
' und so auch einen Eintrag in der Tabelle [Verbundzaehler] haben.
|
|
If lngAnzahlUngeprueft = 0 Then
|
|
' alle Verbundzähler sind an der Prüfstation geprüft
|
|
' Anzahl der Verbundzähler, die auch Öffen/Schließen geprüft sind
|
|
lngAnzahlGeprueftOK_WPV = AuftragPosition.GetAnzahlVerbundzaehlerOeffenSchliessenGeprueft()
|
|
lngAnzahlUngeprueft = lngAnzahlZaehler - lngAnzahlGeprueftOK_WPV
|
|
|
|
If lngAnzahlUngeprueft > 0 Then
|
|
MSFlexGrid1.text = lngAnzahlUngeprueft & " (Öff/Schl)"
|
|
End If
|
|
End If
|
|
End If
|
|
|
|
MSFlexGrid1.col = 6
|
|
MSFlexGrid1.RowHeight(lngZeile) = cmdFertigmelden(0).Height * 1.4
|
|
MSFlexGrid1.ColWidth(6) = cmdFertigmelden(0).Width * 1.4 + cmdInfo(0).Width
|
|
MSFlexGrid1.CellAlignment = MSFlexGridLib.AlignmentSettings.flexAlignCenterCenter
|
|
|
|
If AuftragPosition.Get_P_IstTermin() > 0 Then
|
|
' schon fertig gemeldet
|
|
MSFlexGrid1.text = Format(AuftragPosition.Get_P_IstTermin, "dd.mm.yyyy")
|
|
Else
|
|
' Auftragposition ist noch nicht fertiggemeldet
|
|
If lngAnzahlUngeprueft = 0 Then
|
|
' hier kann fertig gemeldet werden, weil es keine ungeprüften Zähler gibt
|
|
If lngAnzahlGrenzwert > 0 Then
|
|
' Button anzeigen !
|
|
lblHinweis.Visible = True
|
|
load cmdFertigmelden(lngZeile)
|
|
cmdFertigmelden(lngZeile).Enabled = True
|
|
cmdFertigmelden(lngZeile).Tag = lngZeile
|
|
cmdFertigmelden(lngZeile).Left = MSFlexGrid1.CellLeft + MSFlexGrid1.Left + cmdFertigmelden(0).Width * 0.1
|
|
cmdFertigmelden(lngZeile).Top = MSFlexGrid1.CellTop + MSFlexGrid1.Top + cmdFertigmelden(0).Height * 0.1
|
|
cmdFertigmelden(lngZeile).Visible = True
|
|
cmdFertigmelden(lngZeile).ZOrder 0
|
|
|
|
mblnMitGrenzwertueberschreitung = True
|
|
Else
|
|
' hier kann automatisch fertig gemeldet werden
|
|
|
|
' Todo eRegister nur dann als "Geprueft" fertigmelden" wenn sie auch verschlossen sind
|
|
|
|
If AuftragPosition.AlsGeprueftFertigmelden() Then
|
|
MSFlexGrid1.CellPictureAlignment = MSFlexGridLib.AlignmentSettings.flexAlignCenterCenter
|
|
Set MSFlexGrid1.CellPicture = Picture1.Picture
|
|
Else
|
|
MSFlexGrid1.text = "?"
|
|
End If
|
|
End If
|
|
Else
|
|
' ungeprüfte
|
|
End If
|
|
End If '' Auftragposition ist noch nicht fertiggemeldet
|
|
|
|
load cmdInfo(lngZeile)
|
|
cmdInfo(lngZeile).Enabled = True
|
|
cmdInfo(lngZeile).Tag = lngZeile
|
|
cmdInfo(lngZeile).Left = MSFlexGrid1.CellLeft + MSFlexGrid1.Left + cmdFertigmelden(0).Width * 1.2
|
|
cmdInfo(lngZeile).Top = MSFlexGrid1.CellTop + MSFlexGrid1.Top + cmdFertigmelden(0).Height * 0.1
|
|
cmdInfo(lngZeile).Visible = True
|
|
cmdInfo(lngZeile).ZOrder 0
|
|
|
|
End If ' Auftragposition wurde bisher nicht behandelt
|
|
SkipAuftragposition:
|
|
End If 'AuftragPosition is not null
|
|
End If 'Pruefzaehler is nothing
|
|
DoEvents
|
|
Next
|
|
|
|
Dim lngBreite As Long
|
|
lngBreite = 0
|
|
For i = 0 To MSFlexGrid1.Cols - 1
|
|
If i < 9 Then
|
|
lngBreite = lngBreite + MSFlexGrid1.ColWidth(i)
|
|
If lngBreite > Me.Width Then
|
|
Me.Width = lngBreite + TwipsPerPixelX(40)
|
|
End If
|
|
End If
|
|
Next
|
|
Exit Sub
|
|
Errorhandler:
|
|
ErrorMsg Err.Description
|
|
End Sub
|
|
|
|
Private Sub cmdInfo_Click(Index As Integer)
|
|
Dim lngAuftragNr As Long
|
|
Dim intPosNr As Integer
|
|
Dim lngZeile As Long
|
|
|
|
cmdInfo(Index).Enabled = False
|
|
cmdClose.Enabled = False
|
|
|
|
lngZeile = Val(cmdInfo(Index).Tag)
|
|
|
|
MSFlexGrid1.row = lngZeile
|
|
MSFlexGrid1.col = 0
|
|
lngAuftragNr = Val(MSFlexGrid1.text)
|
|
MSFlexGrid1.col = 1
|
|
intPosNr = Val(MSFlexGrid1.text)
|
|
|
|
Call PruefergebnisseFuerStatus25Anzeigen(lngAuftragNr, intPosNr)
|
|
|
|
'''''''''''''''''''''
|
|
Dim objForm As frmTrefferquotenueberwachung
|
|
Set objForm = New frmTrefferquotenueberwachung
|
|
objForm.m_blnSendeMail = False
|
|
objForm.m_lngAuftragNr = lngAuftragNr
|
|
objForm.m_intPositionNr = intPosNr
|
|
objForm.Show vbModal, Me
|
|
'''''''''''''''''''''
|
|
|
|
On Error Resume Next
|
|
cmdInfo(Index).Enabled = True
|
|
cmdClose.Enabled = True
|
|
End Sub
|
|
|
|
|
|
Private Sub PruefergebnisseFuerStatus25Anzeigen(lngAuftragNr As Long, intPosNr As Integer)
|
|
frmPruefergebnisse.m_lngAuftragNr = lngAuftragNr
|
|
frmPruefergebnisse.m_intPosNr = intPosNr
|
|
|
|
frmPruefergebnisse.Show vbModal, Me
|
|
|
|
End Sub
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Private Sub cmdPDA_Click()
|
|
On Error GoTo Errorhandler
|
|
Dim PositionNr As Long
|
|
Dim AuftragNr As Long
|
|
Dim strADOConnectionstring As String
|
|
Dim objPDA As Object
|
|
|
|
If MSFlexGrid1.Rows = 2 Then
|
|
MSFlexGrid1.row = 1
|
|
End If
|
|
|
|
MSFlexGrid1.col = 0
|
|
AuftragNr = Val(MSFlexGrid1.text)
|
|
|
|
MSFlexGrid1.col = 1
|
|
PositionNr = Val(MSFlexGrid1.text)
|
|
|
|
'strADOConnectionstring = g_App.getDB.getConnection.ConnectionString
|
|
strADOConnectionstring = g_App.Settings.ADOConnectionstring
|
|
|
|
If AuftragNr > 0 Then
|
|
Set objPDA = CreateObject("PDA.clsApplication")
|
|
If objPDA Is Nothing Then
|
|
MsgBox "PDA.clsApplication (als ActiveX Komponente) ist nicht installiert."
|
|
Else
|
|
Call objPDA.ShowAuftragPosition(strADOConnectionstring, AuftragNr, PositionNr)
|
|
End If
|
|
Else
|
|
MsgBox "Bitte wählen Sie eine Zeile aus"
|
|
End If
|
|
|
|
Errorhandler:
|
|
MsgBox "Fehler " & Err.Number & "in cmdPDA_Cick(): " & Err.Description
|
|
End Sub
|
|
|
|
Private Sub Form_Activate()
|
|
If mblnActivated = False Then
|
|
mblnActivated = True
|
|
|
|
Me.Enabled = False
|
|
lblMessage.caption = mstrMessage
|
|
UpdateGrid
|
|
|
|
If MSFlexGrid1.Rows >= 3 Then
|
|
cmdPDA.Enabled = False
|
|
End If
|
|
|
|
Me.Enabled = True
|
|
|
|
End If
|
|
End Sub
|
|
|
|
Private Sub Form_Load()
|
|
lblHinweis.Visible = False
|
|
End Sub
|
|
|
|
Private Sub Form_QueryUnload(Cancel As Integer, UnloadMode As Integer)
|
|
If UnloadMode = 0 Then Cancel = 1
|
|
End Sub
|
|
|
|
Private Sub Form_Resize()
|
|
On Error Resume Next
|
|
|
|
cmdClose.Left = Me.ScaleWidth - 1.5 * cmdClose.Width
|
|
|
|
cmdClose.Top = Me.ScaleHeight - cmdClose.Height - 50 - StatusBar1.Height
|
|
|
|
cmdPDA.Top = cmdClose.Top
|
|
cmdBefundPrfFertigmelden.Top = cmdClose.Top
|
|
|
|
cmdPDA.Left = cmdClose.Left - cmdPDA.Width * 1.5
|
|
cmdBefundPrfFertigmelden.Left = cmdPDA.Left - cmdBefundPrfFertigmelden.Width * 1.3
|
|
|
|
MSFlexGrid1.Width = Me.ScaleWidth
|
|
MSFlexGrid1.Height = Me.ScaleHeight - MSFlexGrid1.Top - cmdClose.Height - 100 - StatusBar1.Height
|
|
|
|
|
|
ProgressBar1.Left = StatusBar1.Panels(1).Left
|
|
ProgressBar1.Top = StatusBar1.Top - ProgressBar1.Height * 2
|
|
ProgressBar1.ZOrder 0
|
|
End Sub
|
|
|
|
'Public Sub AddZaehler(lngSerienNr As Long)
|
|
' If m_colEinbauplaetze Is Nothing Then
|
|
' Set m_colEinbauplaetze = New Collection
|
|
' End If
|
|
'
|
|
' Dim Einbauplatz As CEinbauplatz
|
|
' Dim Pruefzaehler As CPruefzaehler
|
|
' Set Einbauplatz = New CEinbauplatz
|
|
' Set Pruefzaehler = New CPruefzaehler
|
|
'
|
|
' Pruefzaehler.loadForSerienNr lngSerienNr
|
|
' Einbauplatz.setPruefzaehler Pruefzaehler
|
|
' m_colEinbauplaetze.Add Einbauplatz
|
|
'End Sub
|
|
|
|
Private Sub Form_Unload(Cancel As Integer)
|
|
mblnActivated = False
|
|
End Sub
|
|
|
|
Public Function ProzentsatzDerZuPruefendenZaehler(lngAuftragNr As Long, intPosNr As Integer) As Double
|
|
Dim AuftragPosition As CAuftragPosition
|
|
Dim Auftrag As CAuftrag
|
|
Dim Nummernband As CNummernband
|
|
Dim IdentNrObj As CIdentNr
|
|
|
|
ProzentsatzDerZuPruefendenZaehler = -1
|
|
Set AuftragPosition = New CAuftragPosition
|
|
If AuftragPosition.load(lngAuftragNr, intPosNr) Then
|
|
|
|
Set Auftrag = New CAuftrag
|
|
Auftrag.load AuftragPosition.getAuftragNr, False
|
|
|
|
Set IdentNrObj = New CIdentNr
|
|
If IdentNrObj.load(AuftragPosition.getIdentNr) Then
|
|
|
|
Set Nummernband = New CNummernband
|
|
If Nummernband.loadForKundeTyp(Auftrag.getKunde.getNr, IdentNrObj.getTyp, IdentNrObj.getTypzusatz) Then
|
|
ProzentsatzDerZuPruefendenZaehler = Nummernband.getAnzahlInProzent()
|
|
End If
|
|
End If
|
|
End If
|
|
|
|
End Function
|
|
|
|
Private Sub ShowStatus(strText As String)
|
|
StatusBar1.SimpleText = strText
|
|
DoEvents
|
|
End Sub
|
|
|
|
|
|
Private Sub MSFlexGrid1_Click()
|
|
cmdPDA.Enabled = True
|
|
End Sub
|