This commit is contained in:
2020-03-12 14:48:24 +01:00
parent e879fb6881
commit afaac3c2a4
107 changed files with 16055 additions and 3324 deletions

View File

@@ -47,6 +47,8 @@ Partial Class usrctStatistik
Me.Label12 = New System.Windows.Forms.Label()
Me.Label10 = New System.Windows.Forms.Label()
Me.Panel6 = New System.Windows.Forms.Panel()
Me.Label17 = New System.Windows.Forms.Label()
Me.cboFirma = New System.Windows.Forms.ComboBox()
Me.Label15 = New System.Windows.Forms.Label()
Me.cboArt = New System.Windows.Forms.ComboBox()
Me.Label13 = New System.Windows.Forms.Label()
@@ -60,7 +62,9 @@ Partial Class usrctStatistik
Me.txtdatBis = New System.Windows.Forms.DateTimePicker()
Me.Label14 = New System.Windows.Forms.Label()
Me.Panel7 = New System.Windows.Forms.Panel()
Me.Label21 = New System.Windows.Forms.Label()
Me.Label16 = New System.Windows.Forms.Label()
Me.cboFirma2 = New System.Windows.Forms.ComboBox()
Me.ComboBox1 = New System.Windows.Forms.ComboBox()
Me.Label18 = New System.Windows.Forms.Label()
Me.Button4 = New System.Windows.Forms.Button()
@@ -70,10 +74,6 @@ Partial Class usrctStatistik
Me.DateTimePicker1 = New System.Windows.Forms.DateTimePicker()
Me.DateTimePicker2 = New System.Windows.Forms.DateTimePicker()
Me.Label20 = New System.Windows.Forms.Label()
Me.Label17 = New System.Windows.Forms.Label()
Me.cboFirma = New System.Windows.Forms.ComboBox()
Me.Label21 = New System.Windows.Forms.Label()
Me.cboFirma2 = New System.Windows.Forms.ComboBox()
Me.Panel1.SuspendLayout()
Me.Panel2.SuspendLayout()
Me.Panel3.SuspendLayout()
@@ -333,6 +333,25 @@ Partial Class usrctStatistik
Me.Panel6.Size = New System.Drawing.Size(701, 237)
Me.Panel6.TabIndex = 21
'
'Label17
'
Me.Label17.AutoSize = True
Me.Label17.Location = New System.Drawing.Point(197, 5)
Me.Label17.Name = "Label17"
Me.Label17.Size = New System.Drawing.Size(35, 13)
Me.Label17.TabIndex = 26
Me.Label17.Text = "Firma:"
'
'cboFirma
'
Me.cboFirma.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList
Me.cboFirma.FormattingEnabled = True
Me.cboFirma.Items.AddRange(New Object() {"VERAG", "ATILLA", "IMEX", "UNISPED"})
Me.cboFirma.Location = New System.Drawing.Point(236, 2)
Me.cboFirma.Name = "cboFirma"
Me.cboFirma.Size = New System.Drawing.Size(69, 21)
Me.cboFirma.TabIndex = 25
'
'Label15
'
Me.Label15.AutoSize = True
@@ -346,7 +365,7 @@ Partial Class usrctStatistik
'
Me.cboArt.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList
Me.cboArt.FormattingEnabled = True
Me.cboArt.Items.AddRange(New Object() {"Ankunft", "Freigabe"})
Me.cboArt.Items.AddRange(New Object() {"Ankunft", "Freigabe", "AvisoEingang"})
Me.cboArt.Location = New System.Drawing.Point(423, 2)
Me.cboArt.Name = "cboArt"
Me.cboArt.Size = New System.Drawing.Size(69, 21)
@@ -459,6 +478,15 @@ Partial Class usrctStatistik
Me.Panel7.Size = New System.Drawing.Size(701, 237)
Me.Panel7.TabIndex = 25
'
'Label21
'
Me.Label21.AutoSize = True
Me.Label21.Location = New System.Drawing.Point(197, 5)
Me.Label21.Name = "Label21"
Me.Label21.Size = New System.Drawing.Size(35, 13)
Me.Label21.TabIndex = 28
Me.Label21.Text = "Firma:"
'
'Label16
'
Me.Label16.AutoSize = True
@@ -468,11 +496,21 @@ Partial Class usrctStatistik
Me.Label16.TabIndex = 24
Me.Label16.Text = "Art:"
'
'cboFirma2
'
Me.cboFirma2.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList
Me.cboFirma2.FormattingEnabled = True
Me.cboFirma2.Items.AddRange(New Object() {"VERAG", "ATILLA", "IMEX", "UNISPED"})
Me.cboFirma2.Location = New System.Drawing.Point(236, 2)
Me.cboFirma2.Name = "cboFirma2"
Me.cboFirma2.Size = New System.Drawing.Size(69, 21)
Me.cboFirma2.TabIndex = 27
'
'ComboBox1
'
Me.ComboBox1.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList
Me.ComboBox1.FormattingEnabled = True
Me.ComboBox1.Items.AddRange(New Object() {"Ankunft", "Freigabe"})
Me.ComboBox1.Items.AddRange(New Object() {"Ankunft", "Freigabe", "AvisoEingang"})
Me.ComboBox1.Location = New System.Drawing.Point(423, 2)
Me.ComboBox1.Name = "ComboBox1"
Me.ComboBox1.Size = New System.Drawing.Size(69, 21)
@@ -547,44 +585,6 @@ Partial Class usrctStatistik
Me.Label20.TabIndex = 14
Me.Label20.Text = "Tagesauswertung:"
'
'Label17
'
Me.Label17.AutoSize = True
Me.Label17.Location = New System.Drawing.Point(197, 5)
Me.Label17.Name = "Label17"
Me.Label17.Size = New System.Drawing.Size(35, 13)
Me.Label17.TabIndex = 26
Me.Label17.Text = "Firma:"
'
'cboFirma
'
Me.cboFirma.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList
Me.cboFirma.FormattingEnabled = True
Me.cboFirma.Items.AddRange(New Object() {"VERAG", "ATILLA", "IMEX"})
Me.cboFirma.Location = New System.Drawing.Point(236, 2)
Me.cboFirma.Name = "cboFirma"
Me.cboFirma.Size = New System.Drawing.Size(69, 21)
Me.cboFirma.TabIndex = 25
'
'Label21
'
Me.Label21.AutoSize = True
Me.Label21.Location = New System.Drawing.Point(197, 5)
Me.Label21.Name = "Label21"
Me.Label21.Size = New System.Drawing.Size(35, 13)
Me.Label21.TabIndex = 28
Me.Label21.Text = "Firma:"
'
'cboFirma2
'
Me.cboFirma2.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList
Me.cboFirma2.FormattingEnabled = True
Me.cboFirma2.Items.AddRange(New Object() {"VERAG", "ATILLA", "IMEX"})
Me.cboFirma2.Location = New System.Drawing.Point(236, 2)
Me.cboFirma2.Name = "cboFirma2"
Me.cboFirma2.Size = New System.Drawing.Size(69, 21)
Me.cboFirma2.TabIndex = 27
'
'usrctStatistik
'
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)

View File

@@ -17,8 +17,8 @@ Public Class usrctStatistik
cboArt.SelectedIndex = 0
End Sub
Private Sub Panel1_Paint(sender As Object, e As PaintEventArgs) Handles Panel1.Paint
Dim g As Graphics = e.Graphics
Private Sub Button2_Click(sender As Object, e As EventArgs) Handles Button2.Click
Dim g As Graphics = Panel1.CreateGraphics
g.Clear(Color.FromArgb(245, 245, 245))
Dim p As Panel = DirectCast(sender, Panel)
'Jahre:
@@ -81,11 +81,11 @@ Public Class usrctStatistik
Next
End Sub
Sub changeYear(sender As Object, e As EventArgs)
year = CInt(DirectCast(sender, Button).Text)
Panel1_Paint(Panel1, New PaintEventArgs(Panel1.CreateGraphics, Panel1.ClientRectangle))
' Panel1_Paint(Panel1, New PaintEventArgs(Panel1.CreateGraphics, Panel1.ClientRectangle))
End Sub
Function CoordRectangle(w As Integer, h As Integer, x0 As Integer, y0 As Integer, x As Integer, y As Integer) As Rectangle
' MsgBox(" x0: " & x0 & " y0: " & CStr(h - y0 - y) & " x: " & x & " y: " & y)
@@ -96,12 +96,12 @@ Public Class usrctStatistik
End Function
Private Sub txtAuswJahrDauer_TextChanged(sender As Object, e As EventArgs)
Panel1_Paint(Panel1, New PaintEventArgs(Panel1.CreateGraphics, Panel1.ClientRectangle))
' Panel1_Paint(Panel1, New PaintEventArgs(Panel1.CreateGraphics, Panel1.ClientRectangle))
End Sub
Private Sub AuswertungWoToag(sender As Object, e As EventArgs) Handles Button11.Click, cboTag.SelectedIndexChanged
Private Sub AuswertungWoToag(sender As Object, e As EventArgs) Handles Button11.Click ', cboTag.SelectedIndexChanged
Dim s(17, 2) As String
Dim t As String = Button11.Text
Dim datVon As Date = CDate(txtdatVon.Value)
@@ -115,6 +115,7 @@ Public Class usrctStatistik
Dim art = ""
If cboArt.SelectedIndex = 0 Then art = "Ankunft"
If cboArt.SelectedIndex = 1 Then art = "Freigabe"
If cboArt.SelectedIndex = 2 Then art = "AvisoEingang"
For i = 6 To 22
Dim cnt As Integer = 0
@@ -194,47 +195,91 @@ Public Class usrctStatistik
Private Sub AuswertungWoToag2(sender As Object, e As EventArgs) Handles Button5.Click ', cboTag.SelectedIndexChanged
Exit Sub
Dim s(17, 2) As String
'Exit Sub
Dim s(7, 2) As String
Dim s_Weekdays() As String = {"SO", "MO", "DI", "MI", "DO", "FR", "SA"}
Dim t As String = Button5.Text
Dim datVon As Date = CDate(txtdatVon.Value)
Dim datBis As Date = CDate(txtdatBis.Value)
Dim datVon As Date = CDate(DateTimePicker1.Value)
Dim datBis As Date = CDate(DateTimePicker2.Value)
Dim TESTgesLKWs = 0
Dim TESTgesLKWs2 = 0
Dim SQLstat As New StatDB
Dim c As Integer = 0
' Dim c As Integer = 0
Dim art = ""
If cboArt.SelectedIndex = 0 Then art = "Ankunft"
If cboArt.SelectedIndex = 1 Then art = "Freigabe"
If cboArt.SelectedIndex = 1 Then art = "Erfasst" 'asdasdasd
For i = 0 To 6
If ComboBox1.SelectedIndex = 0 Then art = "Ankunft"
If ComboBox1.SelectedIndex = 1 Then art = "Freigabe"
'If ComboBox1.SelectedIndex = 2 Then art = "Erfasst" 'asdasdasd
If ComboBox1.SelectedIndex = 2 Then art = "AvisoEingang" 'asdasdasd
For i = 1 To 7
Dim c = CInt(i.ToString.Replace("7", "0")) 'Sonntag
Dim cnt As Integer = 0
Dim gesLKWs As Integer = 0
Dim datTmp As Date = datVon
While datTmp <= datBis
If datTmp.DayOfWeek = cboTag.SelectedIndex Then
gesLKWs += SQLstat.getAnzahlLkwAnkunft(art, datTmp, i, cboFirma2.Text)
If datTmp.DayOfWeek = i Then
gesLKWs += SQLstat.getAnzahlLkwAnkunft(art, datTmp, cboFirma2.Text)
cnt += 1
End If
datTmp = datTmp.AddDays(1)
End While
s(c, 0) = i & ":00"
s((i - 1), 0) = s_Weekdays(c)
If gesLKWs > 0 And cnt > 0 Then
s(c, 1) = CStr(CInt(gesLKWs / cnt))
s((i - 1), 1) = CStr(CInt(gesLKWs / cnt))
Else
s(c, 1) = CStr(0)
s((i - 1), 1) = CStr(0)
End If
c += 1
' c += 1
Next
StatAuswertungWoToag(s)
StatAuswertungWo(s)
Button5.Text = t
End Sub
Private Sub StatAuswertungWo(s(,) As String) 'Handles Panel1.Paint
Dim g As Graphics = Panel8.CreateGraphics
g.Clear(Color.FromArgb(245, 245, 245))
Dim p As Panel = Panel8
'Jahre:
Dim topbound = 10
Dim y0 As Integer = 0
Dim x0 As Integer = 0
Dim yMax As Integer = p.Height - 50
Dim xMax As Integer = p.Width
Dim h As Integer = p.Height
Dim w As Integer = p.Width
' MsgBox(s(i, 0) & " - " & s(i, 1))
Dim sMax As Long = getMax(s)
Dim xLeftBound As Integer = 0
For i = 0 To s.GetUpperBound(0) - 1
Dim hoehe = 0
If sMax > 0 Then hoehe = CInt(yMax * (CLng(s(i, 1)) * 100 / sMax) / 100)
' MsgBox(hoehe)
' g.FillRectangle(Brushes.Red, New Rectangle(x0 + xLeftBound, y0, 20, hoehe))
g.FillRectangle(Brushes.Red, CoordRectangle(w, h, x0 + xLeftBound, y0 + 20, 20, hoehe))
g.DrawString(CInt(s(i, 1)).ToString, p.Font, Brushes.Black, CoordPoint(h, x0 + xLeftBound, 20 + hoehe + 15))
g.DrawString(CStr(s(i, 0)).ToString, p.Font, Brushes.Black, CoordPoint(h, x0 + xLeftBound, 15))
xLeftBound += 60
Next
End Sub
Private Sub Button12_Click(sender As Object, e As EventArgs) Handles Button12.Click
Dim i As Image = cProgramFunctions.TakeScreenShot(Panel5)
@@ -259,4 +304,7 @@ Public Class usrctStatistik
i.Save(s, Drawing.Imaging.ImageFormat.Png)
End Sub
End Class

View File

@@ -22,8 +22,8 @@ Partial Class usrctlAuswertung
'Das Bearbeiten mit dem Code-Editor ist nicht möglich.
<System.Diagnostics.DebuggerStepThrough()> _
Private Sub InitializeComponent()
Dim DataGridViewCellStyle3 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
Dim DataGridViewCellStyle4 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
Dim DataGridViewCellStyle5 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
Dim DataGridViewCellStyle6 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
Me.TabControl1 = New System.Windows.Forms.TabControl()
Me.TabPage1 = New System.Windows.Forms.TabPage()
Me.DataGridView1 = New System.Windows.Forms.DataGridView()
@@ -49,7 +49,6 @@ Partial Class usrctlAuswertung
Me.Label9 = New System.Windows.Forms.Label()
Me.Label1 = New System.Windows.Forms.Label()
Me.Panel2 = New System.Windows.Forms.Panel()
Me.Button2 = New System.Windows.Forms.Button()
Me.Button1 = New System.Windows.Forms.Button()
Me.TabPage2 = New System.Windows.Forms.TabPage()
Me.Panel1 = New System.Windows.Forms.Panel()
@@ -154,8 +153,8 @@ Partial Class usrctlAuswertung
'
'DataGridView1
'
DataGridViewCellStyle3.BackColor = System.Drawing.Color.Azure
Me.DataGridView1.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle3
DataGridViewCellStyle5.BackColor = System.Drawing.Color.Azure
Me.DataGridView1.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle5
Me.DataGridView1.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize
Me.DataGridView1.Dock = System.Windows.Forms.DockStyle.Fill
Me.DataGridView1.Location = New System.Drawing.Point(3, 61)
@@ -370,7 +369,6 @@ Partial Class usrctlAuswertung
'
'Panel2
'
Me.Panel2.Controls.Add(Me.Button2)
Me.Panel2.Controls.Add(Me.Button1)
Me.Panel2.Dock = System.Windows.Forms.DockStyle.Right
Me.Panel2.Location = New System.Drawing.Point(1021, 3)
@@ -378,24 +376,18 @@ Partial Class usrctlAuswertung
Me.Panel2.Size = New System.Drawing.Size(106, 533)
Me.Panel2.TabIndex = 1
'
'Button2
'
Me.Button2.FlatStyle = System.Windows.Forms.FlatStyle.Flat
Me.Button2.Location = New System.Drawing.Point(11, 56)
Me.Button2.Name = "Button2"
Me.Button2.Size = New System.Drawing.Size(85, 47)
Me.Button2.TabIndex = 0
Me.Button2.Text = "Button1"
Me.Button2.UseVisualStyleBackColor = True
'
'Button1
'
Me.Button1.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Center
Me.Button1.FlatStyle = System.Windows.Forms.FlatStyle.Flat
Me.Button1.Image = Global.AVISO.My.Resources.Resources.Excel_2013_logo_155x110
Me.Button1.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft
Me.Button1.Location = New System.Drawing.Point(11, 3)
Me.Button1.Name = "Button1"
Me.Button1.Size = New System.Drawing.Size(85, 47)
Me.Button1.TabIndex = 0
Me.Button1.Text = "Button1"
Me.Button1.Text = "Excel"
Me.Button1.TextAlign = System.Drawing.ContentAlignment.MiddleRight
Me.Button1.UseVisualStyleBackColor = True
'
'TabPage2
@@ -1052,8 +1044,8 @@ Partial Class usrctlAuswertung
'
'DataGridView2
'
DataGridViewCellStyle4.BackColor = System.Drawing.Color.Azure
Me.DataGridView2.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle4
DataGridViewCellStyle6.BackColor = System.Drawing.Color.Azure
Me.DataGridView2.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle6
Me.DataGridView2.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize
Me.DataGridView2.Dock = System.Windows.Forms.DockStyle.Fill
Me.DataGridView2.Location = New System.Drawing.Point(3, 3)
@@ -1097,7 +1089,6 @@ Partial Class usrctlAuswertung
Friend WithEvents DataGridView1 As System.Windows.Forms.DataGridView
Friend WithEvents TabPage2 As System.Windows.Forms.TabPage
Friend WithEvents Panel2 As System.Windows.Forms.Panel
Friend WithEvents Button2 As System.Windows.Forms.Button
Friend WithEvents Button1 As System.Windows.Forms.Button
Friend WithEvents Panel1 As System.Windows.Forms.Panel
Friend WithEvents Button3 As System.Windows.Forms.Button

View File

@@ -459,4 +459,9 @@ Public Class usrctlAuswertung
Private Sub cboFirmaIntern_SelectedIndexChanged(sender As Object, e As EventArgs) Handles cboFirmaIntern.SelectedIndexChanged, cboGrenzstelle.SelectedIndexChanged
showFirmen()
End Sub
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
SDL.cProgramFunctions.genExcelFromDT_NEW(DataGridView1.DataSource)
End Sub
End Class