This commit is contained in:
2022-12-25 10:09:49 +01:00
commit 406d053e79
3903 changed files with 2127541 additions and 0 deletions

262
EDOKA/DokDAMD/DOKSA/frmSA.designer.vb generated Normal file
View File

@@ -0,0 +1,262 @@
<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _
Partial Class frmSA
Inherits System.Windows.Forms.Form
'Das Formular überschreibt den Löschvorgang, um die Komponentenliste zu bereinigen.
<System.Diagnostics.DebuggerNonUserCode()> _
Protected Overrides Sub Dispose(ByVal disposing As Boolean)
Try
If disposing AndAlso components IsNot Nothing Then
components.Dispose()
End If
Finally
MyBase.Dispose(disposing)
End Try
End Sub
'Wird vom Windows Form-Designer benötigt.
Private components As System.ComponentModel.IContainer
'Hinweis: Die folgende Prozedur ist für den Windows Form-Designer erforderlich.
'Das Bearbeiten ist mit dem Windows Form-Designer möglich.
'Das Bearbeiten mit dem Code-Editor ist nicht möglich.
<System.Diagnostics.DebuggerStepThrough()> _
Private Sub InitializeComponent()
Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(frmSA))
Me.Panel1 = New System.Windows.Forms.Panel()
Me.DTBis = New System.Windows.Forms.DateTimePicker()
Me.Dtvon = New System.Windows.Forms.DateTimePicker()
Me.Label5 = New System.Windows.Forms.Label()
Me.Label4 = New System.Windows.Forms.Label()
Me.Button3 = New System.Windows.Forms.Button()
Me.Button2 = New System.Windows.Forms.Button()
Me.Button1 = New System.Windows.Forms.Button()
Me.txtJahrbis = New System.Windows.Forms.TextBox()
Me.Label3 = New System.Windows.Forms.Label()
Me.txtJahrvon = New System.Windows.Forms.TextBox()
Me.Label2 = New System.Windows.Forms.Label()
Me.txtBPNr = New System.Windows.Forms.TextBox()
Me.Label1 = New System.Windows.Forms.Label()
Me.ToolStrip1 = New System.Windows.Forms.ToolStrip()
Me.ToolStripButton1 = New System.Windows.Forms.ToolStripButton()
Me.DokList = New C1.Win.C1TrueDBGrid.C1TrueDBGrid()
Me.Panel1.SuspendLayout()
Me.ToolStrip1.SuspendLayout()
CType(Me.DokList, System.ComponentModel.ISupportInitialize).BeginInit()
Me.SuspendLayout()
'
'Panel1
'
Me.Panel1.Controls.Add(Me.DTBis)
Me.Panel1.Controls.Add(Me.Dtvon)
Me.Panel1.Controls.Add(Me.Label5)
Me.Panel1.Controls.Add(Me.Label4)
Me.Panel1.Controls.Add(Me.Button3)
Me.Panel1.Controls.Add(Me.Button2)
Me.Panel1.Controls.Add(Me.Button1)
Me.Panel1.Controls.Add(Me.txtJahrbis)
Me.Panel1.Controls.Add(Me.Label3)
Me.Panel1.Controls.Add(Me.txtJahrvon)
Me.Panel1.Controls.Add(Me.Label2)
Me.Panel1.Controls.Add(Me.txtBPNr)
Me.Panel1.Controls.Add(Me.Label1)
Me.Panel1.Dock = System.Windows.Forms.DockStyle.Top
Me.Panel1.Location = New System.Drawing.Point(0, 25)
Me.Panel1.Name = "Panel1"
Me.Panel1.Size = New System.Drawing.Size(859, 84)
Me.Panel1.TabIndex = 1
'
'DTBis
'
Me.DTBis.Format = System.Windows.Forms.DateTimePickerFormat.[Short]
Me.DTBis.Location = New System.Drawing.Point(95, 61)
Me.DTBis.Name = "DTBis"
Me.DTBis.Size = New System.Drawing.Size(110, 20)
Me.DTBis.TabIndex = 12
'
'Dtvon
'
Me.Dtvon.Format = System.Windows.Forms.DateTimePickerFormat.[Short]
Me.Dtvon.Location = New System.Drawing.Point(95, 35)
Me.Dtvon.Name = "Dtvon"
Me.Dtvon.Size = New System.Drawing.Size(110, 20)
Me.Dtvon.TabIndex = 11
'
'Label5
'
Me.Label5.AutoSize = True
Me.Label5.Location = New System.Drawing.Point(368, 13)
Me.Label5.Name = "Label5"
Me.Label5.Size = New System.Drawing.Size(0, 13)
Me.Label5.TabIndex = 10
Me.Label5.Tag = "[Kein Partner ausgwählt]"
'
'Label4
'
Me.Label4.AutoSize = True
Me.Label4.Location = New System.Drawing.Point(217, 13)
Me.Label4.Name = "Label4"
Me.Label4.Size = New System.Drawing.Size(92, 13)
Me.Label4.TabIndex = 9
Me.Label4.Text = "Kurzbezeichnung:"
'
'Button3
'
Me.Button3.Image = CType(resources.GetObject("Button3.Image"), System.Drawing.Image)
Me.Button3.Location = New System.Drawing.Point(190, 8)
Me.Button3.Name = "Button3"
Me.Button3.Size = New System.Drawing.Size(21, 21)
Me.Button3.TabIndex = 8
Me.Button3.UseVisualStyleBackColor = True
'
'Button2
'
Me.Button2.Enabled = False
Me.Button2.Location = New System.Drawing.Point(728, 38)
Me.Button2.Name = "Button2"
Me.Button2.Size = New System.Drawing.Size(107, 23)
Me.Button2.TabIndex = 7
Me.Button2.Text = "Daten aufbereiten"
Me.Button2.UseVisualStyleBackColor = True
'
'Button1
'
Me.Button1.Enabled = False
Me.Button1.Location = New System.Drawing.Point(728, 8)
Me.Button1.Name = "Button1"
Me.Button1.Size = New System.Drawing.Size(107, 23)
Me.Button1.TabIndex = 6
Me.Button1.Text = "Daten auselsen"
Me.Button1.UseVisualStyleBackColor = True
'
'txtJahrbis
'
Me.txtJahrbis.Location = New System.Drawing.Point(394, 61)
Me.txtJahrbis.Name = "txtJahrbis"
Me.txtJahrbis.Size = New System.Drawing.Size(54, 20)
Me.txtJahrbis.TabIndex = 5
Me.txtJahrbis.Text = "2011"
Me.txtJahrbis.Visible = False
'
'Label3
'
Me.Label3.AutoSize = True
Me.Label3.Location = New System.Drawing.Point(13, 64)
Me.Label3.Name = "Label3"
Me.Label3.Size = New System.Drawing.Size(54, 13)
Me.Label3.TabIndex = 4
Me.Label3.Text = "Datum bis"
'
'txtJahrvon
'
Me.txtJahrvon.Location = New System.Drawing.Point(403, 35)
Me.txtJahrvon.Name = "txtJahrvon"
Me.txtJahrvon.Size = New System.Drawing.Size(54, 20)
Me.txtJahrvon.TabIndex = 3
Me.txtJahrvon.Text = "2002"
Me.txtJahrvon.Visible = False
'
'Label2
'
Me.Label2.AutoSize = True
Me.Label2.Location = New System.Drawing.Point(13, 38)
Me.Label2.Name = "Label2"
Me.Label2.Size = New System.Drawing.Size(59, 13)
Me.Label2.TabIndex = 2
Me.Label2.Text = "Datum von"
'
'txtBPNr
'
Me.txtBPNr.Location = New System.Drawing.Point(95, 9)
Me.txtBPNr.Name = "txtBPNr"
Me.txtBPNr.Size = New System.Drawing.Size(100, 20)
Me.txtBPNr.TabIndex = 1
'
'Label1
'
Me.Label1.AutoSize = True
Me.Label1.Location = New System.Drawing.Point(13, 12)
Me.Label1.Name = "Label1"
Me.Label1.Size = New System.Drawing.Size(50, 13)
Me.Label1.TabIndex = 0
Me.Label1.Text = "Partnernr"
'
'ToolStrip1
'
Me.ToolStrip1.Items.AddRange(New System.Windows.Forms.ToolStripItem() {Me.ToolStripButton1})
Me.ToolStrip1.Location = New System.Drawing.Point(0, 0)
Me.ToolStrip1.Name = "ToolStrip1"
Me.ToolStrip1.Size = New System.Drawing.Size(859, 25)
Me.ToolStrip1.TabIndex = 12
Me.ToolStrip1.Text = "ToolStrip1"
'
'ToolStripButton1
'
Me.ToolStripButton1.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image
Me.ToolStripButton1.Image = CType(resources.GetObject("ToolStripButton1.Image"), System.Drawing.Image)
Me.ToolStripButton1.ImageTransparentColor = System.Drawing.Color.Magenta
Me.ToolStripButton1.Name = "ToolStripButton1"
Me.ToolStripButton1.Size = New System.Drawing.Size(23, 22)
Me.ToolStripButton1.Text = "Fenster schliessen"
'
'DokList
'
Me.DokList.AllowUpdateOnBlur = False
Me.DokList.AlternatingRows = True
Me.DokList.Cursor = System.Windows.Forms.Cursors.Default
Me.DokList.Dock = System.Windows.Forms.DockStyle.Fill
Me.DokList.FetchRowStyles = True
Me.DokList.FilterBar = True
Me.DokList.GroupByCaption = "Drag a column header here to group by that column"
Me.DokList.Images.Add(CType(resources.GetObject("DokList.Images"), System.Drawing.Image))
Me.DokList.Location = New System.Drawing.Point(0, 109)
Me.DokList.Name = "DokList"
Me.DokList.PreviewInfo.Location = New System.Drawing.Point(0, 0)
Me.DokList.PreviewInfo.Size = New System.Drawing.Size(0, 0)
Me.DokList.PreviewInfo.ZoomFactor = 75.0R
Me.DokList.PrintInfo.PageSettings = CType(resources.GetObject("DokList.PrintInfo.PageSettings"), System.Drawing.Printing.PageSettings)
Me.DokList.ScrollTips = True
Me.DokList.Size = New System.Drawing.Size(859, 239)
Me.DokList.TabIndex = 27
Me.DokList.Text = "C1TrueDBGrid1"
Me.DokList.PropBag = resources.GetString("DokList.PropBag")
'
'frmSA
'
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
Me.ClientSize = New System.Drawing.Size(859, 348)
Me.Controls.Add(Me.DokList)
Me.Controls.Add(Me.Panel1)
Me.Controls.Add(Me.ToolStrip1)
Me.Icon = CType(resources.GetObject("$this.Icon"), System.Drawing.Icon)
Me.Name = "frmSA"
Me.Text = "Dokumentaufbereitung"
Me.Panel1.ResumeLayout(False)
Me.Panel1.PerformLayout()
Me.ToolStrip1.ResumeLayout(False)
Me.ToolStrip1.PerformLayout()
CType(Me.DokList, System.ComponentModel.ISupportInitialize).EndInit()
Me.ResumeLayout(False)
Me.PerformLayout()
End Sub
Friend WithEvents Panel1 As System.Windows.Forms.Panel
Friend WithEvents txtJahrbis As System.Windows.Forms.TextBox
Friend WithEvents Label3 As System.Windows.Forms.Label
Friend WithEvents txtJahrvon As System.Windows.Forms.TextBox
Friend WithEvents Label2 As System.Windows.Forms.Label
Friend WithEvents txtBPNr As System.Windows.Forms.TextBox
Friend WithEvents Label1 As System.Windows.Forms.Label
Friend WithEvents Button2 As System.Windows.Forms.Button
Friend WithEvents Button1 As System.Windows.Forms.Button
Friend WithEvents Button3 As System.Windows.Forms.Button
Friend WithEvents Label5 As System.Windows.Forms.Label
Friend WithEvents Label4 As System.Windows.Forms.Label
Friend WithEvents ToolStrip1 As System.Windows.Forms.ToolStrip
Friend WithEvents ToolStripButton1 As System.Windows.Forms.ToolStripButton
Friend WithEvents DokList As C1.Win.C1TrueDBGrid.C1TrueDBGrid
Friend WithEvents DTBis As System.Windows.Forms.DateTimePicker
Friend WithEvents Dtvon As System.Windows.Forms.DateTimePicker
End Class

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,202 @@
Imports System.Data
Imports System.Data.SqlTypes
Imports System.Data.SqlClient
Imports System.ComponentModel
Imports System.Drawing
Imports System.Drawing.Color
Imports System.IO
Imports System.Threading
Imports System.Windows.Forms
Public Class frmSA
Dim Partnernr As String
Dim PartnerKurzbezeichnung As String
Dim Packagegroesse As String
Dim DelayTime As String
Private Sub BeendenToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
Me.Close()
End Sub
Private Function Generic_Select() As DataTable
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
Dim dbconn As New SqlConnection(Globals.sConnectionString)
scmCmdToExecute.Connection = dbconn
scmCmdToExecute.CommandText = "sp_selbstanzeigen"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
Dim jvon As DateTime
Dim jbis As DateTime
jvon = Me.Dtvon.Value
jbis = Me.DTBis.Value
'If Trim(Me.txtJahrvon.Text) = "" Then jvon = 0 Else jvon = Me.txtJahrvon.Text
'If Trim(Me.txtJahrbis.Text) = "" Then jbis = 0 Else jbis = Me.txtJahrbis.Text
scmCmdToExecute.Parameters.Add(New SqlParameter("@bpnr", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, Me.txtBPNr.Text))
scmCmdToExecute.Parameters.Add(New SqlParameter("@dvon", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, jvon))
scmCmdToExecute.Parameters.Add(New SqlParameter("@dbis", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, jbis))
scmCmdToExecute.CommandType = CommandType.StoredProcedure
Dim dtToReturn As DataTable = New DataTable()
Dim sdaAdapter As SqlDataAdapter = New SqlDataAdapter(scmCmdToExecute)
Try
sdaAdapter.Fill(dtToReturn)
Return dtToReturn
Catch ex As Exception
Throw New Exception("Dokumenterstellung::Generic_Select::" & scmCmdToExecute.CommandText & "::Error occured." & ex.Message, ex)
Finally
scmCmdToExecute.Dispose()
sdaAdapter.Dispose()
End Try
End Function
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Try
Dim dt As New DataTable
dt = Generic_Select()
Me.DokList.DataSource = Nothing
Me.DokList.DataSource = dt
Me.DokList.DataMember = dt.TableName
Me.Button2.Enabled = True
Catch ex As Exception
MsgBox(ex.Message)
Me.Button2.Enabled = False
End Try
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
Partnernr = Me.txtBPNr.Text
PartnerKurzbezeichnung = Me.Label5.Text
Dim gendokCold As New Collection()
Dim gendokOffice As New Collection
Dim i As Integer
Dim colRows As C1.Win.C1TrueDBGrid.SelectedRowCollection
colRows = Me.DokList.SelectedRows
If colRows.Count = 0 Then
For i = 0 To Me.DokList.Splits(0).Rows.Count - 1
colRows.Add(i)
Next
End If
'Wenn mehr als ein Dokument selektiert ist dann Meldung zum Fragen anzeigen
If colRows.Count > 1 Then
If MsgBox("Alle markierten Dokumente (" + LTrim(Str(colRows.Count)) + ") drucken?", MsgBoxStyle.YesNo) = MsgBoxResult.No Then
Exit Sub
End If
End If
Me.Cursor = Cursors.WaitCursor
Dim packagenr As Integer
packagenr = CInt(Math.Truncate(colRows.Count / Packagegroesse))
packagenr = packagenr + 1
Dim f As New FrmDokMDSA_Fortschritt
f.MdiParent = Me.MdiParent
f.Show()
f.ProgressBar1.Value = 0
f.ProgressBar1.Maximum = packagenr
'Loop über die Selektierten Dokumente und die Werte je nach Typ in eine Collection abspeichern
Dim RowCunter As Integer = 0
For i = 0 To colRows.Count - 1
Try
'Host Daten abfüllen
gendokCold.Add(New clsMehrfachdruck_Data(Me.DokList.Columns("dokumentid").CellValue(colRows(i)), _
Me.DokList.Columns("partnernr_inhaber").CellValue(colRows(i)), clsMehrfachdruck_Data.Enum_Typ.HOST, False, _
Me.DokList.Columns("dokumenttypnr").CellValue(colRows(i)), "", _
Me.DokList.Columns("partnername_inhaber").CellValue(colRows(i)), _
Me.DokList.Columns("valutadatum").CellValue(colRows(i))))
RowCunter = RowCunter + 1
Exit Try
Catch ex As Exception
End Try
If RowCunter > Packagegroesse - 1 Then
f.ProgressBar1.Value = f.ProgressBar1.Value + 1
f.Label5.Text = "Druckauftrag " + f.ProgressBar1.Value.ToString + " von " + f.ProgressBar1.Maximum.ToString
f.Label5.Text = f.Label5.Text + " - " + DelayTime.ToString + " Sekunden Wartezeit"
Application.DoEvents()
f.Refresh()
f.BringToFront()
f.Refresh()
RowCunter = 0
fMehrfachdruck.DruckAnfrage(gendokCold, gendokOffice)
f.Refresh()
Application.DoEvents()
gendokCold.Clear()
Application.DoEvents()
f.Refresh()
Dim t1 As DateTime
Dim t2 As DateTime
Threading.Thread.CurrentThread.Sleep(DelayTime * 1000)
gendokCold.Clear()
End If
Next
Try
If gendokCold.Count > 0 Then fMehrfachdruck.DruckAnfrage(gendokCold, gendokOffice)
Application.DoEvents()
Catch ex As Exception
Finally
Me.Cursor = Cursors.Default
End Try
f.Close()
f.Dispose()
End Sub
Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
Dim f As New FrmPartnersuche
f.ShowDialog()
If f.PartnerNr <> 0 Then
Me.txtBPNr.Text = f.PartnerNr
Update_BP()
End If
End Sub
Private Sub txtBPNr_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles txtBPNr.KeyDown
If e.KeyCode = Keys.Enter Then
Update_BP()
End If
End Sub
Private Sub txtBPNr_Leave(ByVal sender As Object, ByVal e As System.EventArgs) Handles txtBPNr.Leave
Update_BP()
End Sub
Private Sub Update_BP()
Try
If Me.txtBPNr.Text = "" Then Exit Sub
Dim f As New FrmPartnersuche
f.Partner_Suche(Me.txtBPNr.Text)
If f.PartnerKurzbezeichnnung = "" Then
MsgBox("Eingegebener Parter ist nicht vorhanden", MsgBoxStyle.Critical)
Me.Label5.Text = "[Kein Partner ausgwählt]"
Me.Button1.Enabled = False
Me.Button2.Enabled = False
Else
Me.Label5.Text = f.PartnerKurzbezeichnnung
Me.Button1.Enabled = True
Me.Button2.Enabled = False
End If
Catch
End Try
End Sub
Private Sub ToolStripButton1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ToolStripButton1.Click
Me.Close()
End Sub
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Me.Packagegroesse = DivFnkt.Get_Office_2010_Param(33)
Me.DelayTime = DivFnkt.Get_Office_2010_Param(34)
Me.Dtvon.Value = DivFnkt.Get_Office_2010_Param(35)
Me.DTBis.Value = DivFnkt.Get_Office_2010_Param(36)
End Sub
Private Sub txtBPNr_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles txtBPNr.TextChanged
End Sub
End Class