Initial
This commit is contained in:
155
EDOKA/Backup/DiverseFormulare/frmLogin.vb
Normal file
155
EDOKA/Backup/DiverseFormulare/frmLogin.vb
Normal file
@@ -0,0 +1,155 @@
|
||||
Imports System.ComponentModel
|
||||
Public Class frmLogin
|
||||
Inherits System.Windows.Forms.Form
|
||||
Dim m_mitarbeiternr As Long
|
||||
Dim db As New edokadb.clsMyMitarbeiter()
|
||||
|
||||
Property Mitarbeiternr() As Long
|
||||
Get
|
||||
Return m_mitarbeiternr
|
||||
End Get
|
||||
Set(ByVal Value As Long)
|
||||
m_mitarbeiternr = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
#Region " Vom Windows Form Designer generierter Code "
|
||||
|
||||
Public Sub New()
|
||||
MyBase.New()
|
||||
|
||||
' Dieser Aufruf ist für den Windows Form-Designer erforderlich.
|
||||
InitializeComponent()
|
||||
|
||||
' Initialisierungen nach dem Aufruf InitializeComponent() hinzufügen
|
||||
|
||||
End Sub
|
||||
|
||||
' Die Form überschreibt den Löschvorgang der Basisklasse, um Komponenten zu bereinigen.
|
||||
Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean)
|
||||
If disposing Then
|
||||
If Not (components Is Nothing) Then
|
||||
components.Dispose()
|
||||
End If
|
||||
End If
|
||||
MyBase.Dispose(disposing)
|
||||
End Sub
|
||||
|
||||
' Für Windows Form-Designer erforderlich
|
||||
Private components As System.ComponentModel.IContainer
|
||||
|
||||
'HINWEIS: Die folgende Prozedur ist für den Windows Form-Designer erforderlich
|
||||
'Sie kann mit dem Windows Form-Designer modifiziert werden.
|
||||
'Verwenden Sie nicht den Code-Editor zur Bearbeitung.
|
||||
Friend WithEvents ComboBox1 As System.Windows.Forms.ComboBox
|
||||
Friend WithEvents DataSet1 As System.Data.DataSet
|
||||
Friend WithEvents Label1 As System.Windows.Forms.Label
|
||||
Friend WithEvents Button1 As System.Windows.Forms.Button
|
||||
Friend WithEvents Button2 As System.Windows.Forms.Button
|
||||
<System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()
|
||||
Dim resources As System.Resources.ResourceManager = New System.Resources.ResourceManager(GetType(frmLogin))
|
||||
Me.ComboBox1 = New System.Windows.Forms.ComboBox()
|
||||
Me.DataSet1 = New System.Data.DataSet()
|
||||
Me.Label1 = New System.Windows.Forms.Label()
|
||||
Me.Button1 = New System.Windows.Forms.Button()
|
||||
Me.Button2 = New System.Windows.Forms.Button()
|
||||
CType(Me.DataSet1, System.ComponentModel.ISupportInitialize).BeginInit()
|
||||
Me.SuspendLayout()
|
||||
'
|
||||
'ComboBox1
|
||||
'
|
||||
Me.ComboBox1.Location = New System.Drawing.Point(32, 32)
|
||||
Me.ComboBox1.Name = "ComboBox1"
|
||||
Me.ComboBox1.Size = New System.Drawing.Size(248, 21)
|
||||
Me.ComboBox1.TabIndex = 0
|
||||
'
|
||||
'DataSet1
|
||||
'
|
||||
Me.DataSet1.DataSetName = "NewDataSet"
|
||||
Me.DataSet1.Locale = New System.Globalization.CultureInfo("de-CH")
|
||||
'
|
||||
'Label1
|
||||
'
|
||||
Me.Label1.Location = New System.Drawing.Point(32, 8)
|
||||
Me.Label1.Name = "Label1"
|
||||
Me.Label1.Size = New System.Drawing.Size(136, 23)
|
||||
Me.Label1.TabIndex = 2
|
||||
Me.Label1.Text = "Bitte melden Sie sich an"
|
||||
'
|
||||
'Button1
|
||||
'
|
||||
Me.Button1.DialogResult = System.Windows.Forms.DialogResult.OK
|
||||
Me.Button1.Location = New System.Drawing.Point(32, 72)
|
||||
Me.Button1.Name = "Button1"
|
||||
Me.Button1.Size = New System.Drawing.Size(104, 24)
|
||||
Me.Button1.TabIndex = 3
|
||||
Me.Button1.Text = "&Anmelden"
|
||||
'
|
||||
'Button2
|
||||
'
|
||||
Me.Button2.DialogResult = System.Windows.Forms.DialogResult.OK
|
||||
Me.Button2.Location = New System.Drawing.Point(176, 72)
|
||||
Me.Button2.Name = "Button2"
|
||||
Me.Button2.Size = New System.Drawing.Size(104, 24)
|
||||
Me.Button2.TabIndex = 4
|
||||
Me.Button2.Text = "&Abbruch"
|
||||
'
|
||||
'frmLogin
|
||||
'
|
||||
Me.AutoScaleBaseSize = New System.Drawing.Size(5, 13)
|
||||
Me.ClientSize = New System.Drawing.Size(304, 117)
|
||||
Me.Controls.AddRange(New System.Windows.Forms.Control() {Me.Button2, Me.Button1, Me.Label1, Me.ComboBox1})
|
||||
Me.Icon = CType(resources.GetObject("$this.Icon"), System.Drawing.Icon)
|
||||
Me.MaximizeBox = False
|
||||
Me.MinimizeBox = False
|
||||
Me.Name = "frmLogin"
|
||||
Me.ShowInTaskbar = False
|
||||
Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen
|
||||
Me.Text = "EDOKA-Anmeldung"
|
||||
Me.TopMost = True
|
||||
CType(Me.DataSet1, System.ComponentModel.ISupportInitialize).EndInit()
|
||||
Me.ResumeLayout(False)
|
||||
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
|
||||
Dim WithEvents cbo As New MultiComboBox()
|
||||
Private Sub frmLogin_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
|
||||
Dim db As New edokadb.clsMyMitarbeiter()
|
||||
Dim t As DataTable
|
||||
db.cpMainConnectionProvider = conn
|
||||
t = db.SelectAllMandantMitarbeiter
|
||||
cbo = New MultiComboBox(Me.ComboBox1)
|
||||
cbo.NullValueMessage = Globals.MyTxt.gettext(18)
|
||||
cbo.CheckNullValue = True
|
||||
cbo.DisplayColumnName = "namevorname"
|
||||
cbo.ValueColumnName = "mitarbeiternr"
|
||||
cbo.Fill_Data(t, False)
|
||||
Me.ComboBox1.Select()
|
||||
Me.ComboBox1.Focus()
|
||||
End Sub
|
||||
|
||||
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
|
||||
Try
|
||||
m_mitarbeiternr = Me.cbo.SelectedValue
|
||||
db.SelectMitarbeiterWithNr(m_mitarbeiternr)
|
||||
db.Dispose()
|
||||
Close()
|
||||
Catch
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
|
||||
m_mitarbeiternr = -99999
|
||||
db.Dispose()
|
||||
Close()
|
||||
End Sub
|
||||
|
||||
Private Sub Handle_enter(ByVal sender As System.Object, ByVal e As KeyPressEventArgs) Handles cbo.KeyPress
|
||||
If e.KeyChar = Chr(13) Then
|
||||
Button1_Click(sender, e)
|
||||
End If
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
Reference in New Issue
Block a user