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.
203 lines
6.5 KiB
203 lines
6.5 KiB
Imports System.ComponentModel
|
|
Imports System.Data.SqlClient
|
|
Imports System.Data.SqlTypes
|
|
|
|
Public Class BEA_FunktionDetail
|
|
|
|
|
|
#Region "Properties"
|
|
Dim m_ConnectionString As String
|
|
<DefaultValue("data source=shu00;initial catalog=BEA;persist security info=False;workstation id=SHU;packet size=4096;user id=sa;password=*shu29"), Description("ConnectionString"), Category("Options")> _
|
|
Public Property ConnectionString() As String
|
|
Get
|
|
ConnectionString = m_ConnectionString
|
|
End Get
|
|
Set(ByVal Value As String)
|
|
If m_ConnectionString <> Value Then
|
|
m_ConnectionString = Value
|
|
Globals.conn.sConnectionString = m_ConnectionString
|
|
End If
|
|
End Set
|
|
End Property
|
|
|
|
Dim m_FunktionNr As Integer
|
|
<DefaultValue(1), Description("ThemaNr"), Category("Options")> _
|
|
Public Property FunktionNr As Integer
|
|
Get
|
|
FunktionNr = m_FunktionNr
|
|
End Get
|
|
Set(value As Integer)
|
|
If m_FunktionNr <> value Then
|
|
m_FunktionNr = value
|
|
Try
|
|
Refresh_Details()
|
|
Catch ex As Exception
|
|
MsgBox(ex.Message)
|
|
|
|
End Try
|
|
End If
|
|
End Set
|
|
End Property
|
|
|
|
Dim m_Mitarbeiternr As Integer
|
|
<DefaultValue(1), Description("Mitarbeiternr"), Category("Options")> _
|
|
Public Property Mitarbeiternr As Integer
|
|
Get
|
|
Mitarbeiternr = m_Mitarbeiternr
|
|
End Get
|
|
Set(value As Integer)
|
|
If m_Mitarbeiternr <> value Then
|
|
m_Mitarbeiternr = value
|
|
Globals.Mitarbeiternr = m_Mitarbeiternr
|
|
End If
|
|
End Set
|
|
End Property
|
|
|
|
Dim m_TempFilePath As String
|
|
<DefaultValue("h:\tssettings\themenmgmt"), Description("Temp Filepath"), Category("Options")> _
|
|
Public Property TempFilePath As String
|
|
Get
|
|
TempFilePath = m_TempFilePath
|
|
End Get
|
|
Set(value As String)
|
|
If m_TempFilePath <> value Then
|
|
m_TempFilePath = value
|
|
Globals.TmpFilepath = m_TempFilePath
|
|
End If
|
|
End Set
|
|
End Property
|
|
|
|
Dim m_Show_Toolbar As Boolean = True
|
|
<DefaultValue(True), Description("Dateimenu anzeigen"), Category("Options")> _
|
|
Public Property Show_Toolbar() As Boolean
|
|
Get
|
|
Show_Toolbar = m_Show_Toolbar
|
|
End Get
|
|
Set(ByVal Value As Boolean)
|
|
If m_Show_Toolbar <> Value Then
|
|
m_Show_Toolbar = Value
|
|
Set_ShowToolbar()
|
|
End If
|
|
|
|
End Set
|
|
End Property
|
|
|
|
Dim m_Show_Editfunctions As Boolean = True
|
|
<DefaultValue(True), Description("Editfunktionen anzeigen"), Category("Options")> _
|
|
Public Property Show_Editfunctions() As Boolean
|
|
Get
|
|
Show_Editfunctions = m_Show_Editfunctions
|
|
End Get
|
|
Set(ByVal Value As Boolean)
|
|
If m_Show_Editfunctions <> Value Then
|
|
m_Show_Editfunctions = Value
|
|
Set_EditFunctions()
|
|
End If
|
|
|
|
End Set
|
|
End Property
|
|
#End Region
|
|
|
|
#Region "Deklarationen"
|
|
Dim FS As New DB.clsMyFunktionsstelle
|
|
Event Beziehungen_DoubleClicked(ByVal keyvalue As Integer, ByVal Typ As String, ByVal NewWindows As Boolean)
|
|
|
|
#End Region
|
|
|
|
|
|
Sub Refresh_Details()
|
|
get_data()
|
|
End Sub
|
|
|
|
Sub Set_EditFunctions()
|
|
|
|
End Sub
|
|
|
|
Sub Set_ShowToolbar()
|
|
|
|
End Sub
|
|
|
|
|
|
Sub New()
|
|
InitializeComponent()
|
|
|
|
Me.ConnectionString = "data source=shu00;initial catalog=BEA;persist security info=False;workstation id=SHU;packet size=4096;user id=sa;password=*shu29"
|
|
|
|
Me.Mitarbeiternr = 1
|
|
Me.FunktionNr = -1
|
|
Me.TempFilePath = "h:\tssettings\bea"
|
|
Globals.conn.sConnectionString = Me.ConnectionString
|
|
Globals.sConnectionString = Me.ConnectionString
|
|
Globals.Mitarbeiternr = Mitarbeiternr
|
|
Globals.TmpFilepath = TempFilePath
|
|
Set_ShowToolbar()
|
|
Set_EditFunctions()
|
|
|
|
Me.Beziehungen1.ConnectionString = Me.ConnectionString
|
|
Me.Beziehungen1.Mitarbeiternr = Me.Mitarbeiternr
|
|
Me.Beziehungen1.TempFilePath = Me.TempFilePath
|
|
|
|
End Sub
|
|
|
|
|
|
#Region "Daten"
|
|
Sub get_data()
|
|
FS.Get_Data(Me.FunktionNr)
|
|
If FS.sFunktionsnummer.IsNull Then Me.txtFunktionsnummer.Text = "" Else Me.txtFunktionsnummer.Text = FS.sFunktionsnummer.Value
|
|
If FS.sFunktionsstelle.IsNull Then Me.txtFunktionsstelle.Text = "" Else Me.txtFunktionsstelle.Text = FS.sFunktionsstelle.Value
|
|
If FS.sBezeichnung.IsNull Then Me.txtBezeichnung.Text = "" Else Me.txtBezeichnung.Text = FS.sBezeichnung.Value
|
|
If FS.sBeschreibung.IsNull Then Me.txtBeschreibung.Text = "" Else Me.txtBeschreibung.Text = FS.sBeschreibung.Value
|
|
Me.txtMutiertam.Text = FS.daMutiert_am.ToString
|
|
Me.txtErstelltam.Text = FS.daErstellt_am.ToString
|
|
Me.txtMutierer.Text = FS.MutiererText
|
|
Me.cbAktiv.Checked = FS.bAktiv.Value = True
|
|
Me.txtParent.Text = FS.Get_Parent
|
|
Dim dt As New DataTable
|
|
|
|
dt = FS.Get_Mitarbeiterdaten()
|
|
Me.C1Mitarbeiter.DataSource = Nothing
|
|
Me.C1Mitarbeiter.DataSource = dt
|
|
Me.C1Mitarbeiter.DataMember = dt.TableName
|
|
|
|
Me.Beziehungen1.Type = "Funktionstelle"
|
|
Me.Beziehungen1.KeyValue = FS.iFunktionstelleNr.Value
|
|
|
|
|
|
|
|
End Sub
|
|
|
|
Sub Save_Data()
|
|
FS.sBezeichnung = New SqlString(CType(Me.txtBezeichnung.Text, String))
|
|
FS.sBeschreibung = New SqlString(CType(Me.txtBeschreibung.Text, String))
|
|
FS.sFunktionsnummer = New SqlString(CType(Me.txtFunktionsnummer.Text, String))
|
|
FS.sFunktionsstelle = New SqlString(CType(Me.txtFunktionsstelle.Text, String))
|
|
FS.bAktiv = New SqlBoolean(CType(Me.cbAktiv.Checked, Boolean))
|
|
|
|
FS.Save_Data()
|
|
|
|
End Sub
|
|
|
|
#End Region
|
|
|
|
Private Sub ToolStripButton1_Click(sender As Object, e As EventArgs) Handles ToolStripButton1.Click
|
|
Save_Data()
|
|
End Sub
|
|
|
|
Private Sub BEA_FunktionDetail_Load(sender As Object, e As EventArgs) Handles MyBase.Load
|
|
|
|
End Sub
|
|
|
|
Private Sub GroupBox2_Enter(sender As Object, e As EventArgs) Handles GroupBox2.Enter
|
|
|
|
End Sub
|
|
|
|
Private Sub C1Beziehungen_Click(sender As Object, e As EventArgs)
|
|
|
|
End Sub
|
|
|
|
|
|
Private Sub Beziehungen1_C1Bezeihungen_DoubleClicked(keyvalue As Integer, Typ As String, NewWindows As Boolean) Handles Beziehungen1.C1Beziehungen_DoubleClicked
|
|
RaiseEvent Beziehungen_DoubleClicked(keyvalue, Typ, NewWindows)
|
|
End Sub
|
|
End Class
|