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

@@ -15,11 +15,11 @@ Public Class UPDATERfrm
Dim F As String = "F:\Programme\DISPO\" ' WDH TERM
Dim F_PROD As String = "\\192.168.0.91\f\Programme\DISPO\" ' VERAG
Dim F_PROD As String = "\\install.verag.ost.dmn\Programme\DISPO\" ' VERAG
' Dim F As String = "\\192.168.0.90\f\Programme\DISPO\" 'DEVELOPER
' Dim F_ATILLA As String = "\\172.16.0.99\Daten\Programme\DISPO\" ' ATILLA
Public Sub Main()
Dim FIRMA = "VERAG"

BIN
LicxGenerator.exe Normal file

Binary file not shown.

View File

@@ -75,7 +75,7 @@
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
</PropertyGroup>
<PropertyGroup>
<ManifestCertificateThumbprint>443CA3745EE904EED98572A89099259301BA06D1</ManifestCertificateThumbprint>
<ManifestCertificateThumbprint>4BDC042C7E79547CFC124EDDCBA8A805E84C6BDB</ManifestCertificateThumbprint>
</PropertyGroup>
<PropertyGroup>
<ManifestKeyFile>
@@ -92,6 +92,10 @@
</PropertyGroup>
<ItemGroup>
<Reference Include="Accessibility" />
<Reference Include="DISPO.exe.GrapeCity.Licenses, Version=12.3.17127.0, Culture=neutral, PublicKeyToken=cc4967777c49a3ff, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>bin\Debug\DISPO.exe.GrapeCity.Licenses.dll</HintPath>
</Reference>
<Reference Include="Dynamsoft.Forms.Viewer, Version=7.0.0.320, Culture=neutral, PublicKeyToken=298ad97013b423eb" />
<Reference Include="Dynamsoft.ImageCore, Version=7.0.0.3020, Culture=neutral, PublicKeyToken=298ad97013b423eb" />
<Reference Include="Dynamsoft.PDF, Version=7.0.0.320, Culture=neutral, PublicKeyToken=298ad97013b423eb" />
@@ -184,9 +188,11 @@
<Compile Include="cDispoAuftraege.vb" />
<Compile Include="cMeineFunktionen.vb" />
<Compile Include="cProgramFunctions.vb" />
<Compile Include="cSQL.vb" />
<Compile Include="cSqlDb.vb" />
<Compile Include="cTripOLD.vb" />
<Compile Include="cTrips.vb" />
<Compile Include="cUsersettings.vb" />
<Compile Include="DataSet1.Designer.vb">
<AutoGen>True</AutoGen>
<DesignTime>True</DesignTime>
@@ -249,6 +255,12 @@
<Compile Include="frmLeer\usrcntlTrips.vb">
<SubType>UserControl</SubType>
</Compile>
<Compile Include="frmNotify.Designer.vb">
<DependentUpon>frmNotify.vb</DependentUpon>
</Compile>
<Compile Include="frmNotify.vb">
<SubType>Form</SubType>
</Compile>
<Compile Include="My Project\Resources.Designer.vb">
<AutoGen>True</AutoGen>
<DesignTime>True</DesignTime>
@@ -500,6 +512,9 @@
<EmbeddedResource Include="frmLeer\usrcntlTrips.resx">
<DependentUpon>usrcntlTrips.vb</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="frmNotify.resx">
<DependentUpon>frmNotify.vb</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Reports\Auswertung\frmAuswertung.resx">
<DependentUpon>frmAuswertung.vb</DependentUpon>
</EmbeddedResource>
@@ -743,6 +758,7 @@
<None Include="Resources\Auftrag30.png" />
<None Include="Resources\Firmen30_2.png" />
<None Include="Resources\Auftrag_30.png" />
<None Include="Resources\aviso_messenger.png" />
<Content Include="Resources\Info.txt" />
<None Include="Resources\lorry_motion.jpg" />
<None Include="Resources\lorry_motion.png" />

View File

@@ -22,7 +22,7 @@ Namespace My.Resources
'''<summary>
''' Eine stark typisierte Ressourcenklasse zum Suchen von lokalisierten Zeichenfolgen usw.
'''</summary>
<Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "16.0.0.0"), _
<Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0"), _
Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute(), _
Global.Microsoft.VisualBasic.HideModuleNameAttribute()> _
@@ -79,6 +79,16 @@ Namespace My.Resources
End Get
End Property
'''<summary>
''' Sucht eine lokalisierte Ressource vom Typ System.Drawing.Bitmap.
'''</summary>
Friend ReadOnly Property aviso_messenger() As System.Drawing.Bitmap
Get
Dim obj As Object = ResourceManager.GetObject("aviso_messenger", resourceCulture)
Return CType(obj,System.Drawing.Bitmap)
End Get
End Property
'''<summary>
''' Sucht eine lokalisierte Ressource vom Typ System.Drawing.Bitmap.
'''</summary>
@@ -424,7 +434,7 @@ Namespace My.Resources
End Property
'''<summary>
''' Sucht eine lokalisierte Zeichenfolge, die 1.0.10.1 ähnelt.
''' Sucht eine lokalisierte Zeichenfolge, die 1.0.10.5 ähnelt.
'''</summary>
Friend ReadOnly Property Version() As String
Get

View File

@@ -155,7 +155,7 @@
<value>..\Resources\uid.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="Version" xml:space="preserve">
<value>1.0.10.1</value>
<value>1.0.10.5</value>
</data>
<data name="del" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\del.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
@@ -228,4 +228,7 @@
<data name="Conn_DBO_Aufträge" xml:space="preserve">
<value>[sqlguide01.verag.ost.dmn].DISPO.dbo.tblAuftraege</value>
</data>
<data name="aviso_messenger" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\aviso_messenger.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
</root>

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

128
UID/cSQL.vb Normal file
View File

@@ -0,0 +1,128 @@
Imports System.Data.SqlClient
Public Class cSQL
Public Shared Sub SQL2DS(ByRef selector As String, ByRef ds As DataSet, Optional ByRef DBConnect As String = "")
If DBConnect = "" Then DBConnect = My.Resources.connStringDISPO
Dim con As New SqlConnection
Dim cmd As New SqlCommand
con.ConnectionString = DBConnect 'My.Resources.connStringDISPO
cmd.Connection = con
Dim dataadapter As New SqlDataAdapter(selector, con)
con.Open()
dataadapter.Fill(ds)
con.Close()
End Sub
Public Shared Sub UpdateSQL(ByRef table As String, ByRef values As String, ByRef where As String, Optional ByRef DBConnect As String = "")
If DBConnect = "" Then DBConnect = My.Resources.connStringDISPO
Dim con As New SqlConnection
Dim cmd As New SqlCommand
con.ConnectionString = DBConnect ' My.Resources.connStringDISPO
cmd.Connection = con
con.Open()
cmd.CommandText = "UPDATE " & table & " SET " & values & " WHERE " & where & ""
cmd.ExecuteNonQuery()
con.Close()
End Sub
Public Shared Sub InsertSQL(ByRef table As String, ByRef insert As String, Optional ByRef DBConnect As String = "")
If DBConnect = "" Then DBConnect = My.Resources.connStringDISPO
Dim con As New SqlConnection
Dim cmd As New SqlCommand
con.ConnectionString = DBConnect ' My.Resources.connStringDISPO
cmd.Connection = con
con.Open()
cmd.CommandText = "INSERT INTO " & table & " " & insert & ""
cmd.ExecuteNonQuery()
con.Close()
End Sub
Public Shared Sub DeleteSQL(ByRef table As String, ByRef where As String, Optional ByRef DBConnect As String = "")
If DBConnect = "" Then DBConnect = My.Resources.connStringDISPO
Dim con As New SqlConnection
Dim cmd As New SqlCommand
con.ConnectionString = DBConnect ' My.Resources.connStringDISPO
cmd.Connection = con
con.Open()
cmd.CommandText = "DELETE FROM " & table & " WHERE " & where & ""
cmd.ExecuteNonQuery()
con.Close()
End Sub
Public Shared Sub SQLCommand(command As String, Optional ByRef DBConnect As String = "")
If DBConnect = "" Then DBConnect = My.Resources.connStringDISPO
Dim con As New SqlConnection
Dim cmd As New SqlCommand
con.ConnectionString = DBConnect ' My.Resources.connStringDISPO
cmd.Connection = con
con.Open()
cmd.CommandText = command
cmd.ExecuteNonQuery()
con.Close()
End Sub
Public Shared Function getUpdateCmd(ByVal list As List(Of SQLVariable), ByVal WhereObject As String, ByRef update As String, ByRef where As String)
' Dim list As List(Of SQLVariable) = getparameterlist()
'Dim str As String
For Each i In list
If Not i.SQLText = WhereObject Then
update &= "[" & i.SQLText & "]='" & i.SQLValue & "',"
Else
where &= WhereObject & " = '" & i.SQLValue & "'"
End If
Next
update = update.Substring(0, update.Length - 1) 'wg. ','
' Return str
End Function
Public Shared Function getInsertCmd(ByVal list As List(Of SQLVariable), ByRef insert As String)
' Dim list As List(Of SQLVariable) = getparameterlist()
Dim text, value As String
For Each i In list
text &= i.SQLText & ", "
value &= "'" & i.SQLValue & "', "
Next
text = text.Substring(0, text.Length - 2)
value = value.Substring(0, value.Length - 2)
insert = "(" & text & ") VALUES (" & value & ")"
End Function
End Class
'Public Class SQLVariable
' Private Text, Value As String
' Private prim As Boolean
' Public Sub New(ByVal btext As String, ByVal bvalue As String, Optional bprim As Boolean = False)
' Me.Value = bvalue
' Me.Text = btext
' End Sub
' Public ReadOnly Property SQLText() As String
' Get
' Return Text
' End Get
' End Property
' Public ReadOnly Property SQLValue() As Object
' Get
' Return Value
' End Get
' End Property
'End Class

45
UID/cUsersettings.vb Normal file
View File

@@ -0,0 +1,45 @@
Imports System.Reflection
Public Class cUsersettings
Property ChatEnabled As Boolean = True
Property Username As String = VERAG_PROG_ALLGEMEIN.cAllgemein.USRKURZNAME
Function GetParaMeterList() As List(Of SQLVariable)
Dim List As New List(Of SQLVariable)
List.Add(New SQLVariable("Username", Username))
List.Add(New SQLVariable("ChatEnabled", ChatEnabled))
Return List
End Function
Function save()
Dim ds As New DataSet
cSQL.SQL2DS("select * from tblUsersettings where Username = '" & Username & "'", ds)
If ds.Tables(0).Rows.Count > 0 Then
Dim update, where As String
cSQL.getUpdateCmd(GetParaMeterList(), "Username", update, where)
cSQL.UpdateSQL("dbo.tblusersettings", update, where)
Else
Dim insert As String
cSQL.getInsertCmd(GetParaMeterList(), insert)
cSQL.InsertSQL("dbo.tblusersettings", insert)
End If
End Function
Function load()
Dim ds As New DataSet
cSQL.SQL2DS("select * from tblUsersettings where Username = '" & Username & "'", ds)
If ds.Tables(0).Rows.Count > 0 Then
For Each c As DataColumn In ds.Tables(0).Columns
Dim propInfo As PropertyInfo = Me.GetType.GetProperty(c.ColumnName)
If propInfo IsNot Nothing Then
If Not IsDBNull(c.Table.Rows(0).Item(c)) Then
propInfo.SetValue(Me, c.Table.Rows(0).Item(c))
End If
End If
Next
End If
End Function
End Class

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

129
UID/frmNotify.Designer.vb generated Normal file
View File

@@ -0,0 +1,129 @@
<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _
Partial Class frmNotify
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()
Me.Timer = New System.Windows.Forms.Timer()
Me.pnl = New System.Windows.Forms.Panel()
Me.lblText = New System.Windows.Forms.Label()
Me.Header = New System.Windows.Forms.Panel()
Me.lblTitle = New System.Windows.Forms.Label()
Me.btnClose = New System.Windows.Forms.Button()
Me.pnl.SuspendLayout()
Me.Header.SuspendLayout()
Me.SuspendLayout()
'
'Timer
'
Me.Timer.Enabled = True
Me.Timer.Interval = 5000
'
'pnl
'
Me.pnl.BackColor = System.Drawing.Color.White
Me.pnl.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle
Me.pnl.Controls.Add(Me.lblText)
Me.pnl.Controls.Add(Me.Header)
Me.pnl.Dock = System.Windows.Forms.DockStyle.Fill
Me.pnl.Location = New System.Drawing.Point(0, 0)
Me.pnl.Name = "pnl"
Me.pnl.Size = New System.Drawing.Size(300, 70)
Me.pnl.TabIndex = 1
'
'lblText
'
Me.lblText.Cursor = System.Windows.Forms.Cursors.Hand
Me.lblText.Dock = System.Windows.Forms.DockStyle.Fill
Me.lblText.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.lblText.Location = New System.Drawing.Point(0, 25)
Me.lblText.Name = "lblText"
Me.lblText.Size = New System.Drawing.Size(298, 43)
Me.lblText.TabIndex = 0
Me.lblText.Text = "Der LKW SD 13 AS steht bereits seit über 2 Stunden! "
Me.lblText.TextAlign = System.Drawing.ContentAlignment.MiddleLeft
'
'Header
'
Me.Header.BackColor = System.Drawing.Color.FromArgb(CType(CType(0, Byte), Integer), CType(CType(54, Byte), Integer), CType(CType(128, Byte), Integer))
Me.Header.Controls.Add(Me.lblTitle)
Me.Header.Controls.Add(Me.btnClose)
Me.Header.Dock = System.Windows.Forms.DockStyle.Top
Me.Header.Location = New System.Drawing.Point(0, 0)
Me.Header.Name = "Header"
Me.Header.Size = New System.Drawing.Size(298, 25)
Me.Header.TabIndex = 87
'
'lblTitle
'
Me.lblTitle.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.lblTitle.ForeColor = System.Drawing.Color.White
Me.lblTitle.Location = New System.Drawing.Point(3, 0)
Me.lblTitle.Name = "lblTitle"
Me.lblTitle.Size = New System.Drawing.Size(241, 24)
Me.lblTitle.TabIndex = 88
Me.lblTitle.Text = "LKW Standzeit Benachrichtigung"
Me.lblTitle.TextAlign = System.Drawing.ContentAlignment.MiddleLeft
'
'btnClose
'
Me.btnClose.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
Me.btnClose.BackColor = System.Drawing.Color.Red
Me.btnClose.FlatAppearance.BorderColor = System.Drawing.Color.White
Me.btnClose.FlatAppearance.BorderSize = 0
Me.btnClose.FlatStyle = System.Windows.Forms.FlatStyle.Flat
Me.btnClose.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.btnClose.ForeColor = System.Drawing.Color.White
Me.btnClose.Location = New System.Drawing.Point(264, -1)
Me.btnClose.Name = "btnClose"
Me.btnClose.RightToLeft = System.Windows.Forms.RightToLeft.Yes
Me.btnClose.Size = New System.Drawing.Size(35, 25)
Me.btnClose.TabIndex = 86
Me.btnClose.Text = "X"
Me.btnClose.UseVisualStyleBackColor = False
'
'frmNotify
'
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
Me.AutoSize = True
Me.ClientSize = New System.Drawing.Size(300, 70)
Me.Controls.Add(Me.pnl)
Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None
Me.MaximumSize = New System.Drawing.Size(300, 300)
Me.MinimumSize = New System.Drawing.Size(100, 70)
Me.Name = "frmNotify"
Me.ShowIcon = False
Me.ShowInTaskbar = False
Me.Text = "frmNotify"
Me.TopMost = True
Me.pnl.ResumeLayout(False)
Me.Header.ResumeLayout(False)
Me.ResumeLayout(False)
End Sub
Friend WithEvents Timer As System.Windows.Forms.Timer
Friend WithEvents pnl As System.Windows.Forms.Panel
Friend WithEvents btnClose As System.Windows.Forms.Button
Friend WithEvents Header As System.Windows.Forms.Panel
Public WithEvents lblText As System.Windows.Forms.Label
Public WithEvents lblTitle As System.Windows.Forms.Label
End Class

123
UID/frmNotify.resx Normal file
View File

@@ -0,0 +1,123 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<metadata name="Timer.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
</root>

113
UID/frmNotify.vb Normal file
View File

@@ -0,0 +1,113 @@
Public Class frmNotify
Public Y As Integer = 0
Public AvisoID As Integer = 0
Public TimerInterval = 5000
Public Notify_ART As cNotify_ART
Enum cNotify_ART
AVISO_2H
NEUER_CHAT
End Enum
Protected Overrides ReadOnly Property ShowWithoutActivation() As Boolean
Get
Return True
End Get
End Property
Sub New(title As String, text As String)
Me.InitializeComponent()
Me.lblTitle.Text = title
Me.lblText.Text = text
End Sub
Sub New(art As cNotify_ART, typ As Integer, text As String, Optional id As Integer = -1)
Me.InitializeComponent()
Me.Notify_ART = art
Select Case Notify_ART
Case cNotify_ART.AVISO_2H
Me.AvisoID = id
Select Case typ
Case 1
Me.lblTitle.Text = "LKW Standzeit Benachrichtigung"
Me.lblText.Text = "Der LKW '" & text & "' ist vor über 2 Stunden eingetroffen."
Case 2
Me.lblTitle.Text = "LKW Standzeit - Vermerk eintragen"
Me.lblText.Text = "Der LKW '" & text & "' ist vor über 2 Stunden eingetroffen." &
"Bitte VERMERK eintragen!"
Case 3
Me.lblTitle.Text = "LKW Standzeit Benachrichtigung"
Me.lblText.Text = "Der LKW '" & text & "' steht bereits über 24 Stunden!"
Me.Header.BackColor = Color.Red
End Select
Case cNotify_ART.NEUER_CHAT
Me.lblTitle.Text = "CHAT Nachricht"
Me.lblText.Text = text
End Select
End Sub
Private Sub Timer_Tick(sender As Object, e As EventArgs) Handles Timer.Tick
Me.Close()
End Sub
Private Sub btnClose_Click(sender As Object, e As EventArgs) Handles btnClose.Click
Me.Close()
End Sub
Private Sub frmNotify_Load(sender As Object, e As EventArgs) Handles Me.Load
Timer.Interval = TimerInterval
lblText.Cursor = IIf(AvisoID > 0, Cursors.Hand, Cursors.Default)
'If Y = 0 Then
'Me.Location = New Point(Me.Owner.Width - Me.Width - 10, Me.Owner.Height - Me.Height - 10)
' Else
' Me.Location = New Point(Me.Owner.Width - Me.Width - 10, Y)
' End If
Dim WIDTH = Screen.FromRectangle(Me.Bounds).WorkingArea.Size.Width
Dim hEIGHT = Screen.FromRectangle(Me.Bounds).WorkingArea.Size.Width
'RECHTS UNTEN:
'If Y = 0 Then
' Me.Location = New Point(WIDTH - Me.Width - 10, hEIGHT - Me.Height - 10)
'Else
' Me.Location = New Point(WIDTH - Me.Width - 10, Y)
'End If
If Y = 0 Then
Me.Location = New Point(10, hEIGHT - Me.Height - 10)
Else
Me.Location = New Point(10, Y)
End If
End Sub
Private Sub lblText_Click(sender As Object, e As EventArgs) Handles lblText.Click
Select Case Notify_ART
Case cNotify_ART.AVISO_2H
' frmMain.Details_anzeigen(AvisoID)
Me.Close()
Case cNotify_ART.NEUER_CHAT
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.Close()
End Select
End Sub
End Class