Initial
This commit is contained in:
362
EDOKA/Report/frmMetaDatenSelector.vb
Normal file
362
EDOKA/Report/frmMetaDatenSelector.vb
Normal file
@@ -0,0 +1,362 @@
|
||||
Public Class frmMetaDatenSelector
|
||||
Inherits System.Windows.Forms.Form
|
||||
|
||||
#Region " Vom Windows Form Designer generierter Code "
|
||||
|
||||
Public Sub New()
|
||||
MyBase.New()
|
||||
|
||||
' Dieser Aufruf ist für den Windows Form-Designer erforderlich.
|
||||
InitializeComponent()
|
||||
|
||||
' Initialisierungen nach dem Aufruf InitializeComponent() hinzufügen
|
||||
|
||||
End Sub
|
||||
|
||||
' Die Form überschreibt den Löschvorgang der Basisklasse, um Komponenten zu bereinigen.
|
||||
Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean)
|
||||
If disposing Then
|
||||
If Not (components Is Nothing) Then
|
||||
components.Dispose()
|
||||
End If
|
||||
End If
|
||||
MyBase.Dispose(disposing)
|
||||
End Sub
|
||||
|
||||
' Für Windows Form-Designer erforderlich
|
||||
Private components As System.ComponentModel.IContainer
|
||||
|
||||
'HINWEIS: Die folgende Prozedur ist für den Windows Form-Designer erforderlich
|
||||
'Sie kann mit dem Windows Form-Designer modifiziert werden.
|
||||
'Verwenden Sie nicht den Code-Editor zur Bearbeitung.
|
||||
Friend WithEvents GroupBox1 As System.Windows.Forms.GroupBox
|
||||
Friend WithEvents btnDrucken As System.Windows.Forms.Button
|
||||
Friend WithEvents btnAbbrechen As System.Windows.Forms.Button
|
||||
Friend WithEvents cbxNotizen As System.Windows.Forms.CheckBox
|
||||
Friend WithEvents cbxDokStatus As System.Windows.Forms.CheckBox
|
||||
Friend WithEvents cbxAllg As System.Windows.Forms.CheckBox
|
||||
Friend WithEvents cbxDokZuordnung As System.Windows.Forms.CheckBox
|
||||
Friend WithEvents cbxDokWerte As System.Windows.Forms.CheckBox
|
||||
Friend WithEvents cbxInfomeldung As System.Windows.Forms.CheckBox
|
||||
Friend WithEvents cbxBerEinschr As System.Windows.Forms.CheckBox
|
||||
Friend WithEvents cbxErsetzteDok As System.Windows.Forms.CheckBox
|
||||
Friend WithEvents btnSelectAll As System.Windows.Forms.Button
|
||||
<System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()
|
||||
Dim resources As System.Resources.ResourceManager = New System.Resources.ResourceManager(GetType(frmMetaDatenSelector))
|
||||
Me.GroupBox1 = New System.Windows.Forms.GroupBox()
|
||||
Me.cbxErsetzteDok = New System.Windows.Forms.CheckBox()
|
||||
Me.cbxInfomeldung = New System.Windows.Forms.CheckBox()
|
||||
Me.cbxDokWerte = New System.Windows.Forms.CheckBox()
|
||||
Me.cbxDokZuordnung = New System.Windows.Forms.CheckBox()
|
||||
Me.cbxAllg = New System.Windows.Forms.CheckBox()
|
||||
Me.cbxDokStatus = New System.Windows.Forms.CheckBox()
|
||||
Me.cbxNotizen = New System.Windows.Forms.CheckBox()
|
||||
Me.cbxBerEinschr = New System.Windows.Forms.CheckBox()
|
||||
Me.btnDrucken = New System.Windows.Forms.Button()
|
||||
Me.btnAbbrechen = New System.Windows.Forms.Button()
|
||||
Me.btnSelectAll = New System.Windows.Forms.Button()
|
||||
Me.GroupBox1.SuspendLayout()
|
||||
Me.SuspendLayout()
|
||||
'
|
||||
'GroupBox1
|
||||
'
|
||||
Me.GroupBox1.Controls.AddRange(New System.Windows.Forms.Control() {Me.cbxErsetzteDok, Me.cbxInfomeldung, Me.cbxDokWerte, Me.cbxDokZuordnung, Me.cbxAllg, Me.cbxDokStatus, Me.cbxNotizen, Me.cbxBerEinschr})
|
||||
Me.GroupBox1.Location = New System.Drawing.Point(16, 16)
|
||||
Me.GroupBox1.Name = "GroupBox1"
|
||||
Me.GroupBox1.Size = New System.Drawing.Size(392, 136)
|
||||
Me.GroupBox1.TabIndex = 0
|
||||
Me.GroupBox1.TabStop = False
|
||||
Me.GroupBox1.Text = "Selektion"
|
||||
'
|
||||
'cbxErsetzteDok
|
||||
'
|
||||
Me.cbxErsetzteDok.Location = New System.Drawing.Point(200, 96)
|
||||
Me.cbxErsetzteDok.Name = "cbxErsetzteDok"
|
||||
Me.cbxErsetzteDok.Size = New System.Drawing.Size(176, 24)
|
||||
Me.cbxErsetzteDok.TabIndex = 7
|
||||
Me.cbxErsetzteDok.Text = "Ersetzte Dokumente"
|
||||
'
|
||||
'cbxInfomeldung
|
||||
'
|
||||
Me.cbxInfomeldung.Location = New System.Drawing.Point(200, 48)
|
||||
Me.cbxInfomeldung.Name = "cbxInfomeldung"
|
||||
Me.cbxInfomeldung.Size = New System.Drawing.Size(144, 24)
|
||||
Me.cbxInfomeldung.TabIndex = 5
|
||||
Me.cbxInfomeldung.Text = "Informationsmeldungen"
|
||||
'
|
||||
'cbxDokWerte
|
||||
'
|
||||
Me.cbxDokWerte.Location = New System.Drawing.Point(16, 72)
|
||||
Me.cbxDokWerte.Name = "cbxDokWerte"
|
||||
Me.cbxDokWerte.Size = New System.Drawing.Size(144, 24)
|
||||
Me.cbxDokWerte.TabIndex = 2
|
||||
Me.cbxDokWerte.Text = "Dokumentwerte"
|
||||
'
|
||||
'cbxDokZuordnung
|
||||
'
|
||||
Me.cbxDokZuordnung.Location = New System.Drawing.Point(16, 96)
|
||||
Me.cbxDokZuordnung.Name = "cbxDokZuordnung"
|
||||
Me.cbxDokZuordnung.Size = New System.Drawing.Size(144, 24)
|
||||
Me.cbxDokZuordnung.TabIndex = 3
|
||||
Me.cbxDokZuordnung.Text = "Dokumentzuordnungen"
|
||||
'
|
||||
'cbxAllg
|
||||
'
|
||||
Me.cbxAllg.Location = New System.Drawing.Point(16, 24)
|
||||
Me.cbxAllg.Name = "cbxAllg"
|
||||
Me.cbxAllg.Size = New System.Drawing.Size(96, 24)
|
||||
Me.cbxAllg.TabIndex = 0
|
||||
Me.cbxAllg.Text = "Allgemein"
|
||||
'
|
||||
'cbxDokStatus
|
||||
'
|
||||
Me.cbxDokStatus.Location = New System.Drawing.Point(16, 48)
|
||||
Me.cbxDokStatus.Name = "cbxDokStatus"
|
||||
Me.cbxDokStatus.Size = New System.Drawing.Size(112, 24)
|
||||
Me.cbxDokStatus.TabIndex = 1
|
||||
Me.cbxDokStatus.Text = "Dokumentstatus"
|
||||
'
|
||||
'cbxNotizen
|
||||
'
|
||||
Me.cbxNotizen.Location = New System.Drawing.Point(200, 24)
|
||||
Me.cbxNotizen.Name = "cbxNotizen"
|
||||
Me.cbxNotizen.TabIndex = 4
|
||||
Me.cbxNotizen.Text = "Notizen"
|
||||
'
|
||||
'cbxBerEinschr
|
||||
'
|
||||
Me.cbxBerEinschr.Location = New System.Drawing.Point(200, 72)
|
||||
Me.cbxBerEinschr.Name = "cbxBerEinschr"
|
||||
Me.cbxBerEinschr.Size = New System.Drawing.Size(184, 24)
|
||||
Me.cbxBerEinschr.TabIndex = 6
|
||||
Me.cbxBerEinschr.Text = "Berechtigungseinschränkungen"
|
||||
'
|
||||
'btnDrucken
|
||||
'
|
||||
Me.btnDrucken.DialogResult = System.Windows.Forms.DialogResult.OK
|
||||
Me.btnDrucken.Location = New System.Drawing.Point(336, 160)
|
||||
Me.btnDrucken.Name = "btnDrucken"
|
||||
Me.btnDrucken.TabIndex = 9
|
||||
Me.btnDrucken.Text = "Drucken"
|
||||
'
|
||||
'btnAbbrechen
|
||||
'
|
||||
Me.btnAbbrechen.DialogResult = System.Windows.Forms.DialogResult.Abort
|
||||
Me.btnAbbrechen.Location = New System.Drawing.Point(256, 160)
|
||||
Me.btnAbbrechen.Name = "btnAbbrechen"
|
||||
Me.btnAbbrechen.TabIndex = 8
|
||||
Me.btnAbbrechen.Text = "Abbrechen"
|
||||
'
|
||||
'btnSelectAll
|
||||
'
|
||||
Me.btnSelectAll.Location = New System.Drawing.Point(16, 160)
|
||||
Me.btnSelectAll.Name = "btnSelectAll"
|
||||
Me.btnSelectAll.Size = New System.Drawing.Size(88, 23)
|
||||
Me.btnSelectAll.TabIndex = 10
|
||||
Me.btnSelectAll.Text = "Alle auswählen"
|
||||
'
|
||||
'frmMetaDatenSelector
|
||||
'
|
||||
Me.AutoScaleBaseSize = New System.Drawing.Size(5, 13)
|
||||
Me.ClientSize = New System.Drawing.Size(424, 189)
|
||||
Me.Controls.AddRange(New System.Windows.Forms.Control() {Me.btnSelectAll, Me.btnAbbrechen, Me.btnDrucken, Me.GroupBox1})
|
||||
Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog
|
||||
Me.Icon = CType(resources.GetObject("$this.Icon"), System.Drawing.Icon)
|
||||
Me.Name = "frmMetaDatenSelector"
|
||||
Me.Text = "Dokumentinformationen drucken"
|
||||
Me.GroupBox1.ResumeLayout(False)
|
||||
Me.ResumeLayout(False)
|
||||
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
|
||||
#Region "Deklarationen"
|
||||
|
||||
Dim m_DokumentID As String
|
||||
Dim m_DruckParameter As String = ""
|
||||
|
||||
Property Prop_DokumentID() As String
|
||||
Get
|
||||
Return m_DokumentID
|
||||
End Get
|
||||
Set(ByVal Value As String)
|
||||
m_DokumentID = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Property Prop_DruckParameter() As String
|
||||
Get
|
||||
Return m_DruckParameter
|
||||
End Get
|
||||
Set(ByVal Value As String)
|
||||
m_DruckParameter = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
#End Region
|
||||
|
||||
Private Sub frmMetaDatenSelector_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub btnDrucken_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnDrucken.Click
|
||||
Try
|
||||
Dim s As String
|
||||
s = "0;"
|
||||
'Allgemeine Informationen
|
||||
If cbxAllg.Checked = True Then
|
||||
s = s + "1;"
|
||||
End If
|
||||
'Dokument Status
|
||||
If cbxDokStatus.Checked = True Then
|
||||
s = s + "2;"
|
||||
End If
|
||||
'Notizen
|
||||
If cbxNotizen.Checked = True Then
|
||||
s = s + "3;"
|
||||
End If
|
||||
'Dokument Zuordnungen
|
||||
If cbxDokZuordnung.Checked = True Then
|
||||
s = s + "4;"
|
||||
End If
|
||||
'Dokument Werte
|
||||
If cbxDokWerte.Checked = True Then
|
||||
s = s + "5;"
|
||||
End If
|
||||
'Informationsmeldungen
|
||||
If cbxInfomeldung.Checked = True Then
|
||||
s = s + "6;"
|
||||
End If
|
||||
'Berechtigungsaeinschränkung
|
||||
If cbxBerEinschr.Checked = True Then
|
||||
s = s + "7;"
|
||||
End If
|
||||
'Ersetzte Dokumente
|
||||
If cbxErsetzteDok.Checked = True Then
|
||||
s = s + "8;"
|
||||
End If
|
||||
m_DruckParameter = s
|
||||
Me.Close()
|
||||
'genReport(s)
|
||||
Catch ex As Exception
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
Private Sub btnAbbrechen_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnAbbrechen.Click
|
||||
Me.Close()
|
||||
End Sub
|
||||
|
||||
Public Function genReport(ByVal sMetDataOption As String, ByVal parentform As Form)
|
||||
|
||||
Try
|
||||
Dim r As New Reporting20.EDOKA_Reporting(Globals.Applikationsdaten.Rows(Globals.AppldataRow).Item("user_report").ToString, _
|
||||
Globals.Applikationsdaten.Rows(Globals.AppldataRow).Item("passwort_report").ToString, _
|
||||
Globals.Applikationsdaten.Rows(Globals.AppldataRow).Item("report_server").ToString, _
|
||||
Globals.Applikationsdaten.Rows(Globals.AppldataRow).Item("report_db").ToString)
|
||||
|
||||
|
||||
Dim Dokument_Temp As String
|
||||
Dim sReportBezNAme As String
|
||||
Dim reportNr As Integer
|
||||
Dim sReportname As String
|
||||
sReportBezNAme = "Metadaten Report"
|
||||
sReportname = "MetaDataReport.rpt"
|
||||
reportNr = 20
|
||||
|
||||
Dim objReport As New edokadb.clsReporting_Dokumenttyp()
|
||||
Dokument_Temp = CType(Globals.Applikationsdaten.Rows(Globals.AppldataRow).Item("pfad_temporaer_dokumente"), String)
|
||||
objReport.Get_DocumentFrom_DB("reportNr", reportNr, "report", "reportfile", Dokument_Temp, sReportname)
|
||||
objReport = Nothing
|
||||
|
||||
r.ShowMetaDataReport(Globals.Applikationsdaten.Rows(Globals.AppldataRow).Item("pfad_temporaer_dokumente").ToString, _
|
||||
"MetaDataReport.rpt", _
|
||||
"@MANr=" + Str(Globals.MitarbeiterNr) + "&@MetDataOption=" + sMetDataOption + "&@OfficeDokID=" + m_DokumentID, "Metadaten Report", parentform)
|
||||
|
||||
|
||||
Catch ex As Exception
|
||||
MsgBox(ex.Message)
|
||||
End Try
|
||||
|
||||
'Me.Cursor = Cursors.WaitCursor
|
||||
'Dim f As New frmReportViewer()
|
||||
'Dim objReport As New edokadb.clsReporting_Dokumenttyp()
|
||||
'Dim ParameterCollection As New Collection()
|
||||
'Dim Dokument_Temp As String
|
||||
'Dim sReportBezNAme As String
|
||||
'Dim reportNr As Integer
|
||||
'Dim sReportname As String
|
||||
'sReportBezNAme = "Metadaten Report"
|
||||
'sReportname = "MetaDataReport.rpt"
|
||||
'reportNr = 20
|
||||
|
||||
''=======================================
|
||||
''Dokument Speichern
|
||||
''=======================================
|
||||
'Dokument_Temp = CType(Globals.Applikationsdaten.Rows(Globals.AppldataRow).Item("pfad_temporaer_dokumente"), String)
|
||||
'objReport.Get_DocumentFrom_DB("reportNr", reportNr, "report", "reportfile", Dokument_Temp, sReportname)
|
||||
'objReport = Nothing
|
||||
'f.WindowTitel = sReportBezNAme
|
||||
''ParameterCollection = FillParameterCollection(sMetDataOption)
|
||||
|
||||
'If Not f.show_reportWithParameter(sReportname, "@MANr=" + Str(Globals.MitarbeiterNr) + "&@MetDataOption=" + sMetDataOption + "&@OfficeDokID=" + m_DokumentID) Then
|
||||
' If MyMsg.Show_MessageYesNo(217) Then
|
||||
' Exit Function
|
||||
' End If
|
||||
'End If
|
||||
|
||||
'Try
|
||||
' 'f.crviewer.Visible = True
|
||||
' f.Show()
|
||||
'Catch ex As Exception
|
||||
' Me.Cursor = Cursors.Default
|
||||
' MsgBox(ex.Message)
|
||||
'End Try
|
||||
'Me.Cursor = Cursors.Default
|
||||
End Function
|
||||
|
||||
Private Function FillParameterCollection(ByVal sMetDataOption As String) As Collection
|
||||
Dim colParameter As New Microsoft.VisualBasic.Collection()
|
||||
Dim iCnt As Integer
|
||||
Dim sParameterKey As String
|
||||
Dim sParameterValue As String
|
||||
Dim sFilterDisplayValue As String
|
||||
Try
|
||||
sParameterKey = "@MANr"
|
||||
Debug.Write(sParameterKey & vbCrLf)
|
||||
sParameterValue = Globals.MitarbeiterNr
|
||||
Debug.Write(sParameterKey & vbTab & sParameterValue & vbCrLf)
|
||||
colParameter.Add(Item:=sParameterValue, Key:=sParameterKey)
|
||||
|
||||
sParameterKey = "@MetDataOption"
|
||||
Debug.Write(sParameterKey & vbCrLf)
|
||||
sParameterValue = sMetDataOption
|
||||
Debug.Write(sParameterKey & vbTab & sParameterValue & vbCrLf)
|
||||
colParameter.Add(Item:=sParameterValue, Key:=sParameterKey)
|
||||
|
||||
sParameterKey = "@OfficeDokID"
|
||||
Debug.Write(sParameterKey & vbCrLf)
|
||||
sParameterValue = m_DokumentID
|
||||
Debug.Write(sParameterKey & vbTab & sParameterValue & vbCrLf)
|
||||
colParameter.Add(Item:=sParameterValue, Key:=sParameterKey)
|
||||
|
||||
|
||||
FillParameterCollection = colParameter
|
||||
Catch ex As Exception
|
||||
MsgBox(ex.Message)
|
||||
End Try
|
||||
|
||||
End Function
|
||||
|
||||
Private Sub btnSelectAll_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnSelectAll.Click
|
||||
Me.cbxAllg.Checked = True
|
||||
Me.cbxBerEinschr.Checked = True
|
||||
Me.cbxDokStatus.Checked = True
|
||||
Me.cbxDokWerte.Checked = True
|
||||
Me.cbxDokZuordnung.Checked = True
|
||||
Me.cbxErsetzteDok.Checked = True
|
||||
Me.cbxInfomeldung.Checked = True
|
||||
Me.cbxNotizen.Checked = True
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
Reference in New Issue
Block a user