You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
72 lines
2.5 KiB
72 lines
2.5 KiB
Public Class Selektion_Mandant
|
|
|
|
#Region "Deklarationen"
|
|
Private _mandantnr As Long
|
|
Private _mandant As String
|
|
|
|
Property mandantnr() As Long
|
|
Get
|
|
Return _mandantnr
|
|
End Get
|
|
Set(ByVal Value As Long)
|
|
_mandantnr = Value
|
|
End Set
|
|
End Property
|
|
|
|
Property mandant() As String
|
|
Get
|
|
Return _mandant
|
|
End Get
|
|
Set(ByVal Value As String)
|
|
_mandant = Value
|
|
End Set
|
|
End Property
|
|
#End Region
|
|
|
|
' vorhandene aktive Mandanten laden
|
|
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
|
|
Dim ts As New EDOKA.Tabellenspalte()
|
|
Dim titel As New EDOKA.MySpaltenTitel()
|
|
Dim mandanten As New edokadb.clsMyMandat()
|
|
Dim i As Integer
|
|
mandantnr = 0
|
|
mandant = ""
|
|
mandanten.cpMainConnectionProvider = conn
|
|
' Lesen der vorhandenen Daten
|
|
' Aufbereitung im Datagrid Mandantlist
|
|
Me.MandantList.DataSource = mandanten.SelectAll
|
|
Me.MandantList.Caption = ""
|
|
Me.MandantList.SelectedIndex = 0
|
|
For i = 0 To Me.MandantList.Columns.Count - 1
|
|
ts.Tabelle = "Mandant"
|
|
ts.Feld = Me.MandantList.Columns(i).Caption
|
|
ts.getspalte()
|
|
Me.MandantList.Columns(i).Caption = ts.spaltenname
|
|
Next
|
|
End Sub
|
|
|
|
'Prüfung, ob ein Mandant ausgewählt wurde. Wenn nicht, dann Fehlermeldung ausgeben
|
|
Private Sub BtnOK_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BtnOK.Click
|
|
If Me.MandantList.GetItemText(Me.MandantList.SelectedIndex, 0) = "" Then
|
|
MyMsg.show_standardmessage(1, MsgBoxStyle.Question)
|
|
Else
|
|
mandantnr = Me.MandantList.GetItemText(Me.MandantList.SelectedIndex, 0)
|
|
mandant = Me.MandantList.GetItemText(Me.MandantList.SelectedIndex, 1)
|
|
Globals.MandantNr = mandantnr
|
|
Globals.MandantText = mandant
|
|
Me.Close()
|
|
End If
|
|
End Sub
|
|
|
|
'Bei Abbruch Anwendung schliessen
|
|
Private Sub BtnAbbruch_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BtnAbbruch.Click
|
|
If MyMsg.Show_MessageYesNo(1) = MsgBoxResult.Yes Then
|
|
End
|
|
End If
|
|
End Sub
|
|
|
|
Private Sub MandantList_Doubleclick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MandantList.DoubleClick
|
|
BtnOK_Click(sender, e)
|
|
End Sub
|
|
|
|
End Class |