This commit is contained in:
SchreiberM
2016-11-17 16:32:58 +01:00
parent d8ab5633e8
commit 8dd7f6448e
24 changed files with 4223 additions and 2709 deletions

View File

@@ -0,0 +1,256 @@
Imports System.Data.Odbc
Public Class ClassDatabase
Public Shared ConnectionStringRM As String
Public Shared Function Init()
Try
Dim SQLconnect As New SqlClient.SqlConnection
SQLconnect.ConnectionString = ConnectionStringRM
SQLconnect.Open()
SQLconnect.Close()
Return True
Catch ex As Exception
MsgBox("Error in DatabaseInit: " & ex.Message, MsgBoxStyle.Critical)
Return False
End Try
End Function
Public Shared Function GetConnectionString(id As Integer)
Dim connectionString As String = ""
Try
'Me.TBCONNECTIONTableAdapter.FillByID(Me.DD_DMSLiteDataSet.TBCONNECTION, id)
Dim DTConnection As DataTable = ClassDatabase.Return_Datatable("SELECT * FROM TBDD_CONNECTION WHERE GUID = " & id)
If DTConnection.Rows.Count = 1 Then
Select Case DTConnection.Rows(0).Item("SQL_PROVIDER")
Case "MS-SQLServer"
If DTConnection.Rows(0).Item("USERNAME") = "WINAUTH" Then
connectionString = "Server=" & DTConnection.Rows(0).Item("SERVER") & ";Database=" & DTConnection.Rows(0).Item("DATENBANK") & ";Trusted_Connection=True;"
Else
connectionString = "Server=" & DTConnection.Rows(0).Item("SERVER") & ";Database=" & DTConnection.Rows(0).Item("DATENBANK") & ";User Id=" & DTConnection.Rows(0).Item("USERNAME") & ";Password=" & DTConnection.Rows(0).Item("USERNAME") & ";Password=" & DTConnection.Rows(0).Item("PASSWORD") & ";"
End If
' connectionString = "Server=" & DTConnection.Rows(0).Item("SERVER") & ";Database=" & DTConnection.Rows(0).Item("DATENBANK") & ";User Id=" & DTConnection.Rows(0).Item("USERNAME") & ";Password=" & DTConnection.Rows(0).Item("PASSWORD") & ";"
Case Else
MsgBox("ConnectionType nicht integriert", MsgBoxStyle.Critical, "Bitte Konfiguration Connection überprüfen!")
End Select
End If
Catch ex As Exception
MsgBox("Error in GetConnectionString: " & ex.Message, MsgBoxStyle.Critical)
MsgBox(ex.Message, MsgBoxStyle.Critical, "Error in GetConnectionString:")
End Try
Return connectionString
End Function
Public Shared Function Return_Datatable(Select_anweisung As String, Optional CallMethod As String = "")
Try
Dim SQLconnect As New SqlClient.SqlConnection
Dim SQLcommand As SqlClient.SqlCommand
SQLconnect.ConnectionString = ConnectionStringRM
SQLconnect.Open()
SQLcommand = SQLconnect.CreateCommand
SQLcommand.CommandText = Select_anweisung
Dim adapter1 As SqlClient.SqlDataAdapter = New SqlClient.SqlDataAdapter(SQLcommand)
Dim dt As DataTable = New DataTable()
adapter1.Fill(dt)
SQLconnect.Close()
Return dt
Catch ex As Exception
MsgBox("Error in Return_Datatable: " & ex.Message & vbNewLine & vbNewLine & Select_anweisung & vbNewLine & vbNewLine & "Call-Method: " & CallMethod, MsgBoxStyle.Critical)
Return Nothing
End Try
End Function
Public Shared Function MSSQL_ReturnDTWithConnection(connectionId As Integer, sql As String)
Try
Dim regex As New System.Text.RegularExpressions.Regex("(@(\d+)@)")
Dim match As System.Text.RegularExpressions.Match = regex.Match(sql)
If match.Success Then
'Return Nothing
End If
Dim connectionString As String
connectionString = ClassDatabase.GetConnectionString(connectionId)
If connectionString <> "" Then
Dim SQLconnect As New SqlClient.SqlConnection
Dim SQLcommand As SqlClient.SqlCommand
SQLconnect.ConnectionString = connectionString
SQLconnect.Open()
SQLcommand = SQLconnect.CreateCommand
SQLcommand.CommandText = sql
Dim adapter1 As SqlClient.SqlDataAdapter = New SqlClient.SqlDataAdapter(SQLcommand)
Dim dt As DataTable = New DataTable()
adapter1.Fill(dt)
SQLconnect.Close()
Return dt
Else
MsgBox("No Connection received for ID: " & connectionId.ToString, MsgBoxStyle.Exclamation)
Return Nothing
End If
Catch ex As Exception
MsgBox("Unexpected Error in MSSQL_ReturnDTWithConnection:" & vbNewLine & ex.Message & vbNewLine & vbNewLine & sql, MsgBoxStyle.Critical)
Return Nothing
End Try
End Function
Public Shared Function Return_Datatable_CS(Select_anweisung As String, ConString As String, Optional userInput As Boolean = False)
Try
Dim SQLconnect As New SqlClient.SqlConnection
Dim SQLcommand As SqlClient.SqlCommand
SQLconnect.ConnectionString = ConString
SQLconnect.Open()
SQLcommand = SQLconnect.CreateCommand
SQLcommand.CommandText = Select_anweisung
Dim adapter1 As SqlClient.SqlDataAdapter = New SqlClient.SqlDataAdapter(SQLcommand)
Dim dt As DataTable = New DataTable()
adapter1.Fill(dt)
SQLconnect.Close()
Return dt
Catch ex As Exception
If userInput = True Then
MsgBox("Error in Return_Datatable_CS - Error-Message:" & vbNewLine & ex.Message & vbNewLine & "SQL-Command:" & vbNewLine & Select_anweisung, MsgBoxStyle.Critical)
End If
Return Nothing
End Try
End Function
Public Shared Function Return_Datatable_Connection(Select_anweisung As String, connectionId As Integer, Optional userInput As Boolean = False)
Try
Dim connectionString As String
connectionString = ClassDatabase.GetConnectionString(connectionId)
If connectionString <> "" Then
Dim SQLconnect As New SqlClient.SqlConnection
Dim SQLcommand As SqlClient.SqlCommand
SQLconnect.ConnectionString = connectionString
SQLconnect.Open()
SQLcommand = SQLconnect.CreateCommand
SQLcommand.CommandText = Select_anweisung
Dim adapter1 As SqlClient.SqlDataAdapter = New SqlClient.SqlDataAdapter(SQLcommand)
Dim dt As DataTable = New DataTable()
adapter1.Fill(dt)
SQLconnect.Close()
Return dt
Else
Return Nothing
End If
Catch ex As Exception
If userInput = True Then
MsgBox("Error in Return_Datatable_Connection - Error-Message:" & vbNewLine & ex.Message & vbNewLine & "SQL-Command:" & vbNewLine & Select_anweisung, MsgBoxStyle.Critical)
End If
Return Nothing
End Try
End Function
Public Shared Function Execute_non_Query(ExecuteCMD As String, Optional Userinput As Boolean = False)
Try
Dim SQLconnect As New SqlClient.SqlConnection
Dim SQLcommand As SqlClient.SqlCommand
SQLconnect.ConnectionString = ConnectionStringRM
SQLconnect.Open()
SQLcommand = SQLconnect.CreateCommand
SQLcommand.CommandTimeout = 120
'Update Last Created Record in Foo
SQLcommand.CommandText = ExecuteCMD
SQLcommand.ExecuteNonQuery()
SQLcommand.Dispose()
SQLconnect.Close()
Return True
Catch ex As Exception
MsgBox("Error in Execute_non_Query: " & ex.Message & vbNewLine & vbNewLine & ExecuteCMD, MsgBoxStyle.Critical)
Return False
End Try
End Function
Public Shared Function Execute_non_Query_withConn(ExecuteCMD As String, ConnID As Integer)
Try
Dim connectionString As String
connectionString = ClassDatabase.GetConnectionString(ConnID)
If connectionString <> "" Then
Dim SQLconnect As New SqlClient.SqlConnection
Dim SQLcommand As SqlClient.SqlCommand
SQLconnect.ConnectionString = connectionString
SQLconnect.Open()
SQLcommand = SQLconnect.CreateCommand
'Update Last Created Record in Foo
SQLcommand.CommandText = ExecuteCMD
SQLcommand.ExecuteNonQuery()
SQLcommand.Dispose()
SQLconnect.Close()
Return True
Else
MsgBox("No ConnectionID for Conn-ID: " & ConnID.ToString, MsgBoxStyle.Exclamation)
Return Nothing
End If
Catch ex As Exception
MsgBox("Error in Execute_non_Query_withConn: " & ex.Message & vbNewLine & vbNewLine & ExecuteCMD, MsgBoxStyle.Critical)
Return False
End Try
End Function
Public Shared Function Execute_Scalar(cmdscalar As String, Optional Userinput As Boolean = False)
Dim result
Try
Dim SQLconnect As New SqlClient.SqlConnection
Dim SQLcommand As SqlClient.SqlCommand
SQLconnect.ConnectionString = ConnectionStringRM
SQLconnect.Open()
SQLcommand = SQLconnect.CreateCommand
'Update Last Created Record in Foo
SQLcommand.CommandText = cmdscalar
result = SQLcommand.ExecuteScalar()
SQLcommand.Dispose()
SQLconnect.Close()
Return result
Catch ex As Exception
MsgBox("Error in Execute_Scalar: " & ex.Message & vbNewLine & vbNewLine & cmdscalar, MsgBoxStyle.Critical)
Return Nothing
End Try
End Function
Public Shared Function Execute_ScalarWithConnection(connectionId As Integer, cmdscalar As String)
Dim result
Try
Dim connectionString As String
connectionString = ClassDatabase.GetConnectionString(connectionId)
If connectionString <> "" Then
Dim SQLconnect As New SqlClient.SqlConnection
Dim SQLcommand As SqlClient.SqlCommand
SQLconnect.ConnectionString = connectionString
SQLconnect.Open()
SQLcommand = SQLconnect.CreateCommand
'Update Last Created Record in Foo
SQLcommand.CommandText = cmdscalar
result = SQLcommand.ExecuteScalar()
SQLcommand.Dispose()
SQLconnect.Close()
Return result
Else
MsgBox("No Connection for ID: " & connectionId & " - ExecuteScalar: " & cmdscalar, MsgBoxStyle.Exclamation)
Return Nothing
End If
Catch ex As Exception
Return Nothing
End Try
End Function
End Class

View File

@@ -27,6 +27,8 @@ Partial Public Class MyDataset
Private tableVWPMO_RIGHTS_2B_WORKED As VWPMO_RIGHTS_2B_WORKEDDataTable
Private tableTBAD_Users As TBAD_UsersDataTable
Private _schemaSerializationMode As Global.System.Data.SchemaSerializationMode = Global.System.Data.SchemaSerializationMode.IncludeSchema
<Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
@@ -59,6 +61,9 @@ Partial Public Class MyDataset
If (Not (ds.Tables("VWPMO_RIGHTS_2B_WORKED")) Is Nothing) Then
MyBase.Tables.Add(New VWPMO_RIGHTS_2B_WORKEDDataTable(ds.Tables("VWPMO_RIGHTS_2B_WORKED")))
End If
If (Not (ds.Tables("TBAD_Users")) Is Nothing) Then
MyBase.Tables.Add(New TBAD_UsersDataTable(ds.Tables("TBAD_Users")))
End If
Me.DataSetName = ds.DataSetName
Me.Prefix = ds.Prefix
Me.Namespace = ds.Namespace
@@ -86,6 +91,16 @@ Partial Public Class MyDataset
End Get
End Property
<Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0"), _
Global.System.ComponentModel.Browsable(False), _
Global.System.ComponentModel.DesignerSerializationVisibility(Global.System.ComponentModel.DesignerSerializationVisibility.Content)> _
Public ReadOnly Property TBAD_Users() As TBAD_UsersDataTable
Get
Return Me.tableTBAD_Users
End Get
End Property
<Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0"), _
Global.System.ComponentModel.BrowsableAttribute(True), _
@@ -156,6 +171,9 @@ Partial Public Class MyDataset
If (Not (ds.Tables("VWPMO_RIGHTS_2B_WORKED")) Is Nothing) Then
MyBase.Tables.Add(New VWPMO_RIGHTS_2B_WORKEDDataTable(ds.Tables("VWPMO_RIGHTS_2B_WORKED")))
End If
If (Not (ds.Tables("TBAD_Users")) Is Nothing) Then
MyBase.Tables.Add(New TBAD_UsersDataTable(ds.Tables("TBAD_Users")))
End If
Me.DataSetName = ds.DataSetName
Me.Prefix = ds.Prefix
Me.Namespace = ds.Namespace
@@ -194,6 +212,12 @@ Partial Public Class MyDataset
Me.tableVWPMO_RIGHTS_2B_WORKED.InitVars()
End If
End If
Me.tableTBAD_Users = CType(MyBase.Tables("TBAD_Users"), TBAD_UsersDataTable)
If (initTable = True) Then
If (Not (Me.tableTBAD_Users) Is Nothing) Then
Me.tableTBAD_Users.InitVars()
End If
End If
End Sub
<Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
@@ -206,6 +230,8 @@ Partial Public Class MyDataset
Me.SchemaSerializationMode = Global.System.Data.SchemaSerializationMode.IncludeSchema
Me.tableVWPMO_RIGHTS_2B_WORKED = New VWPMO_RIGHTS_2B_WORKEDDataTable()
MyBase.Tables.Add(Me.tableVWPMO_RIGHTS_2B_WORKED)
Me.tableTBAD_Users = New TBAD_UsersDataTable()
MyBase.Tables.Add(Me.tableTBAD_Users)
End Sub
<Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
@@ -214,6 +240,12 @@ Partial Public Class MyDataset
Return False
End Function
<Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
Private Function ShouldSerializeTBAD_Users() As Boolean
Return False
End Function
<Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
Private Sub SchemaChanged(ByVal sender As Object, ByVal e As Global.System.ComponentModel.CollectionChangeEventArgs)
@@ -275,6 +307,9 @@ Partial Public Class MyDataset
<Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
Public Delegate Sub VWPMO_RIGHTS_2B_WORKEDRowChangeEventHandler(ByVal sender As Object, ByVal e As VWPMO_RIGHTS_2B_WORKEDRowChangeEvent)
<Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
Public Delegate Sub TBAD_UsersRowChangeEventHandler(ByVal sender As Object, ByVal e As TBAD_UsersRowChangeEvent)
'''<summary>
'''Represents the strongly named DataTable class.
'''</summary>
@@ -637,6 +672,327 @@ Partial Public Class MyDataset
End Function
End Class
'''<summary>
'''Represents the strongly named DataTable class.
'''</summary>
<Global.System.Serializable(), _
Global.System.Xml.Serialization.XmlSchemaProviderAttribute("GetTypedTableSchema")> _
Partial Public Class TBAD_UsersDataTable
Inherits Global.System.Data.TypedTableBase(Of TBAD_UsersRow)
Private columnSelect As Global.System.Data.DataColumn
Private columnUsername As Global.System.Data.DataColumn
Private columnPrename As Global.System.Data.DataColumn
Private columnSurname As Global.System.Data.DataColumn
Private columnEmail As Global.System.Data.DataColumn
Private columnID As Global.System.Data.DataColumn
<Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
Public Sub New()
MyBase.New()
Me.TableName = "TBAD_Users"
Me.BeginInit()
Me.InitClass()
Me.EndInit()
End Sub
<Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
Friend Sub New(ByVal table As Global.System.Data.DataTable)
MyBase.New()
Me.TableName = table.TableName
If (table.CaseSensitive <> table.DataSet.CaseSensitive) Then
Me.CaseSensitive = table.CaseSensitive
End If
If (table.Locale.ToString <> table.DataSet.Locale.ToString) Then
Me.Locale = table.Locale
End If
If (table.Namespace <> table.DataSet.Namespace) Then
Me.Namespace = table.Namespace
End If
Me.Prefix = table.Prefix
Me.MinimumCapacity = table.MinimumCapacity
End Sub
<Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
Protected Sub New(ByVal info As Global.System.Runtime.Serialization.SerializationInfo, ByVal context As Global.System.Runtime.Serialization.StreamingContext)
MyBase.New(info, context)
Me.InitVars()
End Sub
<Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
Public ReadOnly Property SelectColumn() As Global.System.Data.DataColumn
Get
Return Me.columnSelect
End Get
End Property
<Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
Public ReadOnly Property UsernameColumn() As Global.System.Data.DataColumn
Get
Return Me.columnUsername
End Get
End Property
<Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
Public ReadOnly Property PrenameColumn() As Global.System.Data.DataColumn
Get
Return Me.columnPrename
End Get
End Property
<Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
Public ReadOnly Property SurnameColumn() As Global.System.Data.DataColumn
Get
Return Me.columnSurname
End Get
End Property
<Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
Public ReadOnly Property EmailColumn() As Global.System.Data.DataColumn
Get
Return Me.columnEmail
End Get
End Property
<Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
Public ReadOnly Property IDColumn() As Global.System.Data.DataColumn
Get
Return Me.columnID
End Get
End Property
<Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0"), _
Global.System.ComponentModel.Browsable(False)> _
Public ReadOnly Property Count() As Integer
Get
Return Me.Rows.Count
End Get
End Property
<Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
Default Public ReadOnly Property Item(ByVal index As Integer) As TBAD_UsersRow
Get
Return CType(Me.Rows(index), TBAD_UsersRow)
End Get
End Property
<Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
Public Event TBAD_UsersRowChanging As TBAD_UsersRowChangeEventHandler
<Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
Public Event TBAD_UsersRowChanged As TBAD_UsersRowChangeEventHandler
<Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
Public Event TBAD_UsersRowDeleting As TBAD_UsersRowChangeEventHandler
<Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
Public Event TBAD_UsersRowDeleted As TBAD_UsersRowChangeEventHandler
<Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
Public Overloads Sub AddTBAD_UsersRow(ByVal row As TBAD_UsersRow)
Me.Rows.Add(row)
End Sub
<Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
Public Overloads Function AddTBAD_UsersRow(ByVal _Select As Boolean, ByVal Username As String, ByVal Prename As String, ByVal Surname As String, ByVal Email As String, ByVal ID As Short) As TBAD_UsersRow
Dim rowTBAD_UsersRow As TBAD_UsersRow = CType(Me.NewRow, TBAD_UsersRow)
Dim columnValuesArray() As Object = New Object() {_Select, Username, Prename, Surname, Email, ID}
rowTBAD_UsersRow.ItemArray = columnValuesArray
Me.Rows.Add(rowTBAD_UsersRow)
Return rowTBAD_UsersRow
End Function
<Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
Public Overrides Function Clone() As Global.System.Data.DataTable
Dim cln As TBAD_UsersDataTable = CType(MyBase.Clone, TBAD_UsersDataTable)
cln.InitVars()
Return cln
End Function
<Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
Protected Overrides Function CreateInstance() As Global.System.Data.DataTable
Return New TBAD_UsersDataTable()
End Function
<Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
Friend Sub InitVars()
Me.columnSelect = MyBase.Columns("Select")
Me.columnUsername = MyBase.Columns("Username")
Me.columnPrename = MyBase.Columns("Prename")
Me.columnSurname = MyBase.Columns("Surname")
Me.columnEmail = MyBase.Columns("Email")
Me.columnID = MyBase.Columns("ID")
End Sub
<Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
Private Sub InitClass()
Me.columnSelect = New Global.System.Data.DataColumn("Select", GetType(Boolean), Nothing, Global.System.Data.MappingType.Element)
Me.columnSelect.ExtendedProperties.Add("Generator_ColumnPropNameInTable", "SelectColumn")
Me.columnSelect.ExtendedProperties.Add("Generator_ColumnVarNameInTable", "columnSelect")
Me.columnSelect.ExtendedProperties.Add("Generator_UserColumnName", "Select")
MyBase.Columns.Add(Me.columnSelect)
Me.columnUsername = New Global.System.Data.DataColumn("Username", GetType(String), Nothing, Global.System.Data.MappingType.Element)
MyBase.Columns.Add(Me.columnUsername)
Me.columnPrename = New Global.System.Data.DataColumn("Prename", GetType(String), Nothing, Global.System.Data.MappingType.Element)
MyBase.Columns.Add(Me.columnPrename)
Me.columnSurname = New Global.System.Data.DataColumn("Surname", GetType(String), Nothing, Global.System.Data.MappingType.Element)
MyBase.Columns.Add(Me.columnSurname)
Me.columnEmail = New Global.System.Data.DataColumn("Email", GetType(String), Nothing, Global.System.Data.MappingType.Element)
MyBase.Columns.Add(Me.columnEmail)
Me.columnID = New Global.System.Data.DataColumn("ID", GetType(Short), Nothing, Global.System.Data.MappingType.Element)
MyBase.Columns.Add(Me.columnID)
Me.columnSelect.DefaultValue = CType(False, Boolean)
End Sub
<Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
Public Function NewTBAD_UsersRow() As TBAD_UsersRow
Return CType(Me.NewRow, TBAD_UsersRow)
End Function
<Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
Protected Overrides Function NewRowFromBuilder(ByVal builder As Global.System.Data.DataRowBuilder) As Global.System.Data.DataRow
Return New TBAD_UsersRow(builder)
End Function
<Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
Protected Overrides Function GetRowType() As Global.System.Type
Return GetType(TBAD_UsersRow)
End Function
<Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
Protected Overrides Sub OnRowChanged(ByVal e As Global.System.Data.DataRowChangeEventArgs)
MyBase.OnRowChanged(e)
If (Not (Me.TBAD_UsersRowChangedEvent) Is Nothing) Then
RaiseEvent TBAD_UsersRowChanged(Me, New TBAD_UsersRowChangeEvent(CType(e.Row, TBAD_UsersRow), e.Action))
End If
End Sub
<Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
Protected Overrides Sub OnRowChanging(ByVal e As Global.System.Data.DataRowChangeEventArgs)
MyBase.OnRowChanging(e)
If (Not (Me.TBAD_UsersRowChangingEvent) Is Nothing) Then
RaiseEvent TBAD_UsersRowChanging(Me, New TBAD_UsersRowChangeEvent(CType(e.Row, TBAD_UsersRow), e.Action))
End If
End Sub
<Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
Protected Overrides Sub OnRowDeleted(ByVal e As Global.System.Data.DataRowChangeEventArgs)
MyBase.OnRowDeleted(e)
If (Not (Me.TBAD_UsersRowDeletedEvent) Is Nothing) Then
RaiseEvent TBAD_UsersRowDeleted(Me, New TBAD_UsersRowChangeEvent(CType(e.Row, TBAD_UsersRow), e.Action))
End If
End Sub
<Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
Protected Overrides Sub OnRowDeleting(ByVal e As Global.System.Data.DataRowChangeEventArgs)
MyBase.OnRowDeleting(e)
If (Not (Me.TBAD_UsersRowDeletingEvent) Is Nothing) Then
RaiseEvent TBAD_UsersRowDeleting(Me, New TBAD_UsersRowChangeEvent(CType(e.Row, TBAD_UsersRow), e.Action))
End If
End Sub
<Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
Public Sub RemoveTBAD_UsersRow(ByVal row As TBAD_UsersRow)
Me.Rows.Remove(row)
End Sub
<Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
Public Shared Function GetTypedTableSchema(ByVal xs As Global.System.Xml.Schema.XmlSchemaSet) As Global.System.Xml.Schema.XmlSchemaComplexType
Dim type As Global.System.Xml.Schema.XmlSchemaComplexType = New Global.System.Xml.Schema.XmlSchemaComplexType()
Dim sequence As Global.System.Xml.Schema.XmlSchemaSequence = New Global.System.Xml.Schema.XmlSchemaSequence()
Dim ds As MyDataset = New MyDataset()
Dim any1 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny()
any1.Namespace = "http://www.w3.org/2001/XMLSchema"
any1.MinOccurs = New Decimal(0)
any1.MaxOccurs = Decimal.MaxValue
any1.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax
sequence.Items.Add(any1)
Dim any2 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny()
any2.Namespace = "urn:schemas-microsoft-com:xml-diffgram-v1"
any2.MinOccurs = New Decimal(1)
any2.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax
sequence.Items.Add(any2)
Dim attribute1 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute()
attribute1.Name = "namespace"
attribute1.FixedValue = ds.Namespace
type.Attributes.Add(attribute1)
Dim attribute2 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute()
attribute2.Name = "tableTypeName"
attribute2.FixedValue = "TBAD_UsersDataTable"
type.Attributes.Add(attribute2)
type.Particle = sequence
Dim dsSchema As Global.System.Xml.Schema.XmlSchema = ds.GetSchemaSerializable
If xs.Contains(dsSchema.TargetNamespace) Then
Dim s1 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream()
Dim s2 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream()
Try
Dim schema As Global.System.Xml.Schema.XmlSchema = Nothing
dsSchema.Write(s1)
Dim schemas As Global.System.Collections.IEnumerator = xs.Schemas(dsSchema.TargetNamespace).GetEnumerator
Do While schemas.MoveNext
schema = CType(schemas.Current, Global.System.Xml.Schema.XmlSchema)
s2.SetLength(0)
schema.Write(s2)
If (s1.Length = s2.Length) Then
s1.Position = 0
s2.Position = 0
Do While ((s1.Position <> s1.Length) _
AndAlso (s1.ReadByte = s2.ReadByte))
Loop
If (s1.Position = s1.Length) Then
Return type
End If
End If
Loop
Finally
If (Not (s1) Is Nothing) Then
s1.Close()
End If
If (Not (s2) Is Nothing) Then
s2.Close()
End If
End Try
End If
xs.Add(dsSchema)
Return type
End Function
End Class
'''<summary>
'''Represents strongly named DataRow class.
'''</summary>
@@ -773,6 +1129,184 @@ Partial Public Class MyDataset
End Sub
End Class
'''<summary>
'''Represents strongly named DataRow class.
'''</summary>
Partial Public Class TBAD_UsersRow
Inherits Global.System.Data.DataRow
Private tableTBAD_Users As TBAD_UsersDataTable
<Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
Friend Sub New(ByVal rb As Global.System.Data.DataRowBuilder)
MyBase.New(rb)
Me.tableTBAD_Users = CType(Me.Table, TBAD_UsersDataTable)
End Sub
<Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
Public Property _Select() As Boolean
Get
Try
Return CType(Me(Me.tableTBAD_Users.SelectColumn), Boolean)
Catch e As Global.System.InvalidCastException
Throw New Global.System.Data.StrongTypingException("Der Wert für Spalte Select in Tabelle TBAD_Users ist DBNull.", e)
End Try
End Get
Set(value As Boolean)
Me(Me.tableTBAD_Users.SelectColumn) = value
End Set
End Property
<Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
Public Property Username() As String
Get
Try
Return CType(Me(Me.tableTBAD_Users.UsernameColumn), String)
Catch e As Global.System.InvalidCastException
Throw New Global.System.Data.StrongTypingException("Der Wert für Spalte Username in Tabelle TBAD_Users ist DBNull.", e)
End Try
End Get
Set(value As String)
Me(Me.tableTBAD_Users.UsernameColumn) = value
End Set
End Property
<Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
Public Property Prename() As String
Get
Try
Return CType(Me(Me.tableTBAD_Users.PrenameColumn), String)
Catch e As Global.System.InvalidCastException
Throw New Global.System.Data.StrongTypingException("Der Wert für Spalte Prename in Tabelle TBAD_Users ist DBNull.", e)
End Try
End Get
Set(value As String)
Me(Me.tableTBAD_Users.PrenameColumn) = value
End Set
End Property
<Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
Public Property Surname() As String
Get
Try
Return CType(Me(Me.tableTBAD_Users.SurnameColumn), String)
Catch e As Global.System.InvalidCastException
Throw New Global.System.Data.StrongTypingException("Der Wert für Spalte Surname in Tabelle TBAD_Users ist DBNull.", e)
End Try
End Get
Set(value As String)
Me(Me.tableTBAD_Users.SurnameColumn) = value
End Set
End Property
<Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
Public Property Email() As String
Get
Try
Return CType(Me(Me.tableTBAD_Users.EmailColumn), String)
Catch e As Global.System.InvalidCastException
Throw New Global.System.Data.StrongTypingException("Der Wert für Spalte Email in Tabelle TBAD_Users ist DBNull.", e)
End Try
End Get
Set(value As String)
Me(Me.tableTBAD_Users.EmailColumn) = value
End Set
End Property
<Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
Public Property ID() As Short
Get
Try
Return CType(Me(Me.tableTBAD_Users.IDColumn), Short)
Catch e As Global.System.InvalidCastException
Throw New Global.System.Data.StrongTypingException("Der Wert für Spalte ID in Tabelle TBAD_Users ist DBNull.", e)
End Try
End Get
Set(value As Short)
Me(Me.tableTBAD_Users.IDColumn) = value
End Set
End Property
<Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
Public Function Is_SelectNull() As Boolean
Return Me.IsNull(Me.tableTBAD_Users.SelectColumn)
End Function
<Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
Public Sub Set_SelectNull()
Me(Me.tableTBAD_Users.SelectColumn) = Global.System.Convert.DBNull
End Sub
<Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
Public Function IsUsernameNull() As Boolean
Return Me.IsNull(Me.tableTBAD_Users.UsernameColumn)
End Function
<Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
Public Sub SetUsernameNull()
Me(Me.tableTBAD_Users.UsernameColumn) = Global.System.Convert.DBNull
End Sub
<Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
Public Function IsPrenameNull() As Boolean
Return Me.IsNull(Me.tableTBAD_Users.PrenameColumn)
End Function
<Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
Public Sub SetPrenameNull()
Me(Me.tableTBAD_Users.PrenameColumn) = Global.System.Convert.DBNull
End Sub
<Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
Public Function IsSurnameNull() As Boolean
Return Me.IsNull(Me.tableTBAD_Users.SurnameColumn)
End Function
<Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
Public Sub SetSurnameNull()
Me(Me.tableTBAD_Users.SurnameColumn) = Global.System.Convert.DBNull
End Sub
<Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
Public Function IsEmailNull() As Boolean
Return Me.IsNull(Me.tableTBAD_Users.EmailColumn)
End Function
<Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
Public Sub SetEmailNull()
Me(Me.tableTBAD_Users.EmailColumn) = Global.System.Convert.DBNull
End Sub
<Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
Public Function IsIDNull() As Boolean
Return Me.IsNull(Me.tableTBAD_Users.IDColumn)
End Function
<Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
Public Sub SetIDNull()
Me(Me.tableTBAD_Users.IDColumn) = Global.System.Convert.DBNull
End Sub
End Class
'''<summary>
'''Row event argument class
'''</summary>
@@ -808,6 +1342,42 @@ Partial Public Class MyDataset
End Get
End Property
End Class
'''<summary>
'''Row event argument class
'''</summary>
<Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
Public Class TBAD_UsersRowChangeEvent
Inherits Global.System.EventArgs
Private eventRow As TBAD_UsersRow
Private eventAction As Global.System.Data.DataRowAction
<Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
Public Sub New(ByVal row As TBAD_UsersRow, ByVal action As Global.System.Data.DataRowAction)
MyBase.New()
Me.eventRow = row
Me.eventAction = action
End Sub
<Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
Public ReadOnly Property Row() As TBAD_UsersRow
Get
Return Me.eventRow
End Get
End Property
<Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
Public ReadOnly Property Action() As Global.System.Data.DataRowAction
Get
Return Me.eventAction
End Get
End Property
End Class
End Class
Namespace MyDatasetTableAdapters

View File

@@ -39,7 +39,7 @@ FROM VWPMO_RIGHTS_2B_WORKED</CommandText>
<xs:element name="MyDataset" msdata:IsDataSet="true" msdata:UseCurrentLocale="true" msprop:EnableTableAdapterManager="true" msprop:Generator_DataSetName="MyDataset" msprop:Generator_UserDSName="MyDataset">
<xs:complexType>
<xs:choice minOccurs="0" maxOccurs="unbounded">
<xs:element name="VWPMO_RIGHTS_2B_WORKED" msprop:Generator_TableClassName="VWPMO_RIGHTS_2B_WORKEDDataTable" msprop:Generator_TableVarName="tableVWPMO_RIGHTS_2B_WORKED" msprop:Generator_TablePropName="VWPMO_RIGHTS_2B_WORKED" msprop:Generator_RowDeletingName="VWPMO_RIGHTS_2B_WORKEDRowDeleting" msprop:Generator_RowChangingName="VWPMO_RIGHTS_2B_WORKEDRowChanging" msprop:Generator_RowEvHandlerName="VWPMO_RIGHTS_2B_WORKEDRowChangeEventHandler" msprop:Generator_RowDeletedName="VWPMO_RIGHTS_2B_WORKEDRowDeleted" msprop:Generator_UserTableName="VWPMO_RIGHTS_2B_WORKED" msprop:Generator_RowChangedName="VWPMO_RIGHTS_2B_WORKEDRowChanged" msprop:Generator_RowEvArgName="VWPMO_RIGHTS_2B_WORKEDRowChangeEvent" msprop:Generator_RowClassName="VWPMO_RIGHTS_2B_WORKEDRow">
<xs:element name="VWPMO_RIGHTS_2B_WORKED" msprop:Generator_TableClassName="VWPMO_RIGHTS_2B_WORKEDDataTable" msprop:Generator_TableVarName="tableVWPMO_RIGHTS_2B_WORKED" msprop:Generator_RowChangedName="VWPMO_RIGHTS_2B_WORKEDRowChanged" msprop:Generator_TablePropName="VWPMO_RIGHTS_2B_WORKED" msprop:Generator_RowDeletingName="VWPMO_RIGHTS_2B_WORKEDRowDeleting" msprop:Generator_RowChangingName="VWPMO_RIGHTS_2B_WORKEDRowChanging" msprop:Generator_RowEvHandlerName="VWPMO_RIGHTS_2B_WORKEDRowChangeEventHandler" msprop:Generator_RowDeletedName="VWPMO_RIGHTS_2B_WORKEDRowDeleted" msprop:Generator_RowClassName="VWPMO_RIGHTS_2B_WORKEDRow" msprop:Generator_UserTableName="VWPMO_RIGHTS_2B_WORKED" msprop:Generator_RowEvArgName="VWPMO_RIGHTS_2B_WORKEDRowChangeEvent">
<xs:complexType>
<xs:sequence>
<xs:element name="GUID" msprop:Generator_ColumnVarNameInTable="columnGUID" msprop:Generator_ColumnPropNameInRow="GUID" msprop:Generator_ColumnPropNameInTable="GUIDColumn" msprop:Generator_UserColumnName="GUID" type="xs:int" />
@@ -77,6 +77,18 @@ FROM VWPMO_RIGHTS_2B_WORKED</CommandText>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="TBAD_Users" msprop:Generator_TableClassName="TBAD_UsersDataTable" msprop:Generator_TableVarName="tableTBAD_Users" msprop:Generator_TablePropName="TBAD_Users" msprop:Generator_RowDeletingName="TBAD_UsersRowDeleting" msprop:Generator_RowChangingName="TBAD_UsersRowChanging" msprop:Generator_RowEvHandlerName="TBAD_UsersRowChangeEventHandler" msprop:Generator_RowDeletedName="TBAD_UsersRowDeleted" msprop:Generator_UserTableName="TBAD_Users" msprop:Generator_RowChangedName="TBAD_UsersRowChanged" msprop:Generator_RowEvArgName="TBAD_UsersRowChangeEvent" msprop:Generator_RowClassName="TBAD_UsersRow">
<xs:complexType>
<xs:sequence>
<xs:element name="Select" msprop:Generator_ColumnVarNameInTable="columnSelect" msprop:Generator_ColumnPropNameInRow="_Select" msprop:Generator_ColumnPropNameInTable="SelectColumn" msprop:Generator_UserColumnName="Select" type="xs:boolean" default="false" minOccurs="0" />
<xs:element name="Username" msprop:Generator_ColumnVarNameInTable="columnUsername" msprop:Generator_ColumnPropNameInRow="Username" msprop:Generator_ColumnPropNameInTable="UsernameColumn" msprop:Generator_UserColumnName="Username" type="xs:string" minOccurs="0" />
<xs:element name="Prename" msprop:Generator_ColumnVarNameInTable="columnPrename" msprop:Generator_ColumnPropNameInRow="Prename" msprop:Generator_ColumnPropNameInTable="PrenameColumn" msprop:Generator_UserColumnName="Prename" type="xs:string" minOccurs="0" />
<xs:element name="Surname" msprop:Generator_ColumnVarNameInTable="columnSurname" msprop:Generator_ColumnPropNameInRow="Surname" msprop:Generator_ColumnPropNameInTable="SurnameColumn" msprop:Generator_UserColumnName="Surname" type="xs:string" minOccurs="0" />
<xs:element name="Email" msprop:Generator_ColumnVarNameInTable="columnEmail" msprop:Generator_ColumnPropNameInRow="Email" msprop:Generator_ColumnPropNameInTable="EmailColumn" msprop:Generator_UserColumnName="Email" type="xs:string" minOccurs="0" />
<xs:element name="ID" msprop:Generator_ColumnVarNameInTable="columnID" msprop:Generator_ColumnPropNameInRow="ID" msprop:Generator_ColumnPropNameInTable="IDColumn" msprop:Generator_UserColumnName="ID" type="xs:short" minOccurs="0" />
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:choice>
</xs:complexType>
<xs:unique name="Constraint1" msdata:PrimaryKey="true">

View File

@@ -4,9 +4,10 @@
Changes to this file may cause incorrect behavior and will be lost if
the code is regenerated.
</autogenerated>-->
<DiagramLayout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" ex:showrelationlabel="False" ViewPortX="0" ViewPortY="0" xmlns:ex="urn:schemas-microsoft-com:xml-msdatasource-layout-extended" xmlns="urn:schemas-microsoft-com:xml-msdatasource-layout">
<DiagramLayout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" ex:showrelationlabel="False" ViewPortX="-10" ViewPortY="-10" xmlns:ex="urn:schemas-microsoft-com:xml-msdatasource-layout-extended" xmlns="urn:schemas-microsoft-com:xml-msdatasource-layout">
<Shapes>
<Shape ID="DesignTable:VWPMO_RIGHTS_2B_WORKED" ZOrder="1" X="769" Y="276" Height="229" Width="300" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="178" />
<Shape ID="DesignTable:VWPMO_RIGHTS_2B_WORKED" ZOrder="2" X="222" Y="98" Height="229" Width="300" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="178" />
<Shape ID="DesignTable:TBAD_Users" ZOrder="1" X="43" Y="108" Height="143" Width="150" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="139" />
</Shapes>
<Connectors />
</DiagramLayout>

View File

@@ -89,6 +89,13 @@
</ItemGroup>
<ItemGroup>
<Compile Include="ApplicationEvents.vb" />
<Compile Include="ClassDatabase.vb" />
<Compile Include="frmUsersReworkRights.Designer.vb">
<DependentUpon>frmUsersReworkRights.vb</DependentUpon>
</Compile>
<Compile Include="frmUsersReworkRights.vb">
<SubType>Form</SubType>
</Compile>
<Compile Include="frmSupervisorEntity.Designer.vb">
<DependentUpon>frmSupervisorEntity.vb</DependentUpon>
</Compile>
@@ -137,6 +144,9 @@
</Compile>
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="frmUsersReworkRights.resx">
<DependentUpon>frmUsersReworkRights.vb</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="frmSupervisorEntity.resx">
<DependentUpon>frmSupervisorEntity.vb</DependentUpon>
</EmbeddedResource>

View File

@@ -44,6 +44,8 @@ Public Class frmCheckRightsEntity
Exit Sub
Else
clsLogger.Add(String.Format(">> {0} files must be transferred!", DT_FILES.Rows.Count), False)
Dim del = "DELETE FROM TBPMO_USER_RIGHTS_JOBS WHERE ENTITY_ID = " & ENTITY_ID
clsDatabase.Execute_non_Query(del)
End If
btncancel.Visible = True
lblstate.Visible = True
@@ -103,6 +105,7 @@ Public Class frmCheckRightsEntity
End If
Next
DD_Rights.ClassRights.Finalize_SettingRights()
End Sub
Private Sub btncancel_Click(sender As Object, e As EventArgs) Handles btncancel.Click

View File

@@ -48,6 +48,7 @@ Partial Class frmStart
Me.Label1 = New System.Windows.Forms.Label()
Me.VWPMO_RIGHTS_2B_WORKEDTableAdapter = New RecordOrganizer_RightManager.MyDatasetTableAdapters.VWPMO_RIGHTS_2B_WORKEDTableAdapter()
Me.TableAdapterManager = New RecordOrganizer_RightManager.MyDatasetTableAdapters.TableAdapterManager()
Me.btnCheckRenewUserRights = New System.Windows.Forms.Button()
CType(Me.XtraTabControl1, System.ComponentModel.ISupportInitialize).BeginInit()
Me.XtraTabControl1.SuspendLayout()
Me.XtraTabPage1.SuspendLayout()
@@ -73,7 +74,7 @@ Partial Class frmStart
'
Me.btnWorkUserRights.Font = New System.Drawing.Font("Tahoma", 9.0!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.btnWorkUserRights.ForeColor = System.Drawing.Color.DarkRed
Me.btnWorkUserRights.Location = New System.Drawing.Point(3, 65)
Me.btnWorkUserRights.Location = New System.Drawing.Point(3, 114)
Me.btnWorkUserRights.Name = "btnWorkUserRights"
Me.btnWorkUserRights.Size = New System.Drawing.Size(312, 45)
Me.btnWorkUserRights.TabIndex = 2
@@ -84,7 +85,7 @@ Partial Class frmStart
'
Me.btnWorkUserRightsSV_ADD.Font = New System.Drawing.Font("Tahoma", 9.0!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.btnWorkUserRightsSV_ADD.ForeColor = System.Drawing.Color.DarkRed
Me.btnWorkUserRightsSV_ADD.Location = New System.Drawing.Point(3, 116)
Me.btnWorkUserRightsSV_ADD.Location = New System.Drawing.Point(0, 164)
Me.btnWorkUserRightsSV_ADD.Name = "btnWorkUserRightsSV_ADD"
Me.btnWorkUserRightsSV_ADD.Size = New System.Drawing.Size(312, 45)
Me.btnWorkUserRightsSV_ADD.TabIndex = 3
@@ -110,19 +111,20 @@ Partial Class frmStart
Me.XtraTabControl1.Location = New System.Drawing.Point(0, 0)
Me.XtraTabControl1.Name = "XtraTabControl1"
Me.XtraTabControl1.SelectedTabPage = Me.XtraTabPage1
Me.XtraTabControl1.Size = New System.Drawing.Size(827, 332)
Me.XtraTabControl1.Size = New System.Drawing.Size(827, 247)
Me.XtraTabControl1.TabIndex = 4
Me.XtraTabControl1.TabPages.AddRange(New DevExpress.XtraTab.XtraTabPage() {Me.XtraTabPage1, Me.XtraTabPage2})
'
'XtraTabPage1
'
Me.XtraTabPage1.Controls.Add(Me.btnCheckRenewUserRights)
Me.XtraTabPage1.Controls.Add(Me.GroupBox1)
Me.XtraTabPage1.Controls.Add(Me.Button1)
Me.XtraTabPage1.Controls.Add(Me.Button2)
Me.XtraTabPage1.Controls.Add(Me.btnWorkUserRightsSV_ADD)
Me.XtraTabPage1.Controls.Add(Me.btnWorkUserRights)
Me.XtraTabPage1.Name = "XtraTabPage1"
Me.XtraTabPage1.Size = New System.Drawing.Size(825, 307)
Me.XtraTabPage1.Size = New System.Drawing.Size(825, 222)
Me.XtraTabPage1.Text = "Jobs and Tools"
'
'GroupBox1
@@ -153,7 +155,7 @@ Partial Class frmStart
Me.XtraTabPage2.Controls.Add(Me.GridControl1)
Me.XtraTabPage2.Controls.Add(Me.Label1)
Me.XtraTabPage2.Name = "XtraTabPage2"
Me.XtraTabPage2.Size = New System.Drawing.Size(821, 304)
Me.XtraTabPage2.Size = New System.Drawing.Size(825, 307)
Me.XtraTabPage2.Text = "Rights 2b worked"
'
'btnrefreshJobs
@@ -301,11 +303,21 @@ Partial Class frmStart
Me.TableAdapterManager.Connection = Nothing
Me.TableAdapterManager.UpdateOrder = RecordOrganizer_RightManager.MyDatasetTableAdapters.TableAdapterManager.UpdateOrderOption.InsertUpdateDelete
'
'btnCheckRenewUserRights
'
Me.btnCheckRenewUserRights.Font = New System.Drawing.Font("Tahoma", 9.0!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.btnCheckRenewUserRights.Location = New System.Drawing.Point(3, 63)
Me.btnCheckRenewUserRights.Name = "btnCheckRenewUserRights"
Me.btnCheckRenewUserRights.Size = New System.Drawing.Size(312, 45)
Me.btnCheckRenewUserRights.TabIndex = 7
Me.btnCheckRenewUserRights.Text = "Check or Renew Rights for Users"
Me.btnCheckRenewUserRights.UseVisualStyleBackColor = True
'
'frmStart
'
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
Me.ClientSize = New System.Drawing.Size(827, 332)
Me.ClientSize = New System.Drawing.Size(827, 247)
Me.Controls.Add(Me.XtraTabControl1)
Me.Font = New System.Drawing.Font("Tahoma", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.Icon = CType(resources.GetObject("$this.Icon"), System.Drawing.Icon)
@@ -351,5 +363,6 @@ Partial Class frmStart
Friend WithEvents colADDED_WHEN As DevExpress.XtraGrid.Columns.GridColumn
Friend WithEvents chkLogerrorsonly As System.Windows.Forms.CheckBox
Friend WithEvents GroupBox1 As System.Windows.Forms.GroupBox
Friend WithEvents btnCheckRenewUserRights As System.Windows.Forms.Button
End Class

View File

@@ -8,6 +8,12 @@ Public Class frmStart
MsgBox("Error in Initializing Database. Please check log.", MsgBoxStyle.Critical)
Me.Close()
End If
ClassDatabase.ConnectionStringRM = My.Settings.MyConnectionString
If ClassDatabase.Init = False Then
MsgBox("Error in Initializing Database. Please check log.", MsgBoxStyle.Critical)
Me.Close()
End If
chkLogerrorsonly.Checked = CBool(clsDatabase.Execute_Scalar("SELECT LOG_ERR_ONLY FROM TBPMO_SERVICE_RIGHT_CONFIG WHERE GUID = 1"))
Dim sql = String.Format("SELECT * FROM TBDD_USER WHERE (LOWER(USERNAME) = LOWER('{0}'))", Environment.UserName)
clsLogger.Add(">> Login at: " & Now.ToString, False)
@@ -150,4 +156,8 @@ Public Class frmStart
Private Sub chklogerrors_CheckedChanged(sender As Object, e As EventArgs)
End Sub
Private Sub btnCheckRenewUserRights_Click(sender As Object, e As EventArgs) Handles btnCheckRenewUserRights.Click
frmUsersReworkRights.ShowDialog()
End Sub
End Class

View File

@@ -0,0 +1,223 @@
<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _
Partial Class frmUsersReworkRights
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.Label1 = New System.Windows.Forms.Label()
Me.BW_RightsEntity = New System.ComponentModel.BackgroundWorker()
Me.ProgressBar1 = New System.Windows.Forms.ProgressBar()
Me.btncancel = New System.Windows.Forms.Button()
Me.btnCheckRights = New System.Windows.Forms.Button()
Me.lblstate = New System.Windows.Forms.Label()
Me.MyDataset = New RecordOrganizer_RightManager.MyDataset()
Me.TBAD_UsersBindingSource = New System.Windows.Forms.BindingSource()
Me.GridControlUsers2Menue = New DevExpress.XtraGrid.GridControl()
Me.GridViewlUsers2Menue = New DevExpress.XtraGrid.Views.Grid.GridView()
Me.colSelect = New DevExpress.XtraGrid.Columns.GridColumn()
Me.colSurname = New DevExpress.XtraGrid.Columns.GridColumn()
Me.GridColumn1 = New DevExpress.XtraGrid.Columns.GridColumn()
Me.GridColumn2 = New DevExpress.XtraGrid.Columns.GridColumn()
Me.colID = New DevExpress.XtraGrid.Columns.GridColumn()
CType(Me.MyDataset, System.ComponentModel.ISupportInitialize).BeginInit()
CType(Me.TBAD_UsersBindingSource, System.ComponentModel.ISupportInitialize).BeginInit()
CType(Me.GridControlUsers2Menue, System.ComponentModel.ISupportInitialize).BeginInit()
CType(Me.GridViewlUsers2Menue, System.ComponentModel.ISupportInitialize).BeginInit()
Me.SuspendLayout()
'
'Label1
'
Me.Label1.AutoSize = True
Me.Label1.Location = New System.Drawing.Point(25, 9)
Me.Label1.Name = "Label1"
Me.Label1.Size = New System.Drawing.Size(327, 16)
Me.Label1.TabIndex = 0
Me.Label1.Text = "Please choose the user which You would like to rework:"
'
'BW_RightsEntity
'
'
'ProgressBar1
'
Me.ProgressBar1.Location = New System.Drawing.Point(28, 287)
Me.ProgressBar1.Name = "ProgressBar1"
Me.ProgressBar1.Size = New System.Drawing.Size(463, 31)
Me.ProgressBar1.TabIndex = 3
Me.ProgressBar1.Visible = False
'
'btncancel
'
Me.btncancel.Image = Global.RecordOrganizer_RightManager.My.Resources.Resources.cancel1
Me.btncancel.ImageAlign = System.Drawing.ContentAlignment.MiddleRight
Me.btncancel.Location = New System.Drawing.Point(426, 229)
Me.btncancel.Name = "btncancel"
Me.btncancel.Size = New System.Drawing.Size(76, 39)
Me.btncancel.TabIndex = 4
Me.btncancel.Text = "Cancel"
Me.btncancel.TextAlign = System.Drawing.ContentAlignment.MiddleLeft
Me.btncancel.UseVisualStyleBackColor = True
Me.btncancel.Visible = False
'
'btnCheckRights
'
Me.btnCheckRights.Image = Global.RecordOrganizer_RightManager.My.Resources.Resources._112_RightArrowShort_Blue_24x24_72
Me.btnCheckRights.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft
Me.btnCheckRights.Location = New System.Drawing.Point(28, 229)
Me.btnCheckRights.Name = "btnCheckRights"
Me.btnCheckRights.Size = New System.Drawing.Size(392, 39)
Me.btnCheckRights.TabIndex = 2
Me.btnCheckRights.Text = "Check rights for all documents related to the selected user(s)"
Me.btnCheckRights.TextAlign = System.Drawing.ContentAlignment.MiddleRight
Me.btnCheckRights.UseVisualStyleBackColor = True
'
'lblstate
'
Me.lblstate.AutoSize = True
Me.lblstate.Font = New System.Drawing.Font("Tahoma", 8.25!, System.Drawing.FontStyle.Italic, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.lblstate.Location = New System.Drawing.Point(25, 271)
Me.lblstate.Name = "lblstate"
Me.lblstate.Size = New System.Drawing.Size(38, 13)
Me.lblstate.TabIndex = 7
Me.lblstate.Text = "Label2"
'
'MyDataset
'
Me.MyDataset.DataSetName = "MyDataset"
Me.MyDataset.SchemaSerializationMode = System.Data.SchemaSerializationMode.IncludeSchema
'
'TBAD_UsersBindingSource
'
Me.TBAD_UsersBindingSource.DataMember = "TBAD_Users"
Me.TBAD_UsersBindingSource.DataSource = Me.MyDataset
'
'GridControlUsers2Menue
'
Me.GridControlUsers2Menue.DataSource = Me.TBAD_UsersBindingSource
Me.GridControlUsers2Menue.Location = New System.Drawing.Point(28, 28)
Me.GridControlUsers2Menue.MainView = Me.GridViewlUsers2Menue
Me.GridControlUsers2Menue.Name = "GridControlUsers2Menue"
Me.GridControlUsers2Menue.ShowOnlyPredefinedDetails = True
Me.GridControlUsers2Menue.Size = New System.Drawing.Size(474, 195)
Me.GridControlUsers2Menue.TabIndex = 89
Me.GridControlUsers2Menue.ViewCollection.AddRange(New DevExpress.XtraGrid.Views.Base.BaseView() {Me.GridViewlUsers2Menue})
'
'GridViewlUsers2Menue
'
Me.GridViewlUsers2Menue.Appearance.EvenRow.BackColor = System.Drawing.Color.Cyan
Me.GridViewlUsers2Menue.Appearance.EvenRow.Options.UseBackColor = True
Me.GridViewlUsers2Menue.Appearance.FocusedRow.BackColor = System.Drawing.Color.Fuchsia
Me.GridViewlUsers2Menue.Appearance.FocusedRow.Options.UseBackColor = True
Me.GridViewlUsers2Menue.Columns.AddRange(New DevExpress.XtraGrid.Columns.GridColumn() {Me.colSelect, Me.colSurname, Me.GridColumn1, Me.GridColumn2, Me.colID})
Me.GridViewlUsers2Menue.GridControl = Me.GridControlUsers2Menue
Me.GridViewlUsers2Menue.Name = "GridViewlUsers2Menue"
Me.GridViewlUsers2Menue.OptionsBehavior.AllowAddRows = DevExpress.Utils.DefaultBoolean.[False]
Me.GridViewlUsers2Menue.OptionsBehavior.AllowDeleteRows = DevExpress.Utils.DefaultBoolean.[False]
Me.GridViewlUsers2Menue.OptionsClipboard.CopyColumnHeaders = DevExpress.Utils.DefaultBoolean.[False]
Me.GridViewlUsers2Menue.OptionsSelection.EnableAppearanceFocusedCell = False
Me.GridViewlUsers2Menue.OptionsView.ColumnAutoWidth = False
Me.GridViewlUsers2Menue.OptionsView.EnableAppearanceEvenRow = True
Me.GridViewlUsers2Menue.OptionsView.ShowAutoFilterRow = True
Me.GridViewlUsers2Menue.OptionsView.ShowGroupPanel = False
'
'colSelect
'
Me.colSelect.Caption = "Selection"
Me.colSelect.FieldName = "Select"
Me.colSelect.Name = "colSelect"
Me.colSelect.Visible = True
Me.colSelect.VisibleIndex = 0
Me.colSelect.Width = 54
'
'colSurname
'
Me.colSurname.Caption = "Name"
Me.colSurname.FieldName = "Surname"
Me.colSurname.Name = "colSurname"
Me.colSurname.Visible = True
Me.colSurname.VisibleIndex = 1
'
'GridColumn1
'
Me.GridColumn1.FieldName = "Username"
Me.GridColumn1.Name = "GridColumn1"
Me.GridColumn1.OptionsColumn.AllowEdit = False
Me.GridColumn1.Visible = True
Me.GridColumn1.VisibleIndex = 2
Me.GridColumn1.Width = 107
'
'GridColumn2
'
Me.GridColumn2.FieldName = "Email"
Me.GridColumn2.Name = "GridColumn2"
Me.GridColumn2.OptionsColumn.AllowEdit = False
Me.GridColumn2.Visible = True
Me.GridColumn2.VisibleIndex = 3
Me.GridColumn2.Width = 102
'
'colID
'
Me.colID.FieldName = "ID"
Me.colID.Name = "colID"
'
'frmUsersReworkRights
'
Me.AutoScaleDimensions = New System.Drawing.SizeF(7.0!, 16.0!)
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
Me.ClientSize = New System.Drawing.Size(528, 324)
Me.Controls.Add(Me.GridControlUsers2Menue)
Me.Controls.Add(Me.lblstate)
Me.Controls.Add(Me.btncancel)
Me.Controls.Add(Me.ProgressBar1)
Me.Controls.Add(Me.btnCheckRights)
Me.Controls.Add(Me.Label1)
Me.Font = New System.Drawing.Font("Tahoma", 9.75!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog
Me.Margin = New System.Windows.Forms.Padding(3, 4, 3, 4)
Me.MaximizeBox = False
Me.MinimizeBox = False
Me.Name = "frmUsersReworkRights"
Me.ShowInTaskbar = False
Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen
Me.Text = "Rework Rights for User"
CType(Me.MyDataset, System.ComponentModel.ISupportInitialize).EndInit()
CType(Me.TBAD_UsersBindingSource, System.ComponentModel.ISupportInitialize).EndInit()
CType(Me.GridControlUsers2Menue, System.ComponentModel.ISupportInitialize).EndInit()
CType(Me.GridViewlUsers2Menue, System.ComponentModel.ISupportInitialize).EndInit()
Me.ResumeLayout(False)
Me.PerformLayout()
End Sub
Friend WithEvents Label1 As System.Windows.Forms.Label
Friend WithEvents btnCheckRights As System.Windows.Forms.Button
Friend WithEvents BW_RightsEntity As System.ComponentModel.BackgroundWorker
Friend WithEvents ProgressBar1 As System.Windows.Forms.ProgressBar
Friend WithEvents btncancel As System.Windows.Forms.Button
Friend WithEvents lblstate As System.Windows.Forms.Label
Friend WithEvents MyDataset As RecordOrganizer_RightManager.MyDataset
Friend WithEvents TBAD_UsersBindingSource As System.Windows.Forms.BindingSource
Friend WithEvents GridControlUsers2Menue As DevExpress.XtraGrid.GridControl
Friend WithEvents GridViewlUsers2Menue As DevExpress.XtraGrid.Views.Grid.GridView
Friend WithEvents colSelect As DevExpress.XtraGrid.Columns.GridColumn
Friend WithEvents colSurname As DevExpress.XtraGrid.Columns.GridColumn
Friend WithEvents GridColumn1 As DevExpress.XtraGrid.Columns.GridColumn
Friend WithEvents GridColumn2 As DevExpress.XtraGrid.Columns.GridColumn
Friend WithEvents colID As DevExpress.XtraGrid.Columns.GridColumn
End Class

View File

@@ -0,0 +1,129 @@
<?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>
<metadata name="BW_RightsEntity.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
<metadata name="MyDataset.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>157, 17</value>
</metadata>
<metadata name="TBAD_UsersBindingSource.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>267, 17</value>
</metadata>
</root>

View File

@@ -0,0 +1,123 @@
Imports DD_Rights
Imports System.ComponentModel
Public Class frmUsersReworkRights
Private _error As Boolean = False
Private Sub frmCheckRightsEntity_Load(sender As Object, e As EventArgs) Handles Me.Load
lblstate.Visible = False
Refresh_Users()
End Sub
Sub Refresh_Users()
Try
Dim Sql = String.Format("SELECT * FROM TBDD_USER WHERE MODULE_RECORD_ORG = 1 ORDER By USERNAME")
Dim DT_USER = ClassDatabase.Return_Datatable(Sql)
Try
MyDataset.TBAD_Users.Clear()
For Each row As DataRow In DT_USER.Rows
Dim newUserRow As MyDataset.TBAD_UsersRow
newUserRow = MyDataset.TBAD_Users.NewTBAD_UsersRow
newUserRow.Username = row.Item("USERNAME")
newUserRow.Surname = row.Item("NAME")
newUserRow.Prename = row.Item("PRENAME")
Try
newUserRow.Email = row.Item("EMAIL")
Catch ex As Exception
newUserRow.Email = ""
End Try
newUserRow.ID = row.Item("GUID")
MyDataset.TBAD_Users.Rows.Add(newUserRow)
' chklbxUserForGroup.Items.Add(New MyListBoxItem() With {.Text = row.Item(1), .ExtraData = row.Item(0)})
Next
Catch ex As Exception
MsgBox("Error Load_Users for menues:" & vbNewLine & ex.Message)
End Try
Catch ex As Exception
MsgBox("Unexpected error in load Users List: " & vbNewLine & ex.Message, MsgBoxStyle.Critical)
End Try
End Sub
Private Sub btnCheckRights_Click(sender As Object, e As EventArgs) Handles btnCheckRights.Click
Dim Count As Integer
For Each row As DataRow In MyDataset.TBAD_Users.Rows
If row.Item(0) = CBool(True) Then
Count += 1
End If
Next
If Count > 0 Then
Try
Me.Cursor = Cursors.WaitCursor
''BackgroundWorker erstellen ...
BW_RightsEntity = New BackgroundWorker
BW_RightsEntity.WorkerReportsProgress = True
ProgressBar1.Maximum = Count + 1
lblstate.Visible = True
lblstate.Text = "Background Worker started...."
Me.ProgressBar1.Visible = True
btnCheckRights.Enabled = False
btncancel.Visible = True
AddHandler BW_RightsEntity.DoWork, AddressOf bw_DoWork
BW_RightsEntity.ReportProgress(1)
'.. und starten
BW_RightsEntity.RunWorkerAsync()
Catch ex As Exception
MsgBox("Unexpected error in starting backgroundworker: " & vbNewLine & ex.Message, MsgBoxStyle.Critical)
Me.ProgressBar1.Visible = False
End Try
End If
Me.Cursor = Cursors.Default
End Sub
Private Sub BW_RightsEntity_ProgressChanged(sender As Object, e As ProgressChangedEventArgs) Handles BW_RightsEntity.ProgressChanged
Me.ProgressBar1.Value = e.ProgressPercentage
End Sub
Private Sub bw_DoWork(ByVal sender As Object, ByVal e As DoWorkEventArgs)
Dim worker As BackgroundWorker = CType(sender, BackgroundWorker)
_error = False
Dim i As Integer = 1
For Each row As DataRow In MyDataset.TBAD_Users.Rows
If row.Item(0) = CBool(True) Then
Dim proc = String.Format("EXEC PRPMO_RIGHTS_SERVICE_CHECK_USER {0}, '{1}'", row.Item(5), Environment.UserName)
If ClassDatabase.Execute_non_Query(proc) = False Then
MsgBox("Unexpected Error in Executing rightprocedure - Check the log!", MsgBoxStyle.Critical)
_error = True
BW_RightsEntity.ReportProgress(+1)
Exit For
Else
Dim del = String.Format("DELETE FROM TBPMO_USER_RIGHTS_JOBS WHERE USER_ID = {0}", row.Item(5))
ClassDatabase.Execute_non_Query(del)
End If
End If
BW_RightsEntity.ReportProgress(+1)
Next
End Sub
Private Sub btncancel_Click(sender As Object, e As EventArgs) Handles btncancel.Click
' Cancel the asynchronous operation.
Me.BW_RightsEntity.CancelAsync()
End Sub
Private Sub BW_RightsEntity_RunWorkerCompleted(sender As Object, e As RunWorkerCompletedEventArgs) Handles BW_RightsEntity.RunWorkerCompleted
Try
btncancel.Visible = False
ProgressBar1.Visible = False
lblstate.Visible = False
If _error = False Then
MsgBox("All rights of files belonging to User were checked and transmitted to the server!" & vbNewLine & "The setting of the rights might take up to 10 minutes!", MsgBoxStyle.Information)
Else
MsgBox("Some errors occured while checking and transmitting the rights...please check the log!", MsgBoxStyle.Exclamation)
End If
btnCheckRights.Enabled = True
btncancel.Visible = False
Catch ex As Exception
btnCheckRights.Enabled = True
btncancel.Visible = False
End Try
End Sub
End Class