Anpassung Auswertung aus Ansicht

This commit is contained in:
ms
2022-01-31 08:21:52 +01:00
parent 1d86aa1bb9
commit 77cc6eec0a
15 changed files with 760 additions and 11 deletions

View File

@@ -1,9 +1,9 @@
<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _
<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()>
Partial Class frmMainV2
Inherits System.Windows.Forms.Form
'Das Formular überschreibt den Löschvorgang, um die Komponentenliste zu bereinigen.
<System.Diagnostics.DebuggerNonUserCode()> _
<System.Diagnostics.DebuggerNonUserCode()>
Protected Overrides Sub Dispose(ByVal disposing As Boolean)
Try
If disposing AndAlso components IsNot Nothing Then
@@ -20,15 +20,20 @@ Partial Class frmMainV2
'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()> _
<System.Diagnostics.DebuggerStepThrough()>
Private Sub InitializeComponent()
Me.components = New System.ComponentModel.Container()
Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(frmMainV2))
Me.PictureBox1 = New System.Windows.Forms.PictureBox()
Me.ContextMenuStrip1 = New System.Windows.Forms.ContextMenuStrip(Me.components)
Me.ChatANAUSToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem()
Me.PanOben = New System.Windows.Forms.Panel()
Me.btnFrachtkosten = New System.Windows.Forms.Button()
Me.btnAuftraege = New System.Windows.Forms.Button()
Me.btnFirmen = New System.Windows.Forms.Button()
Me.PanUnten = New System.Windows.Forms.Panel()
Me.Label20 = New System.Windows.Forms.Label()
Me.picAVISOMessenger = New System.Windows.Forms.PictureBox()
Me.btnSchliessen = New System.Windows.Forms.Button()
Me.lblVersion = New System.Windows.Forms.Label()
Me.btnUpdate = New System.Windows.Forms.Button()
@@ -37,9 +42,12 @@ Partial Class frmMainV2
Me.btnKasse = New System.Windows.Forms.Button()
Me.PanMain = New System.Windows.Forms.Panel()
Me.UidDataSet1 = New DISPO.UIDDataSet()
Me.Timer_Refresh = New System.Windows.Forms.Timer(Me.components)
CType(Me.PictureBox1, System.ComponentModel.ISupportInitialize).BeginInit()
Me.ContextMenuStrip1.SuspendLayout()
Me.PanOben.SuspendLayout()
Me.PanUnten.SuspendLayout()
CType(Me.picAVISOMessenger, System.ComponentModel.ISupportInitialize).BeginInit()
CType(Me.UidDataSet1, System.ComponentModel.ISupportInitialize).BeginInit()
Me.SuspendLayout()
'
@@ -47,12 +55,25 @@ Partial Class frmMainV2
'
Me.PictureBox1.BackgroundImage = Global.DISPO.My.Resources.Resources.dispo
Me.PictureBox1.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Zoom
Me.PictureBox1.ContextMenuStrip = Me.ContextMenuStrip1
Me.PictureBox1.Location = New System.Drawing.Point(3, 3)
Me.PictureBox1.Name = "PictureBox1"
Me.PictureBox1.Size = New System.Drawing.Size(209, 41)
Me.PictureBox1.TabIndex = 14
Me.PictureBox1.TabStop = False
'
'ContextMenuStrip1
'
Me.ContextMenuStrip1.Items.AddRange(New System.Windows.Forms.ToolStripItem() {Me.ChatANAUSToolStripMenuItem})
Me.ContextMenuStrip1.Name = "ContextMenuStrip1"
Me.ContextMenuStrip1.Size = New System.Drawing.Size(147, 26)
'
'ChatANAUSToolStripMenuItem
'
Me.ChatANAUSToolStripMenuItem.Name = "ChatANAUSToolStripMenuItem"
Me.ChatANAUSToolStripMenuItem.Size = New System.Drawing.Size(146, 22)
Me.ChatANAUSToolStripMenuItem.Text = "Chat AN/AUS"
'
'PanOben
'
Me.PanOben.Controls.Add(Me.btnFrachtkosten)
@@ -112,6 +133,8 @@ Partial Class frmMainV2
'
'PanUnten
'
Me.PanUnten.Controls.Add(Me.Label20)
Me.PanUnten.Controls.Add(Me.picAVISOMessenger)
Me.PanUnten.Controls.Add(Me.btnSchliessen)
Me.PanUnten.Controls.Add(Me.lblVersion)
Me.PanUnten.Controls.Add(Me.btnUpdate)
@@ -124,6 +147,33 @@ Partial Class frmMainV2
Me.PanUnten.Size = New System.Drawing.Size(1587, 62)
Me.PanUnten.TabIndex = 16
'
'Label20
'
Me.Label20.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Left), System.Windows.Forms.AnchorStyles)
Me.Label20.BackColor = System.Drawing.Color.Red
Me.Label20.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.Label20.ForeColor = System.Drawing.Color.White
Me.Label20.Location = New System.Drawing.Point(1425, 4)
Me.Label20.Name = "Label20"
Me.Label20.Size = New System.Drawing.Size(28, 19)
Me.Label20.TabIndex = 43
Me.Label20.Text = "99"
Me.Label20.TextAlign = System.Drawing.ContentAlignment.MiddleCenter
Me.Label20.Visible = False
'
'picAVISOMessenger
'
Me.picAVISOMessenger.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Left), System.Windows.Forms.AnchorStyles)
Me.picAVISOMessenger.BackgroundImage = Global.DISPO.My.Resources.Resources.aviso_messenger
Me.picAVISOMessenger.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Zoom
Me.picAVISOMessenger.Cursor = System.Windows.Forms.Cursors.Hand
Me.picAVISOMessenger.Image = Global.DISPO.My.Resources.Resources.aviso_messenger
Me.picAVISOMessenger.Location = New System.Drawing.Point(1394, 4)
Me.picAVISOMessenger.Name = "picAVISOMessenger"
Me.picAVISOMessenger.Size = New System.Drawing.Size(59, 55)
Me.picAVISOMessenger.TabIndex = 42
Me.picAVISOMessenger.TabStop = False
'
'btnSchliessen
'
Me.btnSchliessen.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
@@ -203,6 +253,11 @@ Partial Class frmMainV2
Me.UidDataSet1.DataSetName = "UIDDataSet"
Me.UidDataSet1.SchemaSerializationMode = System.Data.SchemaSerializationMode.IncludeSchema
'
'Timer_Refresh
'
Me.Timer_Refresh.Enabled = True
Me.Timer_Refresh.Interval = 5000
'
'frmMainV2
'
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
@@ -217,9 +272,11 @@ Partial Class frmMainV2
Me.Name = "frmMainV2"
Me.Text = "DISPO"
CType(Me.PictureBox1, System.ComponentModel.ISupportInitialize).EndInit()
Me.ContextMenuStrip1.ResumeLayout(False)
Me.PanOben.ResumeLayout(False)
Me.PanUnten.ResumeLayout(False)
Me.PanUnten.PerformLayout()
CType(Me.picAVISOMessenger, System.ComponentModel.ISupportInitialize).EndInit()
CType(Me.UidDataSet1, System.ComponentModel.ISupportInitialize).EndInit()
Me.ResumeLayout(False)
@@ -239,4 +296,9 @@ Partial Class frmMainV2
Friend WithEvents lblVersion As Label
Friend WithEvents btnSchliessen As Button
Friend WithEvents UidDataSet1 As UIDDataSet
Friend WithEvents picAVISOMessenger As PictureBox
Friend WithEvents Timer_Refresh As Timer
Friend WithEvents Label20 As Label
Friend WithEvents ContextMenuStrip1 As ContextMenuStrip
Friend WithEvents ChatANAUSToolStripMenuItem As ToolStripMenuItem
End Class

View File

@@ -117,6 +117,9 @@
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<metadata name="ContextMenuStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>265, 17</value>
</metadata>
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="btnFrachtkosten.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
@@ -186,6 +189,9 @@
<metadata name="UidDataSet1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
<metadata name="Timer_Refresh.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>137, 17</value>
</metadata>
<data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
AAABAAEAgIAAAAEAGAAoyAAAFgAAACgAAACAAAAAAAEAAAEAGAAAAAAAAMgAAMQOAADEDgAAAAAAAAAA

View File

@@ -1,6 +1,7 @@
Public Class frmMainV2
Private Declare Function GetActiveWindow Lib "user32" Alias "GetActiveWindow" () As IntPtr
Public Shared cUserSettings As New cUsersettings
Private Sub UserPanelSwitcher_Click(sender As Button, e As EventArgs) Handles btnFirmen.Click, btnAuftraege.Click, btnFrachtkosten.Click
btnFirmen.BackColor = Color.White
@@ -46,6 +47,8 @@
Private Sub frmMainV2_Load(sender As Object, e As EventArgs) Handles MyBase.Load
lblVersion.Text = "Version: " & My.Resources.Version
cUserSettings.load()
ShowChat()
btnAuftraege.PerformClick()
End Sub
@@ -57,5 +60,101 @@
frmLogin.UpdateDISPO()
End Sub
Dim Timer_REFRESH_firstTime = True
Private Sub Timer_REFRESH_Tick(sender As Object, e As EventArgs) Handles Timer_Refresh.Tick
If Timer_REFRESH_firstTime Then
Timer_REFRESH_firstTime = False
Exit Sub
End If
Try
If VERAG_PROG_ALLGEMEIN.cAllgemein.MITARBEITER.mit_ChatBenutzer And picAVISOMessenger.Visible Then
Dim newMsg = VERAG_PROG_ALLGEMEIN.cMessenger.GET_NewMSG_COUNT()
' MsgBox(newMsg)
Label20.Text = newMsg
Label20.Visible = (newMsg > 0)
If newMsg Then
' Me.Icon = My.Resources.avisoNewMsg
Dim isshown = False
For Each openForm In Application.OpenForms()
If TypeOf (openForm) Is frmNotify Then
isshown = True
End If
Next
Dim isInFront = False
For Each openForm In Application.OpenForms()
If TypeOf (openForm) Is VERAG_PROG_ALLGEMEIN.frmMessenger Then
' If DirectCast(openForm, VERAG_PROG_ALLGEMEIN.frmMessenger).Focused Then
If GetActiveWindow = DirectCast(openForm, VERAG_PROG_ALLGEMEIN.frmMessenger).Handle Then
isInFront = True
End If
End If
Next
If Not isshown And Not isInFront Then newNotify(frmNotify.cNotify_ART.NEUER_CHAT, 0, "Neue Chat-Nachricht!", -1)
Else
' Me.Icon = My.Resources.Aviso
End If
If Label20.Visible Then Label20.BringToFront()
End If
Catch ex As Exception
End Try
End Sub
Sub newNotify(art As frmNotify.cNotify_ART, title As Integer, text As String, id As Integer)
' Exit Sub 'NICHT AKTIV
Dim formTmp = Me.ActiveForm
Dim frmNotify As New frmNotify(art, title, text, id)
frmNotify.TimerInterval = 1200000 ' 20min
Dim tmpY As Integer = Me.Height
If tmpY <= 0 Then tmpY = My.Computer.Screen.WorkingArea.Height
For Each ft As Form In Application.OpenForms
' MsgBox(ft.GetType.ToString)
If ft.GetType.ToString = "frmNotify" Then
If ft.Location.Y < tmpY Then tmpY = ft.Location.Y
End If
Next
frmNotify.Y = tmpY - frmNotify.Height - 10
frmNotify.Show()
' If formTmp IsNot Nothing Then formTmp.Focus()
End Sub
Private Sub picAVISOMessenger_Click(sender As Object, e As EventArgs) Handles picAVISOMessenger.Click
For Each openForm In Application.OpenForms()
If TypeOf (openForm) Is VERAG_PROG_ALLGEMEIN.frmMessenger Then
CType(openForm, VERAG_PROG_ALLGEMEIN.frmMessenger).WindowState = FormWindowState.Normal
CType(openForm, VERAG_PROG_ALLGEMEIN.frmMessenger).BringToFront()
Exit Sub
End If
Next
Dim f As New VERAG_PROG_ALLGEMEIN.frmMessenger
f.Location = Cursor.Position
f.Show(Me)
End Sub
Private Sub ShowChat()
picAVISOMessenger.Enabled = cUserSettings.ChatEnabled
picAVISOMessenger.Visible = cUserSettings.ChatEnabled
Timer_Refresh.Enabled = cUserSettings.ChatEnabled
End Sub
'Private Sub CheckBox1_CheckedChanged(sender As Object, e As EventArgs)
' cUserSettings.ChatEnabled = CheckBox1.Checked
' picAVISOMessenger.Enabled = CheckBox1.Checked
' picAVISOMessenger.Visible = CheckBox1.Checked
'End Sub
Private Sub ChatANAUSToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles ChatANAUSToolStripMenuItem.Click
cUserSettings.ChatEnabled = Not cUserSettings.ChatEnabled
cUserSettings.save()
ShowChat()
End Sub
End Class

View File

@@ -17,6 +17,21 @@ atr_frachtfab_firma,
atr_frachtf_firma,
atr_Auftragsart,
atr_TransportauftragArt,
Anzahl,
Frächter,
ShortAuftragsart,
(Rechnungen/Anzahl) as Rechnungen,
(Vorkosten/Anzahl) as Vorkosten,
(Marge/Anzahl) as Marge
from (select
atr_frachtpos,
atr_auftr_firma,
atr_ladest_firma,
atr_frachtfab_firma,
atr_frachtf_firma,
atr_Auftragsart,
atr_TransportauftragArt,
count(*) As Anzahl,
case
when atr_TransportauftragArt = 'NACH' then atr_frachtfab_firma
@@ -673,7 +688,7 @@ WHERE " & where & ""
Private Sub btnSuchAuswertung_Click(sender As Object, e As EventArgs) Handles btnSuchAuswertung.Click
Dim frmAus As New frmAuswertung
SQLAuswerungAusAnsicht = Core_SQLAuswertungAusAnsicht & WhereInator3000() & " group by atr_frachtpos, atr_auftr_firma, atr_frachtfAb_firma, atr_frachtf_firma, atr_ladest_firma, atr_Auftragsart, atr_TransportauftragArt--, Anzahl
ORDER BY atr_frachtpos"
) as db1 ORDER BY atr_frachtpos"
frmAus.Niederlassung = returnfil()
frmAus.chkStandard.Checked = False
frmAus.chkAusSuchererg.Checked = True