diff --git a/Aviso/Auswertung/usrctlStatVERIMEX.Designer.vb b/Aviso/Auswertung/usrctlStatVERIMEX.Designer.vb index 1753df0..2213fc4 100644 --- a/Aviso/Auswertung/usrctlStatVERIMEX.Designer.vb +++ b/Aviso/Auswertung/usrctlStatVERIMEX.Designer.vb @@ -25,6 +25,8 @@ Partial Class usrctlStatVERIMEX Me.Panel3 = New System.Windows.Forms.Panel() Me.Label9 = New System.Windows.Forms.Label() Me.Panel4 = New System.Windows.Forms.Panel() + Me.Label1 = New System.Windows.Forms.Label() + Me.cboFirma = New VERAG_PROG_ALLGEMEIN.MyComboBox() Me.Button2 = New System.Windows.Forms.Button() Me.dgvAbklaerungTR = New System.Windows.Forms.DataGridView() Me.Label10 = New System.Windows.Forms.Label() @@ -32,6 +34,7 @@ Partial Class usrctlStatVERIMEX Me.Button1 = New System.Windows.Forms.Button() Me.datStatBis = New System.Windows.Forms.DateTimePicker() Me.datStatVon = New System.Windows.Forms.DateTimePicker() + Me.Button3 = New System.Windows.Forms.Button() Me.Panel3.SuspendLayout() Me.Panel4.SuspendLayout() CType(Me.dgvAbklaerungTR, System.ComponentModel.ISupportInitialize).BeginInit() @@ -41,106 +44,153 @@ Partial Class usrctlStatVERIMEX ' Me.Panel3.Controls.Add(Me.Label9) Me.Panel3.Controls.Add(Me.Panel4) - Me.Panel3.Location = New System.Drawing.Point(15, 17) + Me.Panel3.Controls.Add(Me.Button2) + Me.Panel3.Controls.Add(Me.Button1) + Me.Panel3.Location = New System.Drawing.Point(22, 26) + Me.Panel3.Margin = New System.Windows.Forms.Padding(4, 5, 4, 5) Me.Panel3.Name = "Panel3" - Me.Panel3.Size = New System.Drawing.Size(701, 398) - Me.Panel3.TabIndex = 15 + Me.Panel3.Size = New System.Drawing.Size(1052, 651) + Me.Panel3.TabIndex = 0 ' 'Label9 ' Me.Label9.AutoSize = True Me.Label9.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) - Me.Label9.Location = New System.Drawing.Point(3, 8) + Me.Label9.Location = New System.Drawing.Point(4, 12) + Me.Label9.Margin = New System.Windows.Forms.Padding(4, 0, 4, 0) Me.Label9.Name = "Label9" - Me.Label9.Size = New System.Drawing.Size(139, 13) - Me.Label9.TabIndex = 18 + Me.Label9.Size = New System.Drawing.Size(204, 20) + Me.Label9.TabIndex = 0 Me.Label9.Text = "Sendungserfassung TR" ' 'Panel4 ' Me.Panel4.BackColor = System.Drawing.Color.WhiteSmoke - Me.Panel4.Controls.Add(Me.Button2) + Me.Panel4.Controls.Add(Me.Button3) + Me.Panel4.Controls.Add(Me.Label1) + Me.Panel4.Controls.Add(Me.cboFirma) Me.Panel4.Controls.Add(Me.dgvAbklaerungTR) Me.Panel4.Controls.Add(Me.Label10) Me.Panel4.Controls.Add(Me.Label6) - Me.Panel4.Controls.Add(Me.Button1) Me.Panel4.Controls.Add(Me.datStatBis) Me.Panel4.Controls.Add(Me.datStatVon) - Me.Panel4.Location = New System.Drawing.Point(3, 24) + Me.Panel4.Location = New System.Drawing.Point(4, 37) + Me.Panel4.Margin = New System.Windows.Forms.Padding(4, 5, 4, 5) Me.Panel4.Name = "Panel4" - Me.Panel4.Size = New System.Drawing.Size(670, 359) - Me.Panel4.TabIndex = 15 + Me.Panel4.Size = New System.Drawing.Size(1005, 552) + Me.Panel4.TabIndex = 1 + ' + 'Label1 + ' + Me.Label1.AutoSize = True + Me.Label1.Location = New System.Drawing.Point(519, 20) + Me.Label1.Margin = New System.Windows.Forms.Padding(4, 0, 4, 0) + Me.Label1.Name = "Label1" + Me.Label1.Size = New System.Drawing.Size(53, 20) + Me.Label1.TabIndex = 0 + Me.Label1.Text = "Firma:" + ' + 'cboFirma + ' + Me.cboFirma._allowedValuesFreiText = Nothing + Me.cboFirma._allowFreiText = False + Me.cboFirma._value = "" + Me.cboFirma.FormattingEnabled = True + Me.cboFirma.Location = New System.Drawing.Point(579, 17) + Me.cboFirma.Name = "cboFirma" + Me.cboFirma.Size = New System.Drawing.Size(164, 28) + Me.cboFirma.TabIndex = 5 ' 'Button2 ' Me.Button2.FlatStyle = System.Windows.Forms.FlatStyle.Flat - Me.Button2.Location = New System.Drawing.Point(592, 11) + Me.Button2.Location = New System.Drawing.Point(897, 599) + Me.Button2.Margin = New System.Windows.Forms.Padding(4, 5, 4, 5) Me.Button2.Name = "Button2" - Me.Button2.Size = New System.Drawing.Size(75, 23) - Me.Button2.TabIndex = 20 + Me.Button2.Size = New System.Drawing.Size(112, 35) + Me.Button2.TabIndex = 3 Me.Button2.Text = "Bericht" Me.Button2.UseVisualStyleBackColor = True ' 'dgvAbklaerungTR ' Me.dgvAbklaerungTR.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize - Me.dgvAbklaerungTR.Location = New System.Drawing.Point(6, 38) + Me.dgvAbklaerungTR.Location = New System.Drawing.Point(9, 58) + Me.dgvAbklaerungTR.Margin = New System.Windows.Forms.Padding(4, 5, 4, 5) Me.dgvAbklaerungTR.Name = "dgvAbklaerungTR" - Me.dgvAbklaerungTR.Size = New System.Drawing.Size(661, 318) - Me.dgvAbklaerungTR.TabIndex = 19 + Me.dgvAbklaerungTR.RowHeadersWidth = 62 + Me.dgvAbklaerungTR.Size = New System.Drawing.Size(992, 489) + Me.dgvAbklaerungTR.TabIndex = 7 ' 'Label10 ' Me.Label10.AutoSize = True - Me.Label10.Location = New System.Drawing.Point(181, 17) + Me.Label10.Location = New System.Drawing.Point(269, 23) + Me.Label10.Margin = New System.Windows.Forms.Padding(4, 0, 4, 0) Me.Label10.Name = "Label10" - Me.Label10.Size = New System.Drawing.Size(10, 13) - Me.Label10.TabIndex = 18 + Me.Label10.Size = New System.Drawing.Size(14, 20) + Me.Label10.TabIndex = 3 Me.Label10.Text = "-" ' 'Label6 ' Me.Label6.AutoSize = True - Me.Label6.Location = New System.Drawing.Point(3, 18) + Me.Label6.Location = New System.Drawing.Point(4, 23) + Me.Label6.Margin = New System.Windows.Forms.Padding(4, 0, 4, 0) Me.Label6.Name = "Label6" - Me.Label6.Size = New System.Drawing.Size(51, 13) - Me.Label6.TabIndex = 6 + Me.Label6.Size = New System.Drawing.Size(76, 20) + Me.Label6.TabIndex = 1 Me.Label6.Text = "Zeitraum:" ' 'Button1 ' Me.Button1.FlatStyle = System.Windows.Forms.FlatStyle.Flat - Me.Button1.Location = New System.Drawing.Point(511, 11) + Me.Button1.Location = New System.Drawing.Point(775, 599) + Me.Button1.Margin = New System.Windows.Forms.Padding(4, 5, 4, 5) Me.Button1.Name = "Button1" - Me.Button1.Size = New System.Drawing.Size(75, 23) - Me.Button1.TabIndex = 11 + Me.Button1.Size = New System.Drawing.Size(112, 35) + Me.Button1.TabIndex = 2 Me.Button1.Text = "Excel" Me.Button1.UseVisualStyleBackColor = True ' 'datStatBis ' Me.datStatBis.Format = System.Windows.Forms.DateTimePickerFormat.[Short] - Me.datStatBis.Location = New System.Drawing.Point(197, 11) + Me.datStatBis.Location = New System.Drawing.Point(291, 18) + Me.datStatBis.Margin = New System.Windows.Forms.Padding(4, 5, 4, 5) Me.datStatBis.Name = "datStatBis" - Me.datStatBis.Size = New System.Drawing.Size(105, 20) - Me.datStatBis.TabIndex = 7 + Me.datStatBis.Size = New System.Drawing.Size(156, 26) + Me.datStatBis.TabIndex = 4 ' 'datStatVon ' Me.datStatVon.Format = System.Windows.Forms.DateTimePickerFormat.[Short] - Me.datStatVon.Location = New System.Drawing.Point(70, 12) + Me.datStatVon.Location = New System.Drawing.Point(105, 18) + Me.datStatVon.Margin = New System.Windows.Forms.Padding(4, 5, 4, 5) Me.datStatVon.Name = "datStatVon" - Me.datStatVon.Size = New System.Drawing.Size(105, 20) - Me.datStatVon.TabIndex = 8 + Me.datStatVon.Size = New System.Drawing.Size(156, 26) + Me.datStatVon.TabIndex = 2 + ' + 'Button3 + ' + Me.Button3.FlatStyle = System.Windows.Forms.FlatStyle.Flat + Me.Button3.Location = New System.Drawing.Point(798, 13) + Me.Button3.Margin = New System.Windows.Forms.Padding(4, 5, 4, 5) + Me.Button3.Name = "Button3" + Me.Button3.Size = New System.Drawing.Size(203, 35) + Me.Button3.TabIndex = 6 + Me.Button3.Text = "Auswerten" + Me.Button3.UseVisualStyleBackColor = True ' 'usrctlStatVERIMEX ' - Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!) + Me.AutoScaleDimensions = New System.Drawing.SizeF(9.0!, 20.0!) Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font Me.BackColor = System.Drawing.Color.White Me.Controls.Add(Me.Panel3) + Me.Margin = New System.Windows.Forms.Padding(4, 5, 4, 5) Me.Name = "usrctlStatVERIMEX" - Me.Size = New System.Drawing.Size(844, 510) + Me.Size = New System.Drawing.Size(1266, 785) Me.Panel3.ResumeLayout(False) Me.Panel3.PerformLayout() Me.Panel4.ResumeLayout(False) @@ -160,4 +210,7 @@ Partial Class usrctlStatVERIMEX Friend WithEvents datStatBis As DateTimePicker Friend WithEvents datStatVon As DateTimePicker Friend WithEvents Button2 As Button + Friend WithEvents Label1 As Label + Friend WithEvents cboFirma As VERAG_PROG_ALLGEMEIN.MyComboBox + Friend WithEvents Button3 As Button End Class diff --git a/Aviso/Auswertung/usrctlStatVERIMEX.vb b/Aviso/Auswertung/usrctlStatVERIMEX.vb index fc88819..9c90866 100644 --- a/Aviso/Auswertung/usrctlStatVERIMEX.vb +++ b/Aviso/Auswertung/usrctlStatVERIMEX.vb @@ -7,10 +7,22 @@ Public Class usrctlStatVERIMEX Dim SQL As New VERAG_PROG_ALLGEMEIN.SQL Sub init() + Dim whereFiliale = "" + Dim innerJoinFiliale = "" + Select Case cboFirma._value + Case "" + Case 0 : whereFiliale = " and tblSendungen.FilialenNr <=0 " + Case Else + whereFiliale = " and Filialen.Firma='" & cboFirma._value & "' " + innerJoinFiliale = "inner join " & VERAG_PROG_ALLGEMEIN.cAllgemein.FMZOLL_SERVER & ".VERAG.dbo.Filialen on [tblSendungen].FilialenNr=Filialen.FilialenNr" + End Select + With dgvAbklaerungTR Dim sqlstr = "SELECT mit_vname + ' ' + mit_nname as Mitarbeiter ,count(*) as Sendungen ,count(distinct(avisoid)) as LKW - FROM [tblSendungen] inner join aviso on AvisoID = tblSnd_AvisoID inner join admin.dbo.tblMitarbeiter on mit_id=tblSnd_AbklaerungTR_MA + FROM [tblSendungen] inner join Aviso on AvisoID = tblSnd_AvisoID inner join admin.dbo.tblMitarbeiter on mit_id=tblSnd_AbklaerungTR_MA + " & innerJoinFiliale & " where cast(Datum as date) BETWEEN '" & datStatVon.Value & "' and '" & datStatBis.Value & "' and tblSnd_AbklaerungTR_MA is not null + " & whereFiliale & " group by mit_vname,mit_nname" dgvAbklaerungTR.DataSource = SQL.loadDgvBySql(sqlstr, "AVISO") @@ -23,9 +35,9 @@ Public Class usrctlStatVERIMEX - Private Sub datStatVon_ValueChanged(sender As Object, e As EventArgs) Handles datStatVon.ValueChanged, datStatBis.ValueChanged - init() - End Sub + 'Private Sub datStatVon_ValueChanged(sender As Object, e As EventArgs) Handles datStatVon.ValueChanged, datStatBis.ValueChanged + + 'End Sub Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click Me.Cursor = Cursors.WaitCursor @@ -88,4 +100,26 @@ Public Class usrctlStatVERIMEX print.Viewer.ViewType = GrapeCity.Viewer.Common.Model.ViewType.Continuous print.Show() End Sub + + Private Sub usrctlStatVERIMEX_Load(sender As Object, e As EventArgs) Handles Me.Load + cboFirma.Items.Clear() + cboFirma.Items.Add(New VERAG_PROG_ALLGEMEIN.MyListItem("ALLE", "")) + cboFirma.Items.Add(New VERAG_PROG_ALLGEMEIN.MyListItem("VERAG", "VERAG")) + cboFirma.Items.Add(New VERAG_PROG_ALLGEMEIN.MyListItem("IMEX", "IMEX")) + cboFirma.Items.Add(New VERAG_PROG_ALLGEMEIN.MyListItem("AMBAR", "AMBAR")) + cboFirma.Items.Add(New VERAG_PROG_ALLGEMEIN.MyListItem("UNISPED", "UNISPED")) + cboFirma.Items.Add(New VERAG_PROG_ALLGEMEIN.MyListItem("*Nicht zugeordnet", "0")) + cboFirma.changeItem("") + ' cboFirma.Items.Add(New VERAG_PROG_ALLGEMEIN.MyListItem("ATILLA", "")) + End Sub + + Private Sub Button3_Click(sender As Object, e As EventArgs) Handles Button3.Click + init() + End Sub + + Private Sub datStatVon_KeyDown(sender As Object, e As KeyEventArgs) Handles datStatVon.KeyDown, datStatBis.KeyDown, cboFirma.KeyDown + If e.KeyCode = Keys.Return Then + init() + End If + End Sub End Class \ No newline at end of file diff --git a/Aviso/Aviso.vbproj b/Aviso/Aviso.vbproj index 194b0a1..b652c66 100644 --- a/Aviso/Aviso.vbproj +++ b/Aviso/Aviso.vbproj @@ -1105,6 +1105,10 @@ My Settings.Designer.vb + + Always + + diff --git a/Aviso/My Project/AssemblyInfo.vb b/Aviso/My Project/AssemblyInfo.vb index a04e745..3437081 100644 --- a/Aviso/My Project/AssemblyInfo.vb +++ b/Aviso/My Project/AssemblyInfo.vb @@ -31,5 +31,5 @@ Imports System.Runtime.InteropServices ' übernehmen, indem Sie "*" eingeben: ' - - + + diff --git a/Aviso/My Project/Resources.Designer.vb b/Aviso/My Project/Resources.Designer.vb index e18054d..604c089 100644 --- a/Aviso/My Project/Resources.Designer.vb +++ b/Aviso/My Project/Resources.Designer.vb @@ -239,6 +239,16 @@ Namespace My.Resources End Get End Property + ''' + ''' Sucht eine lokalisierte Ressource vom Typ System.Byte[]. + ''' + Friend ReadOnly Property ATANAK_Instructions_Import() As Byte() + Get + Dim obj As Object = ResourceManager.GetObject("ATANAK_Instructions_Import", resourceCulture) + Return CType(obj,Byte()) + End Get + End Property + ''' ''' Sucht eine lokalisierte Ressource vom Typ System.Drawing.Bitmap. ''' @@ -1149,6 +1159,15 @@ Namespace My.Resources End Get End Property + ''' + ''' Sucht eine lokalisierte Zeichenfolge, die ähnelt. + ''' + Friend ReadOnly Property sfsdfs3sdfsdfsdfsdfsdf() As String + Get + Return ResourceManager.GetString("sfsdfs3sdfsdfsdfsdfsdf", resourceCulture) + End Get + End Property + ''' ''' Sucht eine lokalisierte Ressource vom Typ System.Drawing.Bitmap. ''' @@ -1459,7 +1478,7 @@ Namespace My.Resources End Property ''' - ''' Sucht eine lokalisierte Zeichenfolge, die 3.6.0.0 ähnelt. + ''' Sucht eine lokalisierte Zeichenfolge, die 3.6.0.7 ähnelt. ''' Friend ReadOnly Property Version() As String Get diff --git a/Aviso/My Project/Resources.resx b/Aviso/My Project/Resources.resx index 99b15b3..0d90dee 100644 --- a/Aviso/My Project/Resources.resx +++ b/Aviso/My Project/Resources.resx @@ -536,7 +536,7 @@ ..\Resources\plus.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - 3.6.0.0 + 3.6.0.7 ..\Resources\statusBtn_vorgeschrieben_Aktiv.jpg;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a @@ -595,4 +595,10 @@ ..\Resources\AMB.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + ..\Resources\ATANAK_Instructions_Import.xlsx;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + + \ No newline at end of file diff --git a/Aviso/Resources/ATANAK_Instructions_Import.xlsx b/Aviso/Resources/ATANAK_Instructions_Import.xlsx new file mode 100644 index 0000000..6b21151 Binary files /dev/null and b/Aviso/Resources/ATANAK_Instructions_Import.xlsx differ diff --git a/Aviso/Resources/Instructions_Import.xlsx b/Aviso/Resources/Instructions_Import.xlsx new file mode 100644 index 0000000..e2afdeb Binary files /dev/null and b/Aviso/Resources/Instructions_Import.xlsx differ diff --git a/Aviso/frmEintragAviso.designer.vb b/Aviso/frmEintragAviso.designer.vb index 7141fde..7373e6f 100644 --- a/Aviso/frmEintragAviso.designer.vb +++ b/Aviso/frmEintragAviso.designer.vb @@ -147,6 +147,8 @@ Partial Class frmEintragAviso Me.clmnPfad = New System.Windows.Forms.DataGridViewTextBoxColumn() Me.UsrCntlEintragAvisoAtilla = New AVISO.usrCntlEintragAvisoAtilla() Me.UsrCntlAviso_Vorpapiere1 = New AVISO.usrCntlAviso_Vorpapiere() + Me.cboFirma = New VERAG_PROG_ALLGEMEIN.MyComboBox() + Me.Label2 = New System.Windows.Forms.Label() Me.panAdmin.SuspendLayout() Me.grpAviso.SuspendLayout() CType(Me.PictureBox1, System.ComponentModel.ISupportInitialize).BeginInit() @@ -174,7 +176,7 @@ Partial Class frmEintragAviso 'lblErfAm ' Me.lblErfAm.AutoSize = True - Me.lblErfAm.Location = New System.Drawing.Point(220, 14) + Me.lblErfAm.Location = New System.Drawing.Point(220, 12) Me.lblErfAm.Name = "lblErfAm" Me.lblErfAm.Size = New System.Drawing.Size(59, 13) Me.lblErfAm.TabIndex = 1 @@ -271,7 +273,7 @@ Partial Class frmEintragAviso ' Me.dtpDatum.CustomFormat = "dd.MM.yyyy HH:mm" Me.dtpDatum.Format = System.Windows.Forms.DateTimePickerFormat.Custom - Me.dtpDatum.Location = New System.Drawing.Point(285, 9) + Me.dtpDatum.Location = New System.Drawing.Point(285, 7) Me.dtpDatum.Name = "dtpDatum" Me.dtpDatum.Size = New System.Drawing.Size(130, 20) Me.dtpDatum.TabIndex = 2 @@ -291,7 +293,7 @@ Partial Class frmEintragAviso Me.lblStatus.BackColor = System.Drawing.Color.LemonChiffon Me.lblStatus.Font = New System.Drawing.Font("Microsoft Sans Serif", 12.0!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.lblStatus.ForeColor = System.Drawing.Color.Green - Me.lblStatus.Location = New System.Drawing.Point(516, 9) + Me.lblStatus.Location = New System.Drawing.Point(516, 7) Me.lblStatus.Name = "lblStatus" Me.lblStatus.Size = New System.Drawing.Size(268, 20) Me.lblStatus.TabIndex = 4 @@ -301,7 +303,7 @@ Partial Class frmEintragAviso ' Me.lblStatus2.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) Me.lblStatus2.AutoSize = True - Me.lblStatus2.Location = New System.Drawing.Point(430, 14) + Me.lblStatus2.Location = New System.Drawing.Point(430, 12) Me.lblStatus2.Name = "lblStatus2" Me.lblStatus2.Size = New System.Drawing.Size(80, 13) Me.lblStatus2.TabIndex = 3 @@ -767,7 +769,7 @@ Partial Class frmEintragAviso Me.grpAviso.Controls.Add(Me.lblVoraussEintreff) Me.grpAviso.Controls.Add(Me.datVoraussichtlichesEintreffen) Me.grpAviso.Controls.Add(Me.pnl) - Me.grpAviso.Location = New System.Drawing.Point(12, 45) + Me.grpAviso.Location = New System.Drawing.Point(12, 49) Me.grpAviso.Name = "grpAviso" Me.grpAviso.Size = New System.Drawing.Size(403, 406) Me.grpAviso.TabIndex = 5 @@ -1725,11 +1727,32 @@ Partial Class frmEintragAviso 'UsrCntlAviso_Vorpapiere1 ' Me.UsrCntlAviso_Vorpapiere1.BackColor = System.Drawing.Color.White - Me.UsrCntlAviso_Vorpapiere1.Location = New System.Drawing.Point(12, 462) + Me.UsrCntlAviso_Vorpapiere1.Location = New System.Drawing.Point(12, 466) Me.UsrCntlAviso_Vorpapiere1.Name = "UsrCntlAviso_Vorpapiere1" Me.UsrCntlAviso_Vorpapiere1.Size = New System.Drawing.Size(410, 157) Me.UsrCntlAviso_Vorpapiere1.TabIndex = 63 ' + 'cboFirma + ' + Me.cboFirma._allowedValuesFreiText = Nothing + Me.cboFirma._allowFreiText = False + Me.cboFirma._value = "" + Me.cboFirma.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Left), System.Windows.Forms.AnchorStyles) + Me.cboFirma.FormattingEnabled = True + Me.cboFirma.Location = New System.Drawing.Point(285, 28) + Me.cboFirma.Name = "cboFirma" + Me.cboFirma.Size = New System.Drawing.Size(130, 21) + Me.cboFirma.TabIndex = 70 + ' + 'Label2 + ' + Me.Label2.AutoSize = True + Me.Label2.Location = New System.Drawing.Point(220, 31) + Me.Label2.Name = "Label2" + Me.Label2.Size = New System.Drawing.Size(43, 13) + Me.Label2.TabIndex = 71 + Me.Label2.Text = "FIRMA:" + ' 'frmEintragAviso ' Me.AcceptButton = Me.btnOK @@ -1737,6 +1760,8 @@ Partial Class frmEintragAviso Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font Me.BackColor = System.Drawing.Color.White Me.ClientSize = New System.Drawing.Size(792, 728) + Me.Controls.Add(Me.Label2) + Me.Controls.Add(Me.cboFirma) Me.Controls.Add(Me.UsrCntlAviso_Vorpapiere1) Me.Controls.Add(Me.btnAbsSrch) Me.Controls.Add(Me.panAdmin) @@ -1918,4 +1943,6 @@ Partial Class frmEintragAviso Friend WithEvents pnl As Panel Friend WithEvents PictureBox1 As PictureBox Friend WithEvents UsrCntlAviso_Vorpapiere1 As usrCntlAviso_Vorpapiere + Friend WithEvents cboFirma As VERAG_PROG_ALLGEMEIN.MyComboBox + Friend WithEvents Label2 As Label End Class diff --git a/Aviso/frmEintragAviso.vb b/Aviso/frmEintragAviso.vb index 3d67028..6e6c154 100644 --- a/Aviso/frmEintragAviso.vb +++ b/Aviso/frmEintragAviso.vb @@ -103,6 +103,16 @@ Public Class frmEintragAviso optSchriftlich.Checked = True End If + cboFirma.Items.Clear() + cboFirma.Items.Add(New VERAG_PROG_ALLGEMEIN.MyListItem("", "")) + cboFirma.Items.Add(New VERAG_PROG_ALLGEMEIN.MyListItem("VERAG", "VERAG")) + cboFirma.Items.Add(New VERAG_PROG_ALLGEMEIN.MyListItem("IMEX", "IMEX")) + cboFirma.Items.Add(New VERAG_PROG_ALLGEMEIN.MyListItem("UNISPED", "UNISPED")) + cboFirma.Items.Add(New VERAG_PROG_ALLGEMEIN.MyListItem("AMBAR", "AMBAR")) + cboFirma.Items.Add(New VERAG_PROG_ALLGEMEIN.MyListItem("ATILLA", "ATILLA")) + cboFirma.Items.Add(New VERAG_PROG_ALLGEMEIN.MyListItem("FRONTOFFICE", "FRONTOFFICE")) + cboFirma.changeItem(VERAG_PROG_ALLGEMEIN.cAllgemein.FIRMA) + cboFirma.Enabled = False Select Case VERAG_PROG_ALLGEMEIN.cAllgemein.FIRMA Case "IMEX" @@ -136,8 +146,14 @@ Public Class frmEintragAviso Label1.Visible = True cboImEx.Visible = True cboImEx.Text = "IMPORT" + Case "VERIMEX" + cboFirma.Enabled = True End Select + If VERAG_PROG_ALLGEMEIN.cBerechtignunen.CHECK_BERECHTIGUNG_bool("VERIMEX", "AVISO") Then + cboFirma.Enabled = True + End If + Select Case VERAG_PROG_ALLGEMEIN.cAllgemein.NIEDERLASSUNG @@ -390,8 +406,10 @@ Public Class frmEintragAviso lblStatus.Text = "" End Select lblStatus.Text = " " & lblStatus.Text & " " 'für bessere farbliche Hervorhebung + cboFirma.changeItem("") + cboFirma.changeItem(myAviso.FIRMA) - If VERAG_PROG_ALLGEMEIN.cBerechtignunen.CHECK_BERECHTIGUNG_bool("AVISO_ZeitenBearbeiten", "SDL") Then + If VERAG_PROG_ALLGEMEIN.cBerechtignunen.CHECK_BERECHTIGUNG_bool("AVISO_ZeitenBearbeiten", "SDL") Then panAdmin.Visible = bearb 'Administrator bekommt mehr Edit-Möglichkeiten End If @@ -538,6 +556,15 @@ Public Class frmEintragAviso lblSendungsanzahl.Visible = False lblErrVorraussuchtlEintreffen.Visible = False + If VERAG_PROG_ALLGEMEIN.cAllgemein.FIRMA = "VERIMEX" Then + If cboFirma._value = "" Then + MsgBox("Firma auswählen!", vbInformation) + cboFirma.Focus() + Exit Sub + + End If + End If + If CDate(dtpAvisoEingangDatum.Value) > Now Then MsgBox("Aviso-Datum darf nicht in der Zukunft liegen!", vbInformation) dtpAvisoEingangDatum.Focus() @@ -889,7 +916,7 @@ Public Class frmEintragAviso myAviso.Sammelakt = (myAviso.Sendungen_Gesamtanzahl > 1) 'cbxSammelakt.Checked End If - myAviso.FIRMA = VERAG_PROG_ALLGEMEIN.cAllgemein.FIRMA + myAviso.FIRMA = If(cboFirma._value <> "", cboFirma._value, VERAG_PROG_ALLGEMEIN.cAllgemein.FIRMA) myAviso.Cluster = If(VERAG_PROG_ALLGEMEIN.cAllgemein.CLUSTER, "") diff --git a/Aviso/frmSendungsdetailsNEU.Designer.vb b/Aviso/frmSendungsdetailsNEU.Designer.vb index a4ae579..b91dde7 100644 --- a/Aviso/frmSendungsdetailsNEU.Designer.vb +++ b/Aviso/frmSendungsdetailsNEU.Designer.vb @@ -353,6 +353,7 @@ Partial Class frmSendungsdetailsNEU Me.AuftraggeberToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem() Me.EmpfängerToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem() Me.LaufzettelDruckenToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem() + Me.ZollstoppAMBARToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem() Me.ContextMenuStrip1 = New System.Windows.Forms.ContextMenuStrip(Me.components) Me.ToolStripMenuItem15 = New System.Windows.Forms.ToolStripMenuItem() Me.SpeditionSUBENToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem() @@ -363,7 +364,9 @@ Partial Class frmSendungsdetailsNEU Me.ContextMenuStrip2 = New System.Windows.Forms.ContextMenuStrip(Me.components) Me.ToolStripMenuItem14 = New System.Windows.Forms.ToolStripMenuItem() Me.NurÖffnenToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem() - Me.ZollstoppAMBARToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem() + Me.ATANAKToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem() + Me.ImportToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem() + Me.ExportToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem() Me.pnl.SuspendLayout() Me.Panel4.SuspendLayout() Me.TabControl1.SuspendLayout() @@ -4596,9 +4599,9 @@ Partial Class frmSendungsdetailsNEU ' 'ctxtWeitereFormulare ' - Me.ctxtWeitereFormulare.Items.AddRange(New System.Windows.Forms.ToolStripItem() {Me.toolGelangensbestätigung, Me.toolOriginalSendungsunterlagen, Me.LaufzettelDruckenToolStripMenuItem, Me.ZollstoppAMBARToolStripMenuItem}) + Me.ctxtWeitereFormulare.Items.AddRange(New System.Windows.Forms.ToolStripItem() {Me.toolGelangensbestätigung, Me.toolOriginalSendungsunterlagen, Me.LaufzettelDruckenToolStripMenuItem, Me.ZollstoppAMBARToolStripMenuItem, Me.ATANAKToolStripMenuItem}) Me.ctxtWeitereFormulare.Name = "cntxt" - Me.ctxtWeitereFormulare.Size = New System.Drawing.Size(263, 114) + Me.ctxtWeitereFormulare.Size = New System.Drawing.Size(263, 136) ' 'toolGelangensbestätigung ' @@ -4631,6 +4634,12 @@ Partial Class frmSendungsdetailsNEU Me.LaufzettelDruckenToolStripMenuItem.Size = New System.Drawing.Size(262, 22) Me.LaufzettelDruckenToolStripMenuItem.Text = "Laufzettel drucken" ' + 'ZollstoppAMBARToolStripMenuItem + ' + Me.ZollstoppAMBARToolStripMenuItem.Name = "ZollstoppAMBARToolStripMenuItem" + Me.ZollstoppAMBARToolStripMenuItem.Size = New System.Drawing.Size(262, 22) + Me.ZollstoppAMBARToolStripMenuItem.Text = "Zollstopp (AMBAR)" + ' 'ContextMenuStrip1 ' Me.ContextMenuStrip1.Items.AddRange(New System.Windows.Forms.ToolStripItem() {Me.ToolStripMenuItem15, Me.SpeditionSUBENToolStripMenuItem, Me.ToolStripMenuItem16}) @@ -4697,11 +4706,24 @@ Partial Class frmSendungsdetailsNEU Me.NurÖffnenToolStripMenuItem.Size = New System.Drawing.Size(247, 22) Me.NurÖffnenToolStripMenuItem.Text = "nur öffnen" ' - 'ZollstoppAMBARToolStripMenuItem + 'ATANAKToolStripMenuItem ' - Me.ZollstoppAMBARToolStripMenuItem.Name = "ZollstoppAMBARToolStripMenuItem" - Me.ZollstoppAMBARToolStripMenuItem.Size = New System.Drawing.Size(262, 22) - Me.ZollstoppAMBARToolStripMenuItem.Text = "Zollstopp (AMBAR)" + Me.ATANAKToolStripMenuItem.DropDownItems.AddRange(New System.Windows.Forms.ToolStripItem() {Me.ImportToolStripMenuItem, Me.ExportToolStripMenuItem}) + Me.ATANAKToolStripMenuItem.Name = "ATANAKToolStripMenuItem" + Me.ATANAKToolStripMenuItem.Size = New System.Drawing.Size(262, 22) + Me.ATANAKToolStripMenuItem.Text = "ATANAK" + ' + 'ImportToolStripMenuItem + ' + Me.ImportToolStripMenuItem.Name = "ImportToolStripMenuItem" + Me.ImportToolStripMenuItem.Size = New System.Drawing.Size(180, 22) + Me.ImportToolStripMenuItem.Text = "Import" + ' + 'ExportToolStripMenuItem + ' + Me.ExportToolStripMenuItem.Name = "ExportToolStripMenuItem" + Me.ExportToolStripMenuItem.Size = New System.Drawing.Size(180, 22) + Me.ExportToolStripMenuItem.Text = "Export" ' 'frmSendungsdetailsNEU ' @@ -5131,4 +5153,7 @@ Partial Class frmSendungsdetailsNEU Friend WithEvents txtFrachtkosten As VERAG_PROG_ALLGEMEIN.MyTextBox Friend WithEvents Label1 As Label Friend WithEvents ZollstoppAMBARToolStripMenuItem As ToolStripMenuItem + Friend WithEvents ATANAKToolStripMenuItem As ToolStripMenuItem + Friend WithEvents ImportToolStripMenuItem As ToolStripMenuItem + Friend WithEvents ExportToolStripMenuItem As ToolStripMenuItem End Class diff --git a/Aviso/frmSendungsdetailsNEU.vb b/Aviso/frmSendungsdetailsNEU.vb index 6b92bb2..f1d97ac 100644 --- a/Aviso/frmSendungsdetailsNEU.vb +++ b/Aviso/frmSendungsdetailsNEU.vb @@ -4241,4 +4241,87 @@ Public Class frmSendungsdetailsNEU f.ShowDialog(Me) Me.Cursor = DefaultCursor End Sub + + Private Sub ImportToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles ImportToolStripMenuItem.Click + + Me.Cursor = Cursors.WaitCursor + Try + Dim Path = "" + If True Then + + + Dim sPath As String = Environment.GetFolderPath(Environment.SpecialFolder.Personal) & "\VERAG\ATANAK\" + If Not My.Computer.FileSystem.DirectoryExists(sPath) Then + My.Computer.FileSystem.CreateDirectory(sPath) + End If + + + Dim exclApp As Object 'as Application + Dim Datei As Object 'as WorkBook + Dim Blatt As Object 'Microsoft.Office.Interop.Excel.Worksheet 'As Object 'as Worksheet + exclApp = CreateObject("Excel.Application") + + With exclApp + .Visible = False + + Try + Path = sPath & "ATANAK_Import_" & SENDUNG_LIST(CURRENT_INDEX).FilialenNr & "-" & SENDUNG_LIST(CURRENT_INDEX).AbfertigungsNr & "" & " .xlsx" + While System.IO.File.Exists(Path) + Path = sPath & "ATANAK_Import_" & SENDUNG_LIST(CURRENT_INDEX).FilialenNr & "-" & SENDUNG_LIST(CURRENT_INDEX).AbfertigungsNr & "" & "_" & Now.ToString("ddMMyyyyHHmmss") & ".xlsx" + End While + My.Computer.FileSystem.WriteAllBytes(Path, My.Resources.ATANAK_Instructions_Import, False) + Catch ex As System.Exception + ' MsgBox(ex.Message) + MsgBox("ERROR 01: " & ex.Message & vbNewLine & ex.StackTrace) + Me.Cursor = Cursors.Default + + Exit Sub + End Try + + Datei = .Workbooks.Open(Path) 'Anpassen + Blatt = Datei.Worksheets(1) 'Anpassen + + Blatt.Range("E9").Value = SENDUNG_LIST(CURRENT_INDEX).FilialenNr & "/" & SENDUNG_LIST(CURRENT_INDEX).AbfertigungsNr + Blatt.Range("D10").Value = AVISO.LKW_Nr + Blatt.Range("D11").Value = SENDUNG_LIST(CURRENT_INDEX).tblSnd_Empfaenger + If SENDUNG_LIST(CURRENT_INDEX).tblSnd_EmpfaengerKdNr > 0 Then + Dim KD As New VERAG_PROG_ALLGEMEIN.cKunde(SENDUNG_LIST(CURRENT_INDEX).tblSnd_EmpfaengerKdNr) + If KD IsNot Nothing AndAlso If(KD.EORITIN, "") <> "" Then + Blatt.Range("D12").Value = KD.EORITIN + End If + End If + + Blatt.Range("F13").Value = "" 'DDA + Blatt.Range("C26").Value = SENDUNG_LIST(CURRENT_INDEX).tblSnd_Gewicht + Blatt.Range("G26").Value = SENDUNG_LIST(CURRENT_INDEX).tblSnd_Colli + Blatt.Range("D27").Value = "" 'Procedure + Blatt.Range("F29").Value = "" 'CPC + Blatt.Range("F30").Value = "" 'Supervising HMRC Adress + Blatt.Range("F32").Value = "" 'LICENSE Y/N + Blatt.Range("A36").Value = "" 'Other1 + Blatt.Range("A37").Value = "" 'Other2 + Blatt.Range("A39").Value = "" 'Other3 + + + Blatt.Range("B42").Value = VERAG_PROG_ALLGEMEIN.cAllgemein.MITARBEITER.Fullname + Blatt.Range("G42").Value = Now.ToShortDateString + + + Datei.Save + + If False Then + Blatt.PrintOutEx() + Else + 'Process.Start(Path) + .Visible = True + + End If + End With + + End If + Catch ex As Exception + MsgBox(ex.Message & ex.StackTrace) + End Try + Me.Cursor = Cursors.Default + End Sub End Class diff --git a/Aviso/usrcntlAktDetails.vb b/Aviso/usrcntlAktDetails.vb index 3370cd1..3b35d8f 100644 --- a/Aviso/usrcntlAktDetails.vb +++ b/Aviso/usrcntlAktDetails.vb @@ -2640,7 +2640,7 @@ Public Class usrcntlAktDetails Private Sub Button9_Click(sender As Object, e As EventArgs) Handles btnKasse_User.Click If DispolisteVermerk() Then Dim path = SDL.FormularManagerNEU.DispSendungslisteoListe(AvisoID, False,, cboFormulareRgAn._value) - If path <> "" Then Process.Start(path) + If path <> "" And IO.File.Exists(path) Then Process.Start(path) Panel4.Visible = False End If End Sub