Feature: UserControl für Routenverwaltung erstellt (NCTSRouten).

This commit is contained in:
2022-10-04 16:03:13 +02:00
parent 8404604de3
commit 3b59053b4b
7 changed files with 824 additions and 246 deletions

View File

@@ -534,6 +534,12 @@
<Compile Include="frmFreigabeSetzenAnhaenge.vb">
<SubType>Form</SubType>
</Compile>
<Compile Include="frmNCTSRouten.Designer.vb">
<DependentUpon>frmNCTSRouten.vb</DependentUpon>
</Compile>
<Compile Include="frmNCTSRouten.vb">
<SubType>Form</SubType>
</Compile>
<Compile Include="frmSndVorgeschriebenSetzen.Designer.vb">
<DependentUpon>frmSndVorgeschriebenSetzen.vb</DependentUpon>
</Compile>
@@ -1041,6 +1047,9 @@
<EmbeddedResource Include="frmFreigabeSetzenAnhaenge.resx">
<DependentUpon>frmFreigabeSetzenAnhaenge.vb</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="frmNCTSRouten.resx">
<DependentUpon>frmNCTSRouten.vb</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="frmSndVorgeschriebenSetzen.resx">
<DependentUpon>frmSndVorgeschriebenSetzen.vb</DependentUpon>
</EmbeddedResource>

View File

@@ -31,5 +31,5 @@ Imports System.Runtime.InteropServices
' übernehmen, indem Sie "*" eingeben:
' <Assembly: AssemblyVersion("1.0.*")>
<Assembly: AssemblyVersion("3.8.0.6")>
<Assembly: AssemblyFileVersion("3.8.0.6")>
<Assembly: AssemblyVersion("3.8.0.10")>
<Assembly: AssemblyFileVersion("3.8.0.10")>

File diff suppressed because it is too large Load Diff

View File

@@ -4018,6 +4018,14 @@ Public Class frmHauptfenster
Private Sub GüterlisteToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles GüterlisteToolStripMenuItem.Click
Process.Start("https://www.bafa.de/DE/Aussenwirtschaft/Ausfuhrkontrolle/Gueterlisten/gueterlisten_node.html")
End Sub
Private Sub RoutenverwaltungToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles RoutenverwaltungToolStripMenuItem.Click
gridAviso.ClearSelection()
gridMyAviso.ClearSelection()
VERAG_PROG_ALLGEMEIN.cGlobal.Aktive_ID = 1
Dim f As New frmNCTSRouten()
f.ShowDialog(Me)
End Sub
End Class
Public Class AvisoStatusFunctions

230
Aviso/frmNCTSRouten.Designer.vb generated Normal file
View File

@@ -0,0 +1,230 @@
<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()>
Partial Class frmNCTSRouten
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.components = New System.ComponentModel.Container()
Me.btn_OK = New System.Windows.Forms.Button()
Me.btn_Cancel = New System.Windows.Forms.Button()
Me.pnlNCTSRouten = New VERAG_PROG_ALLGEMEIN.MyPanel(Me.components)
Me.sbxVon = New VERAG_PROG_ALLGEMEIN.MySearchBox()
Me.Label2 = New System.Windows.Forms.Label()
Me.btnNeu = New System.Windows.Forms.Button()
Me.Label1 = New System.Windows.Forms.Label()
Me.Label3 = New System.Windows.Forms.Label()
Me.Label4 = New System.Windows.Forms.Label()
Me.cbxNach = New VERAG_PROG_ALLGEMEIN.MyComboBox()
Me.txtDauer = New System.Windows.Forms.TextBox()
Me.cbxRoutenart = New VERAG_PROG_ALLGEMEIN.MyComboBox()
Me.dgvNCTSRouten = New VERAG_PROG_ALLGEMEIN.MyDatagridview(Me.components)
Me.pnlNCTSRouten.SuspendLayout()
CType(Me.dgvNCTSRouten, System.ComponentModel.ISupportInitialize).BeginInit()
Me.SuspendLayout()
'
'btn_OK
'
Me.btn_OK.Location = New System.Drawing.Point(376, 379)
Me.btn_OK.Name = "btn_OK"
Me.btn_OK.Size = New System.Drawing.Size(75, 23)
Me.btn_OK.TabIndex = 1
Me.btn_OK.Text = "OK"
Me.btn_OK.UseVisualStyleBackColor = True
'
'btn_Cancel
'
Me.btn_Cancel.Location = New System.Drawing.Point(12, 379)
Me.btn_Cancel.Name = "btn_Cancel"
Me.btn_Cancel.Size = New System.Drawing.Size(75, 23)
Me.btn_Cancel.TabIndex = 2
Me.btn_Cancel.Text = "Abbrechen"
Me.btn_Cancel.UseVisualStyleBackColor = True
'
'pnlNCTSRouten
'
Me.pnlNCTSRouten.Controls.Add(Me.sbxVon)
Me.pnlNCTSRouten.Controls.Add(Me.Label2)
Me.pnlNCTSRouten.Controls.Add(Me.btnNeu)
Me.pnlNCTSRouten.Controls.Add(Me.Label1)
Me.pnlNCTSRouten.Controls.Add(Me.Label3)
Me.pnlNCTSRouten.Controls.Add(Me.Label4)
Me.pnlNCTSRouten.Controls.Add(Me.cbxNach)
Me.pnlNCTSRouten.Controls.Add(Me.txtDauer)
Me.pnlNCTSRouten.Controls.Add(Me.cbxRoutenart)
Me.pnlNCTSRouten.Location = New System.Drawing.Point(12, 12)
Me.pnlNCTSRouten.Name = "pnlNCTSRouten"
Me.pnlNCTSRouten.Size = New System.Drawing.Size(439, 127)
Me.pnlNCTSRouten.TabIndex = 30
'
'sbxVon
'
Me.sbxVon._allowFreitext = True
Me.sbxVon._AllowSetValue = False
Me.sbxVon._allowSpaceAsSplitter = False
Me.sbxVon._autoSizeGross = False
Me.sbxVon._hideIfListEmpty = True
Me.sbxVon._value = Nothing
Me.sbxVon.conn_art = "FMZOLL"
Me.sbxVon.dgvpos = "LEFT"
Me.sbxVon.DISPLAY_PARAM = Nothing
Me.sbxVon.Enabled = False
Me.sbxVon.INVISIBLE_COLUMNS = Nothing
Me.sbxVon.key_visible = False
Me.sbxVon.KEYPARAM = Nothing
Me.sbxVon.Location = New System.Drawing.Point(10, 26)
Me.sbxVon.Name = "sbxVon"
Me.sbxVon.searchActive = True
Me.sbxVon.Size = New System.Drawing.Size(161, 20)
Me.sbxVon.SQL_ORDER_BY = Nothing
Me.sbxVon.SQL_SELECT = Nothing
Me.sbxVon.SQL_WHERE = Nothing
Me.sbxVon.SQL_WhereParamList = Nothing
Me.sbxVon.TabIndex = 30
Me.sbxVon.usrcntl = Nothing
'
'Label2
'
Me.Label2.AutoSize = True
Me.Label2.Location = New System.Drawing.Point(217, 10)
Me.Label2.Name = "Label2"
Me.Label2.Size = New System.Drawing.Size(111, 13)
Me.Label2.TabIndex = 3
Me.Label2.Text = "Bestimmungszollstelle:"
Me.Label2.TextAlign = System.Drawing.ContentAlignment.TopCenter
'
'btnNeu
'
Me.btnNeu.Image = Global.AVISO.My.Resources.Resources.plus
Me.btnNeu.Location = New System.Drawing.Point(379, 78)
Me.btnNeu.Name = "btnNeu"
Me.btnNeu.Size = New System.Drawing.Size(44, 31)
Me.btnNeu.TabIndex = 29
Me.btnNeu.UseVisualStyleBackColor = True
'
'Label1
'
Me.Label1.AutoSize = True
Me.Label1.Location = New System.Drawing.Point(7, 10)
Me.Label1.Name = "Label1"
Me.Label1.Size = New System.Drawing.Size(91, 13)
Me.Label1.TabIndex = 0
Me.Label1.Text = "Abgangszollstelle:"
'
'Label3
'
Me.Label3.AutoSize = True
Me.Label3.Location = New System.Drawing.Point(10, 61)
Me.Label3.Name = "Label3"
Me.Label3.Size = New System.Drawing.Size(39, 13)
Me.Label3.TabIndex = 4
Me.Label3.Text = "Route:"
'
'Label4
'
Me.Label4.AutoSize = True
Me.Label4.Location = New System.Drawing.Point(217, 62)
Me.Label4.Name = "Label4"
Me.Label4.Size = New System.Drawing.Size(90, 13)
Me.Label4.TabIndex = 5
Me.Label4.Text = "Dauer (in Tagen):"
'
'cbxNach
'
Me.cbxNach._allowedValuesFreiText = New String() {"Test"}
Me.cbxNach._allowFreiText = True
Me.cbxNach._value = ""
Me.cbxNach.Enabled = False
Me.cbxNach.FormattingEnabled = True
Me.cbxNach.Location = New System.Drawing.Point(220, 26)
Me.cbxNach.Name = "cbxNach"
Me.cbxNach.Size = New System.Drawing.Size(121, 21)
Me.cbxNach.TabIndex = 2
'
'txtDauer
'
Me.txtDauer.Enabled = False
Me.txtDauer.Location = New System.Drawing.Point(220, 78)
Me.txtDauer.Name = "txtDauer"
Me.txtDauer.Size = New System.Drawing.Size(100, 20)
Me.txtDauer.TabIndex = 4
'
'cbxRoutenart
'
Me.cbxRoutenart._allowedValuesFreiText = Nothing
Me.cbxRoutenart._allowFreiText = False
Me.cbxRoutenart._value = ""
Me.cbxRoutenart.Enabled = False
Me.cbxRoutenart.FormattingEnabled = True
Me.cbxRoutenart.Location = New System.Drawing.Point(10, 77)
Me.cbxRoutenart.Name = "cbxRoutenart"
Me.cbxRoutenart.Size = New System.Drawing.Size(121, 21)
Me.cbxRoutenart.TabIndex = 3
'
'dgvNCTSRouten
'
Me.dgvNCTSRouten.AKTUALISIERUNGS_INTERVALL = -1
Me.dgvNCTSRouten.AllowUserToAddRows = False
Me.dgvNCTSRouten.AllowUserToDeleteRows = False
Me.dgvNCTSRouten.AllowUserToResizeColumns = False
Me.dgvNCTSRouten.AllowUserToResizeRows = False
Me.dgvNCTSRouten.BackgroundColor = System.Drawing.Color.White
Me.dgvNCTSRouten.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize
Me.dgvNCTSRouten.Location = New System.Drawing.Point(12, 145)
Me.dgvNCTSRouten.MultiSelect = False
Me.dgvNCTSRouten.Name = "dgvNCTSRouten"
Me.dgvNCTSRouten.ReadOnly = True
Me.dgvNCTSRouten.RowHeadersVisible = False
Me.dgvNCTSRouten.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect
Me.dgvNCTSRouten.Size = New System.Drawing.Size(437, 217)
Me.dgvNCTSRouten.TabIndex = 10
'
'frmNCTSRouten
'
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
Me.ClientSize = New System.Drawing.Size(480, 415)
Me.Controls.Add(Me.pnlNCTSRouten)
Me.Controls.Add(Me.dgvNCTSRouten)
Me.Controls.Add(Me.btn_Cancel)
Me.Controls.Add(Me.btn_OK)
Me.Name = "frmNCTSRouten"
Me.Text = "frmNCTSRouten"
Me.pnlNCTSRouten.ResumeLayout(False)
Me.pnlNCTSRouten.PerformLayout()
CType(Me.dgvNCTSRouten, System.ComponentModel.ISupportInitialize).EndInit()
Me.ResumeLayout(False)
End Sub
Friend WithEvents Label1 As Label
Friend WithEvents btn_OK As Button
Friend WithEvents btn_Cancel As Button
Friend WithEvents Label2 As Label
Friend WithEvents Label3 As Label
Friend WithEvents Label4 As Label
Friend WithEvents txtDauer As TextBox
Friend WithEvents cbxRoutenart As VERAG_PROG_ALLGEMEIN.MyComboBox
Friend WithEvents cbxNach As VERAG_PROG_ALLGEMEIN.MyComboBox
Friend WithEvents dgvNCTSRouten As VERAG_PROG_ALLGEMEIN.MyDatagridview
Friend WithEvents btnNeu As Button
Friend WithEvents pnlNCTSRouten As VERAG_PROG_ALLGEMEIN.MyPanel
Friend WithEvents sbxVon As VERAG_PROG_ALLGEMEIN.MySearchBox
End Class

120
Aviso/frmNCTSRouten.resx Normal file
View File

@@ -0,0 +1,120 @@
<?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>
</root>

188
Aviso/frmNCTSRouten.vb Normal file
View File

@@ -0,0 +1,188 @@

Imports VERAG_PROG_ALLGEMEIN
Public Class frmNCTSRouten
Dim routenId As Integer = -1
Private sql As New VERAG_PROG_ALLGEMEIN.SQL
Dim currentRoute As New VERAG_PROG_ALLGEMEIN.cNCTSRouten
Private Sub frmNCTSRouten_Load(sender As Object, e As EventArgs) Handles MyBase.Load
init()
End Sub
Sub init()
btn_OK.Text = "OK"
initDGVRouten()
cbxNach.Items.Clear()
cbxNach.Items.Add(New VERAG_PROG_ALLGEMEIN.MyListItem("", ""))
cbxNach.Items.Add(New VERAG_PROG_ALLGEMEIN.MyListItem("Suben", "SUB"))
cbxNach.Items.Add(New VERAG_PROG_ALLGEMEIN.MyListItem("Salzburg", "SBG"))
cbxNach.Items.Add(New VERAG_PROG_ALLGEMEIN.MyListItem("Waidhofen", "WAI"))
cbxNach.Items.Add(New VERAG_PROG_ALLGEMEIN.MyListItem("Nickelsdorf", "NKD"))
cbxNach.changeItem("")
cbxRoutenart.Items.Clear()
cbxRoutenart.Items.Add(New VERAG_PROG_ALLGEMEIN.MyListItem("", ""))
cbxRoutenart.Items.Add(New VERAG_PROG_ALLGEMEIN.MyListItem("Landweg", "Landweg"))
cbxRoutenart.Items.Add(New VERAG_PROG_ALLGEMEIN.MyListItem("Seeweg", "Seeweg"))
cbxRoutenart.changeItem("")
sbxVon.initSearchBox(Me.FindForm, "[Code] ,[Code] as Nr,Description as Dienststelle,left(Code,2) as Land,[Description] +' (' +left(Code,2)+')' as display FROM [tbl_DY_ZollDE_C0141_Zollstellen]", {" [Code]", "Description"}, " (StartDate is null OR StartDate< GETDATE()) AND (EndDate is null OR EndDate> GETDATE()) ", " left(Code,2),[Description]", "Code", "display", "FMZOLL", , 400, 200, {"display", "Code"})
dgvNCTSRouten.ClearSelection()
DisableUserControl()
End Sub
Sub initDGVRouten()
dgvNCTSRouten.Enabled = True
With dgvNCTSRouten
.Columns.Clear()
.DataSource = sql.loadDgvBySql("SELECT [nctsr_id],[nctsr_von],[nctsr_nach],[nctsr_dauer_in_tagen],[nctsr_route] FROM [VERAG].[dbo].[tblNTCSRouten]",
"VERAG")
' .RowTemplate.Height = 30
.Columns("nctsr_id").Visible = False
.Columns("nctsr_von").AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill
.Columns("nctsr_von").HeaderText = "Von"
.Columns("nctsr_nach").AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill
.Columns("nctsr_nach").HeaderText = "Nach"
.Columns("nctsr_dauer_in_tagen").Visible = True
.Columns("nctsr_dauer_in_tagen").Width = 50
.Columns("nctsr_dauer_in_tagen").HeaderText = "Dauer"
.Columns("nctsr_dauer_in_tagen").DefaultCellStyle.Alignment = DataGridViewContentAlignment.TopCenter
.Columns("nctsr_route").Visible = True
.Columns("nctsr_route").Width = 100
.Columns("nctsr_route").HeaderText = "Route"
.Columns("nctsr_route").DefaultCellStyle.Alignment = DataGridViewContentAlignment.TopCenter
End With
End Sub
Private Sub saveRoute(curRoute As cNCTSRouten)
curRoute.nctsr_von = sbxVon._value
curRoute.nctsr_nach = cbxNach._value
curRoute.nctsr_route = cbxRoutenart._value
curRoute.nctsr_dauer_in_tagen = CInt(txtDauer.Text)
If Not curRoute.SAVE() Then
Me.DialogResult = Windows.Forms.DialogResult.None
End If
dgvNCTSRouten.GetOrder()
initDGVRouten()
dgvNCTSRouten.SetOrder()
End Sub
Private Sub btnNeu_Click(sender As Object, e As EventArgs) Handles btnNeu.Click
dgvNCTSRouten.ClearSelection()
dgvNCTSRouten.Enabled = False
currentRoute = New VERAG_PROG_ALLGEMEIN.cNCTSRouten With {
.nctsr_von = "",
.nctsr_nach = "",
.nctsr_dauer_in_tagen = 0,
.nctsr_route = "Landweg"
}
loadChangedDSToPanel(currentRoute)
EnableUserControl()
setSaveButton()
End Sub
Sub setSaveButton()
btn_OK.Text = "Speichern"
End Sub
Private Sub loadChangedDSToPanel(curRoute As VERAG_PROG_ALLGEMEIN.cNCTSRouten)
sbxVon.SET_VALUE(curRoute.nctsr_von.ToString)
cbxNach.Items.Add(New VERAG_PROG_ALLGEMEIN.MyListItem(curRoute.nctsr_nach.ToString, curRoute.nctsr_nach.ToString))
cbxNach._value = curRoute.nctsr_nach.ToString
cbxRoutenart._value = curRoute.nctsr_route.ToString
txtDauer.Text = curRoute.nctsr_dauer_in_tagen.ToString
For Each c As Control In pnlNCTSRouten.Controls
If TypeOf (c) Is CheckBox Then
AddHandler CType(c, ComboBox).SelectedValueChanged, AddressOf SomethingChanged
ElseIf TypeOf (c) Is TextBox Then
AddHandler CType(c, TextBox).TextChanged, AddressOf SomethingChanged
End If
Next
End Sub
Private Sub SomethingChanged(sender As Object, e As EventArgs)
setSaveButton()
End Sub
Private Sub btn_OK_Click(sender As Object, e As EventArgs) Handles btn_OK.Click
If (btn_OK.Text = "Speichern") Then
saveRoute(currentRoute)
btn_OK.Text = "OK"
Else
Close()
End If
End Sub
Private Sub btn_Cancel_Click(sender As Object, e As EventArgs) Handles btn_Cancel.Click
Close()
End Sub
Private Sub EnableUserControl()
cbxNach.Enabled = True
cbxRoutenart.Enabled = True
sbxVon.Enabled = True
txtDauer.Enabled = True
End Sub
Private Sub DisableUserControl()
cbxNach.Enabled = False
cbxRoutenart.Enabled = False
sbxVon.Enabled = False
txtDauer.Enabled = False
End Sub
Private Sub dgvNCTSRouten_SelectionChanged(sender As Object, e As EventArgs) Handles dgvNCTSRouten.SelectionChanged
If dgvNCTSRouten.SelectedRows.Count > 0 Then
EnableUserControl()
Dim rowindex = dgvNCTSRouten.SelectedRows(0).Index
currentRoute = New VERAG_PROG_ALLGEMEIN.cNCTSRouten(dgvNCTSRouten.SelectedRows(0).Cells("nctsr_id").Value)
loadChangedDSToPanel(currentRoute)
If dgvNCTSRouten.Enabled = False Then Exit Sub
routenId = dgvNCTSRouten.SelectedRows(0).Cells("nctsr_id").Value
End If
End Sub
Private Sub sbxVon_PreviewKeyDown(sender As Object, e As PreviewKeyDownEventArgs) Handles sbxVon.PreviewKeyDown
If sender Is sbxVon Then sbxVon.FireReturn() : e.IsInputKey = True : Me.DialogResult = DialogResult.None
End Sub
End Class