diff --git a/Dokumentation/App.config b/Dokumentation/App.config index 53aa9c6..ce4ea48 100644 --- a/Dokumentation/App.config +++ b/Dokumentation/App.config @@ -1,5 +1,12 @@  + + + + + diff --git a/Dokumentation/Classes/Class1.vb b/Dokumentation/Classes/Class1.vb index fe36368..7768914 100644 --- a/Dokumentation/Classes/Class1.vb +++ b/Dokumentation/Classes/Class1.vb @@ -62,7 +62,7 @@ Public Class Class1 Class1.DBConString = DBDokuTest '"Server=DEVELOPER.verag.ost.dmn\DEVSQL;Initial Catalog=Doku;User ID=sa;Password=BmWr501956;Connection Timeout=5;" Class1.FilePath = "\\192.168.0.253\backup\temp_Sebastian\DokuTest" Else - Class1.DBConString = DBDoku '"Server=buchhaltung.verag.ost.dmn\SQLEXPRESS;Initial Catalog=Doku;User ID=sa;Password=BmWr501956;Connection Timeout=5;" + Class1.DBConString = DBDoku '"Server=sqlguide01.verag.ost.dmn;Initial Catalog=Doku;User ID=sa;Password=BmWr501956;Connection Timeout=5;" Class1.FilePath = "\\DEVELOPER.verag.ost.dmn\f\EDV-Wartung\Dokumentation" End If End Function @@ -722,7 +722,7 @@ Public Class Class1 ' txtbox.AutoCompleteMode = AutoCompleteMode.SuggestAppend ' txtbox.AutoCompleteSource = AutoCompleteSource.CustomSource - txtbox.AutoCompleteCustomSource = tmp + For Each dr As DataRow In ds.Tables(0).Rows Try @@ -733,6 +733,47 @@ Public Class Class1 'Items.Add(dr.Item(0)) Next + txtbox.AutoCompleteCustomSource = tmp + + con.Close() + Catch ex As Exception + MsgBox("Fehler Autocomplete: " & ex.Message) + con.Close() + End Try + con.Close() + End Function + + Public Shared Function AutocompleteCombo(ByRef Combo As ComboBox, spalte As String, Tabelle As String, Optional ByVal ItemNr As Integer = 0) + Dim tmp As New AutoCompleteStringCollection + Dim con As New SqlConnection + Dim cmd As New SqlCommand + con.ConnectionString = Class1.DBConString + cmd.Connection = con + + Try + con.Open() + + Dim ds As New DataSet() + Dim dt As New DataTable() + Dim dataadapter As New SqlDataAdapter("SELECT Distinct " & spalte & " from " & Tabelle & "", con) + dataadapter.Fill(ds) + + ' txtbox.AutoCompleteMode = AutoCompleteMode.SuggestAppend + ' txtbox.AutoCompleteSource = AutoCompleteSource.CustomSource + Combo.AutoCompleteCustomSource = tmp + + For Each dr As DataRow In ds.Tables(0).Rows + Try + tmp.Add(dr.Item(ItemNr)) + Catch + End Try + + 'Items.Add(dr.Item(0)) + Next + Combo.DataSource = tmp + Combo.AutoCompleteMode = AutoCompleteMode.Suggest + Combo.AutoCompleteCustomSource = tmp + con.Close() Catch ex As Exception MsgBox("Fehler Autocomplete: " & ex.Message) diff --git a/Dokumentation/Classes/cPascom.vb b/Dokumentation/Classes/cPascom.vb index 8d57b33..6af0648 100644 --- a/Dokumentation/Classes/cPascom.vb +++ b/Dokumentation/Classes/cPascom.vb @@ -1,5 +1,7 @@ Imports System.Reflection Imports Chilkat +Imports VERAG_PROG_ALLGEMEIN.cCreditSafeAPI + Public Class cPascom Dim API_USER_AUTHORIZATION = "bW9ieTpnWlhTSVprTnhmaUQxOEU=" @@ -95,29 +97,142 @@ Public Class cPascom End Function - 'Public Function GetTelArbeitsplatz4Host() As Boolean - ' Try - ' Dim lines = IO.File.ReadAllLines("\\dc01.verag.ost.dmn\NETLOGON\Telefonarbeitsplaetze.ini") - ' Dim colCount = lines.First.Split(";"c).Length + Public Function Weiterleitung(fromNr As String, toNr As String, Optional ByRef Target As String = "") + Try - ' For Each line In lines - ' Dim objFields = From field In line.Split(";"c) + cChilkat_Helper.UnlockCilkat() + Dim API_STRING = "pbx3.flashnet.at" + + Dim rest As New Chilkat.Rest + Dim success As Boolean + + Dim bTls As Boolean = True + Dim port As Integer = 443 + Dim bAutoReconnect As Boolean = True - ' If String.Compare(cRes.LocalUser.Hostname, objFields(0).ToString, True) = 0 Then - ' Arbeitsplatz = objFields(1).ToString - ' '_ConString = objFields(2).ToString - ' Return True - ' Exit Function - ' End If + success = rest.Connect(API_STRING, port, bTls, bAutoReconnect) + If (success <> True) Then + Debug.WriteLine("ConnectFailReason: " & rest.ConnectFailReason) + Debug.WriteLine(rest.LastErrorText) + + Return False + End If + + rest.AddHeader("Content-Type", "application/json") + rest.SetAuthBasic("moby", "XgDsFmMSutaMLA1") + + + Dim json As New Chilkat.JsonObject + + Dim successJsonLoad As Boolean = json.Load(" + {""target"":""" & toNr & """}}") + + If (successJsonLoad <> True) Then + MsgBox(json.LastErrorText) + Return False + End If + + + Dim sbRequestBody As New Chilkat.StringBuilder + json.EmitSb(sbRequestBody) + + ' MsgBox(sbRequestBody.ToString) + Dim sbResponseBody As New Chilkat.StringBuilder + success = rest.FullRequestSb("POST", "/verag/services/redirect/" & fromNr, sbRequestBody, sbResponseBody) + If (success <> True) Then + Debug.WriteLine(rest.LastErrorText) + Return False + End If + Dim respStatusCode As Integer = rest.ResponseStatusCode + + If (respStatusCode <> 200) Then + + ' MsgBox(sbResponseBody.GetAsString()) + + Return False + End If + + + Dim jsonResp = New Chilkat.JsonObject() + jsonResp.LoadSb(sbResponseBody) + + Dim gatewayId = jsonResp.StringOf("gatewayId") + Dim Resp_error = jsonResp.StringOf("error") + Dim Resp_errorCode = jsonResp.StringOf("errorCode") + Target = jsonResp.StringOf("target") + + ' MsgBox("Hier!!!") + + + Return True + + + + + Catch ex As Exception + MsgBox(ex.Message) + Return False + End Try + Return True + + End Function + + Function getredirect(ByRef target As String) As String + Try + + cChilkat_Helper.UnlockCilkat() + Dim API_STRING = "pbx3.flashnet.at" + + Dim rest As New Chilkat.Rest + Dim success As Boolean + + Dim bTls As Boolean = True + Dim port As Integer = 443 + Dim bAutoReconnect As Boolean = True + + + success = rest.Connect(API_STRING, port, bTls, bAutoReconnect) + If (success <> True) Then + Debug.WriteLine("ConnectFailReason: " & rest.ConnectFailReason) + Debug.WriteLine(rest.LastErrorText) + + Return False + End If + + rest.AddHeader("Content-Type", "application/json") + rest.SetAuthBasic("moby", "XgDsFmMSutaMLA1") + + + Dim json As New Chilkat.JsonObject + + + Dim sbRequestBody As New Chilkat.StringBuilder + json.EmitSb(sbRequestBody) + + ' MsgBox(sbRequestBody.ToString) + Dim sbResponseBody As New Chilkat.StringBuilder + success = rest.FullRequestNoBodySb("GET", "/verag/services/redirect/", sbResponseBody) + If (success <> True) Then + Debug.WriteLine(rest.LastErrorText) + Return False + End If + Dim respStatusCode As Integer = rest.ResponseStatusCode + + If (respStatusCode <> 200) Then + Return False + End If + + Return sbResponseBody.GetAfterBetween(target, ":", ",") + + Catch ex As Exception + MsgBox(ex.Message) + Return False + End Try + Return True + End Function + - ' ' End Select - ' Next - ' Return False - ' Catch ex As Exception - ' ' MsgBox("Fehler beim Lesen TSAnmeldung.ini: " & vbCrLf & ex.Message) - ' End Try - 'End Function End Class diff --git a/Dokumentation/DokuDataSet.Designer.vb b/Dokumentation/DokuDataSet.Designer.vb new file mode 100644 index 0000000..3d0c185 --- /dev/null +++ b/Dokumentation/DokuDataSet.Designer.vb @@ -0,0 +1,1140 @@ +'------------------------------------------------------------------------------ +' +' Dieser Code wurde von einem Tool generiert. +' Laufzeitversion:4.0.30319.42000 +' +' Änderungen an dieser Datei können falsches Verhalten verursachen und gehen verloren, wenn +' der Code erneut generiert wird. +' +'------------------------------------------------------------------------------ + +Option Strict Off +Option Explicit On + + + +''' +'''Represents a strongly typed in-memory cache of data. +''' + _ +Partial Public Class DokuDataSet + Inherits Global.System.Data.DataSet + + Private tableTbL_NotfallKontakte As TbL_NotfallKontakteDataTable + + Private _schemaSerializationMode As Global.System.Data.SchemaSerializationMode = Global.System.Data.SchemaSerializationMode.IncludeSchema + + _ + Public Sub New() + MyBase.New + Me.BeginInit + Me.InitClass + Dim schemaChangedHandler As Global.System.ComponentModel.CollectionChangeEventHandler = AddressOf Me.SchemaChanged + AddHandler MyBase.Tables.CollectionChanged, schemaChangedHandler + AddHandler MyBase.Relations.CollectionChanged, schemaChangedHandler + Me.EndInit + End Sub + + _ + Protected Sub New(ByVal info As Global.System.Runtime.Serialization.SerializationInfo, ByVal context As Global.System.Runtime.Serialization.StreamingContext) + MyBase.New(info, context, false) + If (Me.IsBinarySerialized(info, context) = true) Then + Me.InitVars(false) + Dim schemaChangedHandler1 As Global.System.ComponentModel.CollectionChangeEventHandler = AddressOf Me.SchemaChanged + AddHandler Me.Tables.CollectionChanged, schemaChangedHandler1 + AddHandler Me.Relations.CollectionChanged, schemaChangedHandler1 + Return + End If + Dim strSchema As String = CType(info.GetValue("XmlSchema", GetType(String)),String) + If (Me.DetermineSchemaSerializationMode(info, context) = Global.System.Data.SchemaSerializationMode.IncludeSchema) Then + Dim ds As Global.System.Data.DataSet = New Global.System.Data.DataSet() + ds.ReadXmlSchema(New Global.System.Xml.XmlTextReader(New Global.System.IO.StringReader(strSchema))) + If (Not (ds.Tables("TbL_NotfallKontakte")) Is Nothing) Then + MyBase.Tables.Add(New TbL_NotfallKontakteDataTable(ds.Tables("TbL_NotfallKontakte"))) + End If + Me.DataSetName = ds.DataSetName + Me.Prefix = ds.Prefix + Me.Namespace = ds.Namespace + Me.Locale = ds.Locale + Me.CaseSensitive = ds.CaseSensitive + Me.EnforceConstraints = ds.EnforceConstraints + Me.Merge(ds, false, Global.System.Data.MissingSchemaAction.Add) + Me.InitVars + Else + Me.ReadXmlSchema(New Global.System.Xml.XmlTextReader(New Global.System.IO.StringReader(strSchema))) + End If + Me.GetSerializationData(info, context) + Dim schemaChangedHandler As Global.System.ComponentModel.CollectionChangeEventHandler = AddressOf Me.SchemaChanged + AddHandler MyBase.Tables.CollectionChanged, schemaChangedHandler + AddHandler Me.Relations.CollectionChanged, schemaChangedHandler + End Sub + + _ + Public ReadOnly Property TbL_NotfallKontakte() As TbL_NotfallKontakteDataTable + Get + Return Me.tableTbL_NotfallKontakte + End Get + End Property + + _ + Public Overrides Property SchemaSerializationMode() As Global.System.Data.SchemaSerializationMode + Get + Return Me._schemaSerializationMode + End Get + Set + Me._schemaSerializationMode = value + End Set + End Property + + _ + Public Shadows ReadOnly Property Tables() As Global.System.Data.DataTableCollection + Get + Return MyBase.Tables + End Get + End Property + + _ + Public Shadows ReadOnly Property Relations() As Global.System.Data.DataRelationCollection + Get + Return MyBase.Relations + End Get + End Property + + _ + Protected Overrides Sub InitializeDerivedDataSet() + Me.BeginInit + Me.InitClass + Me.EndInit + End Sub + + _ + Public Overrides Function Clone() As Global.System.Data.DataSet + Dim cln As DokuDataSet = CType(MyBase.Clone,DokuDataSet) + cln.InitVars + cln.SchemaSerializationMode = Me.SchemaSerializationMode + Return cln + End Function + + _ + Protected Overrides Function ShouldSerializeTables() As Boolean + Return false + End Function + + _ + Protected Overrides Function ShouldSerializeRelations() As Boolean + Return false + End Function + + _ + Protected Overrides Sub ReadXmlSerializable(ByVal reader As Global.System.Xml.XmlReader) + If (Me.DetermineSchemaSerializationMode(reader) = Global.System.Data.SchemaSerializationMode.IncludeSchema) Then + Me.Reset + Dim ds As Global.System.Data.DataSet = New Global.System.Data.DataSet() + ds.ReadXml(reader) + If (Not (ds.Tables("TbL_NotfallKontakte")) Is Nothing) Then + MyBase.Tables.Add(New TbL_NotfallKontakteDataTable(ds.Tables("TbL_NotfallKontakte"))) + End If + Me.DataSetName = ds.DataSetName + Me.Prefix = ds.Prefix + Me.Namespace = ds.Namespace + Me.Locale = ds.Locale + Me.CaseSensitive = ds.CaseSensitive + Me.EnforceConstraints = ds.EnforceConstraints + Me.Merge(ds, false, Global.System.Data.MissingSchemaAction.Add) + Me.InitVars + Else + Me.ReadXml(reader) + Me.InitVars + End If + End Sub + + _ + Protected Overrides Function GetSchemaSerializable() As Global.System.Xml.Schema.XmlSchema + Dim stream As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream() + Me.WriteXmlSchema(New Global.System.Xml.XmlTextWriter(stream, Nothing)) + stream.Position = 0 + Return Global.System.Xml.Schema.XmlSchema.Read(New Global.System.Xml.XmlTextReader(stream), Nothing) + End Function + + _ + Friend Overloads Sub InitVars() + Me.InitVars(true) + End Sub + + _ + Friend Overloads Sub InitVars(ByVal initTable As Boolean) + Me.tableTbL_NotfallKontakte = CType(MyBase.Tables("TbL_NotfallKontakte"),TbL_NotfallKontakteDataTable) + If (initTable = true) Then + If (Not (Me.tableTbL_NotfallKontakte) Is Nothing) Then + Me.tableTbL_NotfallKontakte.InitVars + End If + End If + End Sub + + _ + Private Sub InitClass() + Me.DataSetName = "DokuDataSet" + Me.Prefix = "" + Me.Namespace = "http://tempuri.org/DokuDataSet.xsd" + Me.EnforceConstraints = true + Me.SchemaSerializationMode = Global.System.Data.SchemaSerializationMode.IncludeSchema + Me.tableTbL_NotfallKontakte = New TbL_NotfallKontakteDataTable() + MyBase.Tables.Add(Me.tableTbL_NotfallKontakte) + End Sub + + _ + Private Function ShouldSerializeTbL_NotfallKontakte() As Boolean + Return false + End Function + + _ + Private Sub SchemaChanged(ByVal sender As Object, ByVal e As Global.System.ComponentModel.CollectionChangeEventArgs) + If (e.Action = Global.System.ComponentModel.CollectionChangeAction.Remove) Then + Me.InitVars + End If + End Sub + + _ + Public Shared Function GetTypedDataSetSchema(ByVal xs As Global.System.Xml.Schema.XmlSchemaSet) As Global.System.Xml.Schema.XmlSchemaComplexType + Dim ds As DokuDataSet = New DokuDataSet() + 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 any As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny() + any.Namespace = ds.Namespace + sequence.Items.Add(any) + 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 + + _ + Public Delegate Sub TbL_NotfallKontakteRowChangeEventHandler(ByVal sender As Object, ByVal e As TbL_NotfallKontakteRowChangeEvent) + + ''' + '''Represents the strongly named DataTable class. + ''' + _ + Partial Public Class TbL_NotfallKontakteDataTable + Inherits Global.System.Data.TypedTableBase(Of TbL_NotfallKontakteRow) + + Private columnName As Global.System.Data.DataColumn + + _ + Public Sub New() + MyBase.New + Me.TableName = "TbL_NotfallKontakte" + Me.BeginInit + Me.InitClass + Me.EndInit + End Sub + + _ + 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 + + _ + 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 + + _ + Public ReadOnly Property NameColumn() As Global.System.Data.DataColumn + Get + Return Me.columnName + End Get + End Property + + _ + Public ReadOnly Property Count() As Integer + Get + Return Me.Rows.Count + End Get + End Property + + _ + Public Default ReadOnly Property Item(ByVal index As Integer) As TbL_NotfallKontakteRow + Get + Return CType(Me.Rows(index),TbL_NotfallKontakteRow) + End Get + End Property + + _ + Public Event TbL_NotfallKontakteRowChanging As TbL_NotfallKontakteRowChangeEventHandler + + _ + Public Event TbL_NotfallKontakteRowChanged As TbL_NotfallKontakteRowChangeEventHandler + + _ + Public Event TbL_NotfallKontakteRowDeleting As TbL_NotfallKontakteRowChangeEventHandler + + _ + Public Event TbL_NotfallKontakteRowDeleted As TbL_NotfallKontakteRowChangeEventHandler + + _ + Public Overloads Sub AddTbL_NotfallKontakteRow(ByVal row As TbL_NotfallKontakteRow) + Me.Rows.Add(row) + End Sub + + _ + Public Overloads Function AddTbL_NotfallKontakteRow(ByVal Name As String) As TbL_NotfallKontakteRow + Dim rowTbL_NotfallKontakteRow As TbL_NotfallKontakteRow = CType(Me.NewRow,TbL_NotfallKontakteRow) + Dim columnValuesArray() As Object = New Object() {Name} + rowTbL_NotfallKontakteRow.ItemArray = columnValuesArray + Me.Rows.Add(rowTbL_NotfallKontakteRow) + Return rowTbL_NotfallKontakteRow + End Function + + _ + Public Overrides Function Clone() As Global.System.Data.DataTable + Dim cln As TbL_NotfallKontakteDataTable = CType(MyBase.Clone,TbL_NotfallKontakteDataTable) + cln.InitVars + Return cln + End Function + + _ + Protected Overrides Function CreateInstance() As Global.System.Data.DataTable + Return New TbL_NotfallKontakteDataTable() + End Function + + _ + Friend Sub InitVars() + Me.columnName = MyBase.Columns("Name") + End Sub + + _ + Private Sub InitClass() + Me.columnName = New Global.System.Data.DataColumn("Name", GetType(String), Nothing, Global.System.Data.MappingType.Element) + MyBase.Columns.Add(Me.columnName) + Me.columnName.AllowDBNull = false + Me.columnName.MaxLength = 50 + End Sub + + _ + Public Function NewTbL_NotfallKontakteRow() As TbL_NotfallKontakteRow + Return CType(Me.NewRow,TbL_NotfallKontakteRow) + End Function + + _ + Protected Overrides Function NewRowFromBuilder(ByVal builder As Global.System.Data.DataRowBuilder) As Global.System.Data.DataRow + Return New TbL_NotfallKontakteRow(builder) + End Function + + _ + Protected Overrides Function GetRowType() As Global.System.Type + Return GetType(TbL_NotfallKontakteRow) + End Function + + _ + Protected Overrides Sub OnRowChanged(ByVal e As Global.System.Data.DataRowChangeEventArgs) + MyBase.OnRowChanged(e) + If (Not (Me.TbL_NotfallKontakteRowChangedEvent) Is Nothing) Then + RaiseEvent TbL_NotfallKontakteRowChanged(Me, New TbL_NotfallKontakteRowChangeEvent(CType(e.Row,TbL_NotfallKontakteRow), e.Action)) + End If + End Sub + + _ + Protected Overrides Sub OnRowChanging(ByVal e As Global.System.Data.DataRowChangeEventArgs) + MyBase.OnRowChanging(e) + If (Not (Me.TbL_NotfallKontakteRowChangingEvent) Is Nothing) Then + RaiseEvent TbL_NotfallKontakteRowChanging(Me, New TbL_NotfallKontakteRowChangeEvent(CType(e.Row,TbL_NotfallKontakteRow), e.Action)) + End If + End Sub + + _ + Protected Overrides Sub OnRowDeleted(ByVal e As Global.System.Data.DataRowChangeEventArgs) + MyBase.OnRowDeleted(e) + If (Not (Me.TbL_NotfallKontakteRowDeletedEvent) Is Nothing) Then + RaiseEvent TbL_NotfallKontakteRowDeleted(Me, New TbL_NotfallKontakteRowChangeEvent(CType(e.Row,TbL_NotfallKontakteRow), e.Action)) + End If + End Sub + + _ + Protected Overrides Sub OnRowDeleting(ByVal e As Global.System.Data.DataRowChangeEventArgs) + MyBase.OnRowDeleting(e) + If (Not (Me.TbL_NotfallKontakteRowDeletingEvent) Is Nothing) Then + RaiseEvent TbL_NotfallKontakteRowDeleting(Me, New TbL_NotfallKontakteRowChangeEvent(CType(e.Row,TbL_NotfallKontakteRow), e.Action)) + End If + End Sub + + _ + Public Sub RemoveTbL_NotfallKontakteRow(ByVal row As TbL_NotfallKontakteRow) + Me.Rows.Remove(row) + End Sub + + _ + 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 DokuDataSet = New DokuDataSet() + 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 = "TbL_NotfallKontakteDataTable" + 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 + + ''' + '''Represents strongly named DataRow class. + ''' + Partial Public Class TbL_NotfallKontakteRow + Inherits Global.System.Data.DataRow + + Private tableTbL_NotfallKontakte As TbL_NotfallKontakteDataTable + + _ + Friend Sub New(ByVal rb As Global.System.Data.DataRowBuilder) + MyBase.New(rb) + Me.tableTbL_NotfallKontakte = CType(Me.Table,TbL_NotfallKontakteDataTable) + End Sub + + _ + Public Property Name() As String + Get + Return CType(Me(Me.tableTbL_NotfallKontakte.NameColumn),String) + End Get + Set + Me(Me.tableTbL_NotfallKontakte.NameColumn) = value + End Set + End Property + End Class + + ''' + '''Row event argument class + ''' + _ + Public Class TbL_NotfallKontakteRowChangeEvent + Inherits Global.System.EventArgs + + Private eventRow As TbL_NotfallKontakteRow + + Private eventAction As Global.System.Data.DataRowAction + + _ + Public Sub New(ByVal row As TbL_NotfallKontakteRow, ByVal action As Global.System.Data.DataRowAction) + MyBase.New + Me.eventRow = row + Me.eventAction = action + End Sub + + _ + Public ReadOnly Property Row() As TbL_NotfallKontakteRow + Get + Return Me.eventRow + End Get + End Property + + _ + Public ReadOnly Property Action() As Global.System.Data.DataRowAction + Get + Return Me.eventAction + End Get + End Property + End Class +End Class + +Namespace DokuDataSetTableAdapters + + ''' + '''Represents the connection and commands used to retrieve and save data. + ''' + _ + Partial Public Class TbL_NotfallKontakteTableAdapter + Inherits Global.System.ComponentModel.Component + + Private WithEvents _adapter As Global.System.Data.SqlClient.SqlDataAdapter + + Private _connection As Global.System.Data.SqlClient.SqlConnection + + Private _transaction As Global.System.Data.SqlClient.SqlTransaction + + Private _commandCollection() As Global.System.Data.SqlClient.SqlCommand + + Private _clearBeforeFill As Boolean + + _ + Public Sub New() + MyBase.New + Me.ClearBeforeFill = true + End Sub + + _ + Protected Friend ReadOnly Property Adapter() As Global.System.Data.SqlClient.SqlDataAdapter + Get + If (Me._adapter Is Nothing) Then + Me.InitAdapter + End If + Return Me._adapter + End Get + End Property + + _ + Friend Property Connection() As Global.System.Data.SqlClient.SqlConnection + Get + If (Me._connection Is Nothing) Then + Me.InitConnection + End If + Return Me._connection + End Get + Set + Me._connection = value + If (Not (Me.Adapter.InsertCommand) Is Nothing) Then + Me.Adapter.InsertCommand.Connection = value + End If + If (Not (Me.Adapter.DeleteCommand) Is Nothing) Then + Me.Adapter.DeleteCommand.Connection = value + End If + If (Not (Me.Adapter.UpdateCommand) Is Nothing) Then + Me.Adapter.UpdateCommand.Connection = value + End If + Dim i As Integer = 0 + Do While (i < Me.CommandCollection.Length) + If (Not (Me.CommandCollection(i)) Is Nothing) Then + CType(Me.CommandCollection(i),Global.System.Data.SqlClient.SqlCommand).Connection = value + End If + i = (i + 1) + Loop + End Set + End Property + + _ + Friend Property Transaction() As Global.System.Data.SqlClient.SqlTransaction + Get + Return Me._transaction + End Get + Set + Me._transaction = value + Dim i As Integer = 0 + Do While (i < Me.CommandCollection.Length) + Me.CommandCollection(i).Transaction = Me._transaction + i = (i + 1) + Loop + If ((Not (Me.Adapter) Is Nothing) _ + AndAlso (Not (Me.Adapter.DeleteCommand) Is Nothing)) Then + Me.Adapter.DeleteCommand.Transaction = Me._transaction + End If + If ((Not (Me.Adapter) Is Nothing) _ + AndAlso (Not (Me.Adapter.InsertCommand) Is Nothing)) Then + Me.Adapter.InsertCommand.Transaction = Me._transaction + End If + If ((Not (Me.Adapter) Is Nothing) _ + AndAlso (Not (Me.Adapter.UpdateCommand) Is Nothing)) Then + Me.Adapter.UpdateCommand.Transaction = Me._transaction + End If + End Set + End Property + + _ + Protected ReadOnly Property CommandCollection() As Global.System.Data.SqlClient.SqlCommand() + Get + If (Me._commandCollection Is Nothing) Then + Me.InitCommandCollection + End If + Return Me._commandCollection + End Get + End Property + + _ + Public Property ClearBeforeFill() As Boolean + Get + Return Me._clearBeforeFill + End Get + Set + Me._clearBeforeFill = value + End Set + End Property + + _ + Private Sub InitAdapter() + Me._adapter = New Global.System.Data.SqlClient.SqlDataAdapter() + Dim tableMapping As Global.System.Data.Common.DataTableMapping = New Global.System.Data.Common.DataTableMapping() + tableMapping.SourceTable = "Table" + tableMapping.DataSetTable = "TbL_NotfallKontakte" + tableMapping.ColumnMappings.Add("Name", "Name") + Me._adapter.TableMappings.Add(tableMapping) + End Sub + + _ + Private Sub InitConnection() + Me._connection = New Global.System.Data.SqlClient.SqlConnection() + Me._connection.ConnectionString = Global.Dokumentation.My.MySettings.Default.DokuConnectionString + End Sub + + _ + Private Sub InitCommandCollection() + Me._commandCollection = New Global.System.Data.SqlClient.SqlCommand(0) {} + Me._commandCollection(0) = New Global.System.Data.SqlClient.SqlCommand() + Me._commandCollection(0).Connection = Me.Connection + Me._commandCollection(0).CommandText = "SELECT Name FROM dbo.TbL_NotfallKontakte" + Me._commandCollection(0).CommandType = Global.System.Data.CommandType.Text + End Sub + + _ + Public Overloads Overridable Function Fill(ByVal dataTable As DokuDataSet.TbL_NotfallKontakteDataTable) As Integer + Me.Adapter.SelectCommand = Me.CommandCollection(0) + If (Me.ClearBeforeFill = true) Then + dataTable.Clear + End If + Dim returnValue As Integer = Me.Adapter.Fill(dataTable) + Return returnValue + End Function + + _ + Public Overloads Overridable Function GetData() As DokuDataSet.TbL_NotfallKontakteDataTable + Me.Adapter.SelectCommand = Me.CommandCollection(0) + Dim dataTable As DokuDataSet.TbL_NotfallKontakteDataTable = New DokuDataSet.TbL_NotfallKontakteDataTable() + Me.Adapter.Fill(dataTable) + Return dataTable + End Function + End Class + + ''' + '''TableAdapterManager is used to coordinate TableAdapters in the dataset to enable Hierarchical Update scenarios + ''' + _ + Partial Public Class TableAdapterManager + Inherits Global.System.ComponentModel.Component + + Private _updateOrder As UpdateOrderOption + + Private _backupDataSetBeforeUpdate As Boolean + + Private _connection As Global.System.Data.IDbConnection + + _ + Public Property UpdateOrder() As UpdateOrderOption + Get + Return Me._updateOrder + End Get + Set + Me._updateOrder = value + End Set + End Property + + _ + Public Property BackupDataSetBeforeUpdate() As Boolean + Get + Return Me._backupDataSetBeforeUpdate + End Get + Set + Me._backupDataSetBeforeUpdate = value + End Set + End Property + + _ + Public Property Connection() As Global.System.Data.IDbConnection + Get + If (Not (Me._connection) Is Nothing) Then + Return Me._connection + End If + Return Nothing + End Get + Set + Me._connection = value + End Set + End Property + + _ + Public ReadOnly Property TableAdapterInstanceCount() As Integer + Get + Dim count As Integer = 0 + Return count + End Get + End Property + + ''' + '''Update rows in top-down order. + ''' + _ + Private Function UpdateUpdatedRows(ByVal dataSet As DokuDataSet, ByVal allChangedRows As Global.System.Collections.Generic.List(Of Global.System.Data.DataRow), ByVal allAddedRows As Global.System.Collections.Generic.List(Of Global.System.Data.DataRow)) As Integer + Dim result As Integer = 0 + Return result + End Function + + ''' + '''Insert rows in top-down order. + ''' + _ + Private Function UpdateInsertedRows(ByVal dataSet As DokuDataSet, ByVal allAddedRows As Global.System.Collections.Generic.List(Of Global.System.Data.DataRow)) As Integer + Dim result As Integer = 0 + Return result + End Function + + ''' + '''Delete rows in bottom-up order. + ''' + _ + Private Function UpdateDeletedRows(ByVal dataSet As DokuDataSet, ByVal allChangedRows As Global.System.Collections.Generic.List(Of Global.System.Data.DataRow)) As Integer + Dim result As Integer = 0 + Return result + End Function + + ''' + '''Remove inserted rows that become updated rows after calling TableAdapter.Update(inserted rows) first + ''' + _ + Private Function GetRealUpdatedRows(ByVal updatedRows() As Global.System.Data.DataRow, ByVal allAddedRows As Global.System.Collections.Generic.List(Of Global.System.Data.DataRow)) As Global.System.Data.DataRow() + If ((updatedRows Is Nothing) _ + OrElse (updatedRows.Length < 1)) Then + Return updatedRows + End If + If ((allAddedRows Is Nothing) _ + OrElse (allAddedRows.Count < 1)) Then + Return updatedRows + End If + Dim realUpdatedRows As Global.System.Collections.Generic.List(Of Global.System.Data.DataRow) = New Global.System.Collections.Generic.List(Of Global.System.Data.DataRow)() + Dim i As Integer = 0 + Do While (i < updatedRows.Length) + Dim row As Global.System.Data.DataRow = updatedRows(i) + If (allAddedRows.Contains(row) = false) Then + realUpdatedRows.Add(row) + End If + i = (i + 1) + Loop + Return realUpdatedRows.ToArray + End Function + + ''' + '''Update all changes to the dataset. + ''' + _ + Public Overridable Function UpdateAll(ByVal dataSet As DokuDataSet) As Integer + If (dataSet Is Nothing) Then + Throw New Global.System.ArgumentNullException("dataSet") + End If + If (dataSet.HasChanges = false) Then + Return 0 + End If + Dim workConnection As Global.System.Data.IDbConnection = Me.Connection + If (workConnection Is Nothing) Then + Throw New Global.System.ApplicationException("TableAdapterManager enthält keine Verbindungsinformationen. Legen Sie jede TableA"& _ + "dapterManager TableAdapter-Eigenschaft auf eine gültige TableAdapter-Instanz fes"& _ + "t.") + End If + Dim workConnOpened As Boolean = false + If ((workConnection.State And Global.System.Data.ConnectionState.Broken) _ + = Global.System.Data.ConnectionState.Broken) Then + workConnection.Close + End If + If (workConnection.State = Global.System.Data.ConnectionState.Closed) Then + workConnection.Open + workConnOpened = true + End If + Dim workTransaction As Global.System.Data.IDbTransaction = workConnection.BeginTransaction + If (workTransaction Is Nothing) Then + Throw New Global.System.ApplicationException("Die Transaktion kann nicht gestartet werden. Die aktuelle Datenverbindung unterst"& _ + "ützt keine Transaktionen, oder der aktuelle Zustand lässt den Start der Transakt"& _ + "ion nicht zu.") + End If + Dim allChangedRows As Global.System.Collections.Generic.List(Of Global.System.Data.DataRow) = New Global.System.Collections.Generic.List(Of Global.System.Data.DataRow)() + Dim allAddedRows As Global.System.Collections.Generic.List(Of Global.System.Data.DataRow) = New Global.System.Collections.Generic.List(Of Global.System.Data.DataRow)() + Dim adaptersWithAcceptChangesDuringUpdate As Global.System.Collections.Generic.List(Of Global.System.Data.Common.DataAdapter) = New Global.System.Collections.Generic.List(Of Global.System.Data.Common.DataAdapter)() + Dim revertConnections As Global.System.Collections.Generic.Dictionary(Of Object, Global.System.Data.IDbConnection) = New Global.System.Collections.Generic.Dictionary(Of Object, Global.System.Data.IDbConnection)() + Dim result As Integer = 0 + Dim backupDataSet As Global.System.Data.DataSet = Nothing + If Me.BackupDataSetBeforeUpdate Then + backupDataSet = New Global.System.Data.DataSet() + backupDataSet.Merge(dataSet) + End If + Try + '---- Prepare for update ----------- + ' + ' + '---- Perform updates ----------- + ' + If (Me.UpdateOrder = UpdateOrderOption.UpdateInsertDelete) Then + result = (result + Me.UpdateUpdatedRows(dataSet, allChangedRows, allAddedRows)) + result = (result + Me.UpdateInsertedRows(dataSet, allAddedRows)) + Else + result = (result + Me.UpdateInsertedRows(dataSet, allAddedRows)) + result = (result + Me.UpdateUpdatedRows(dataSet, allChangedRows, allAddedRows)) + End If + result = (result + Me.UpdateDeletedRows(dataSet, allChangedRows)) + ' + '---- Commit updates ----------- + ' + workTransaction.Commit + If (0 < allAddedRows.Count) Then + Dim rows((allAddedRows.Count) - 1) As Global.System.Data.DataRow + allAddedRows.CopyTo(rows) + Dim i As Integer = 0 + Do While (i < rows.Length) + Dim row As Global.System.Data.DataRow = rows(i) + row.AcceptChanges + i = (i + 1) + Loop + End If + If (0 < allChangedRows.Count) Then + Dim rows((allChangedRows.Count) - 1) As Global.System.Data.DataRow + allChangedRows.CopyTo(rows) + Dim i As Integer = 0 + Do While (i < rows.Length) + Dim row As Global.System.Data.DataRow = rows(i) + row.AcceptChanges + i = (i + 1) + Loop + End If + Catch ex As Global.System.Exception + workTransaction.Rollback + '---- Restore the dataset ----------- + If Me.BackupDataSetBeforeUpdate Then + Global.System.Diagnostics.Debug.Assert((Not (backupDataSet) Is Nothing)) + dataSet.Clear + dataSet.Merge(backupDataSet) + Else + If (0 < allAddedRows.Count) Then + Dim rows((allAddedRows.Count) - 1) As Global.System.Data.DataRow + allAddedRows.CopyTo(rows) + Dim i As Integer = 0 + Do While (i < rows.Length) + Dim row As Global.System.Data.DataRow = rows(i) + row.AcceptChanges + row.SetAdded + i = (i + 1) + Loop + End If + End If + Throw ex + Finally + If workConnOpened Then + workConnection.Close + End If + If (0 < adaptersWithAcceptChangesDuringUpdate.Count) Then + Dim adapters((adaptersWithAcceptChangesDuringUpdate.Count) - 1) As Global.System.Data.Common.DataAdapter + adaptersWithAcceptChangesDuringUpdate.CopyTo(adapters) + Dim i As Integer = 0 + Do While (i < adapters.Length) + Dim adapter As Global.System.Data.Common.DataAdapter = adapters(i) + adapter.AcceptChangesDuringUpdate = true + i = (i + 1) + Loop + End If + End Try + Return result + End Function + + _ + Protected Overridable Sub SortSelfReferenceRows(ByVal rows() As Global.System.Data.DataRow, ByVal relation As Global.System.Data.DataRelation, ByVal childFirst As Boolean) + Global.System.Array.Sort(Of Global.System.Data.DataRow)(rows, New SelfReferenceComparer(relation, childFirst)) + End Sub + + _ + Protected Overridable Function MatchTableAdapterConnection(ByVal inputConnection As Global.System.Data.IDbConnection) As Boolean + If (Not (Me._connection) Is Nothing) Then + Return true + End If + If ((Me.Connection Is Nothing) _ + OrElse (inputConnection Is Nothing)) Then + Return true + End If + If String.Equals(Me.Connection.ConnectionString, inputConnection.ConnectionString, Global.System.StringComparison.Ordinal) Then + Return true + End If + Return false + End Function + + ''' + '''Update Order Option + ''' + _ + Public Enum UpdateOrderOption + + InsertUpdateDelete = 0 + + UpdateInsertDelete = 1 + End Enum + + ''' + '''Used to sort self-referenced table's rows + ''' + _ + Private Class SelfReferenceComparer + Inherits Object + Implements Global.System.Collections.Generic.IComparer(Of Global.System.Data.DataRow) + + Private _relation As Global.System.Data.DataRelation + + Private _childFirst As Integer + + _ + Friend Sub New(ByVal relation As Global.System.Data.DataRelation, ByVal childFirst As Boolean) + MyBase.New + Me._relation = relation + If childFirst Then + Me._childFirst = -1 + Else + Me._childFirst = 1 + End If + End Sub + + _ + Private Function GetRoot(ByVal row As Global.System.Data.DataRow, ByRef distance As Integer) As Global.System.Data.DataRow + Global.System.Diagnostics.Debug.Assert((Not (row) Is Nothing)) + Dim root As Global.System.Data.DataRow = row + distance = 0 + + Dim traversedRows As Global.System.Collections.Generic.IDictionary(Of Global.System.Data.DataRow, Global.System.Data.DataRow) = New Global.System.Collections.Generic.Dictionary(Of Global.System.Data.DataRow, Global.System.Data.DataRow)() + traversedRows(row) = row + + Dim parent As Global.System.Data.DataRow = row.GetParentRow(Me._relation, Global.System.Data.DataRowVersion.[Default]) + + Do While ((Not (parent) Is Nothing) _ + AndAlso (traversedRows.ContainsKey(parent) = false)) + distance = (distance + 1) + root = parent + traversedRows(parent) = parent + parent = parent.GetParentRow(Me._relation, Global.System.Data.DataRowVersion.[Default]) + + Loop + + If (distance = 0) Then + traversedRows.Clear + traversedRows(row) = row + parent = row.GetParentRow(Me._relation, Global.System.Data.DataRowVersion.Original) + + Do While ((Not (parent) Is Nothing) _ + AndAlso (traversedRows.ContainsKey(parent) = false)) + distance = (distance + 1) + root = parent + traversedRows(parent) = parent + parent = parent.GetParentRow(Me._relation, Global.System.Data.DataRowVersion.Original) + + Loop + End If + + Return root + End Function + + _ + Public Function Compare(ByVal row1 As Global.System.Data.DataRow, ByVal row2 As Global.System.Data.DataRow) As Integer Implements Global.System.Collections.Generic.IComparer(Of Global.System.Data.DataRow).Compare + If Object.ReferenceEquals(row1, row2) Then + Return 0 + End If + If (row1 Is Nothing) Then + Return -1 + End If + If (row2 Is Nothing) Then + Return 1 + End If + + Dim distance1 As Integer = 0 + Dim root1 As Global.System.Data.DataRow = Me.GetRoot(row1, distance1) + + Dim distance2 As Integer = 0 + Dim root2 As Global.System.Data.DataRow = Me.GetRoot(row2, distance2) + + If Object.ReferenceEquals(root1, root2) Then + Return (Me._childFirst * distance1.CompareTo(distance2)) + Else + Global.System.Diagnostics.Debug.Assert(((Not (root1.Table) Is Nothing) _ + AndAlso (Not (root2.Table) Is Nothing))) + If (root1.Table.Rows.IndexOf(root1) < root2.Table.Rows.IndexOf(root2)) Then + Return -1 + Else + Return 1 + End If + End If + End Function + End Class + End Class +End Namespace diff --git a/Dokumentation/DokuDataSet.xsc b/Dokumentation/DokuDataSet.xsc new file mode 100644 index 0000000..5f28270 --- /dev/null +++ b/Dokumentation/DokuDataSet.xsc @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/Dokumentation/DokuDataSet.xsd b/Dokumentation/DokuDataSet.xsd new file mode 100644 index 0000000..229a7ec --- /dev/null +++ b/Dokumentation/DokuDataSet.xsd @@ -0,0 +1,50 @@ + + + + + + + + + + + + + + + SELECT Name FROM dbo.TbL_NotfallKontakte + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Dokumentation/DokuDataSet.xss b/Dokumentation/DokuDataSet.xss new file mode 100644 index 0000000..5f28270 --- /dev/null +++ b/Dokumentation/DokuDataSet.xss @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/Dokumentation/Dokumentation.vbproj b/Dokumentation/Dokumentation.vbproj index 6558369..c36c500 100644 --- a/Dokumentation/Dokumentation.vbproj +++ b/Dokumentation/Dokumentation.vbproj @@ -258,6 +258,11 @@ + + True + True + DokuDataSet.xsd + frmColumnsPrint.vb @@ -318,6 +323,12 @@ UserControl + + uscntr_Notruf.vb + + + UserControl + uscntr_TSSitzungen.vb @@ -532,6 +543,9 @@ uscntr_MessageUser.vb + + uscntr_Notruf.vb + uscntr_TSSitzungen.vb @@ -609,6 +623,17 @@ + + DokuDataSet.xsd + + + MSDataSetGenerator + DokuDataSet.Designer.vb + Designer + + + DokuDataSet.xsd + MyApplicationCodeGenerator diff --git a/Dokumentation/Main.Designer.vb b/Dokumentation/Main.Designer.vb index df5f626..2fba2d2 100644 --- a/Dokumentation/Main.Designer.vb +++ b/Dokumentation/Main.Designer.vb @@ -95,6 +95,7 @@ Partial Class Main Me.IPAdresseInZwischenablageToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem() Me.TeamviewerVerbindenToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem() Me.RDPToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem() + Me.RDPFensterToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem() Me.ToolStripSeparator3 = New System.Windows.Forms.ToolStripSeparator() Me.ObjektLöschenToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem() Me.ToolStripSeparator2 = New System.Windows.Forms.ToolStripSeparator() @@ -116,7 +117,6 @@ Partial Class Main Me.panTSSitzungen = New System.Windows.Forms.Panel() Me.Timer_Refresh = New System.Windows.Forms.Timer(Me.components) Me.Timer1 = New System.Windows.Forms.Timer(Me.components) - Me.RDPFensterToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem() Me.Panel2.SuspendLayout() Me.Panel4.SuspendLayout() CType(Me.picAVISOMessenger, System.ComponentModel.ISupportInitialize).BeginInit() @@ -216,13 +216,13 @@ Partial Class Main Me.Button1.ContextMenuStrip = Me.ContextMenuStrip1 Me.Button1.FlatAppearance.MouseOverBackColor = System.Drawing.Color.FromArgb(CType(CType(224, Byte), Integer), CType(CType(224, Byte), Integer), CType(CType(224, Byte), Integer)) Me.Button1.FlatStyle = System.Windows.Forms.FlatStyle.Flat - Me.Button1.Image = Global.Dokumentation.My.Resources.Resources.excel20 + Me.Button1.Image = Global.Dokumentation.My.Resources.Resources.del Me.Button1.ImageAlign = System.Drawing.ContentAlignment.MiddleRight Me.Button1.Location = New System.Drawing.Point(161, 5) Me.Button1.Name = "Button1" Me.Button1.Size = New System.Drawing.Size(151, 28) Me.Button1.TabIndex = 43 - Me.Button1.Text = "Telefonliste" + Me.Button1.Text = "IT Notruf" Me.Button1.UseVisualStyleBackColor = False ' 'ContextMenuStrip1 @@ -257,7 +257,7 @@ Partial Class Main Me.LblDEBUGMODE.Font = New System.Drawing.Font("Microsoft Sans Serif", 9.75!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.LblDEBUGMODE.Location = New System.Drawing.Point(7, 33) Me.LblDEBUGMODE.Name = "LblDEBUGMODE" - Me.LblDEBUGMODE.Size = New System.Drawing.Size(113, 16) + Me.LblDEBUGMODE.Size = New System.Drawing.Size(115, 16) Me.LblDEBUGMODE.TabIndex = 13 Me.LblDEBUGMODE.Text = "LblDebugmode" Me.LblDEBUGMODE.Visible = False @@ -797,7 +797,7 @@ Partial Class Main ' Me.DGVMainContext.Items.AddRange(New System.Windows.Forms.ToolStripItem() {Me.DgvMainContextMenuItemHost, Me.DateienToolStripMenuItem, Me.SMBToolStripMenuItem, Me.DgvMainContextMenuItemLink, Me.IPAdresseInZwischenablageToolStripMenuItem, Me.TeamviewerVerbindenToolStripMenuItem, Me.RDPToolStripMenuItem, Me.RDPFensterToolStripMenuItem, Me.ToolStripSeparator3, Me.ObjektLöschenToolStripMenuItem, Me.ToolStripSeparator2, Me.NetzwerkdateienToolStripMenuItem, Me.ToolsToolStripMenuItem}) Me.DGVMainContext.Name = "ContextMenuStrip2" - Me.DGVMainContext.Size = New System.Drawing.Size(230, 280) + Me.DGVMainContext.Size = New System.Drawing.Size(230, 258) ' 'DgvMainContextMenuItemHost ' @@ -841,6 +841,12 @@ Partial Class Main Me.RDPToolStripMenuItem.Size = New System.Drawing.Size(229, 22) Me.RDPToolStripMenuItem.Text = "RDP Vollbild" ' + 'RDPFensterToolStripMenuItem + ' + Me.RDPFensterToolStripMenuItem.Name = "RDPFensterToolStripMenuItem" + Me.RDPFensterToolStripMenuItem.Size = New System.Drawing.Size(229, 22) + Me.RDPFensterToolStripMenuItem.Text = "RDP Fenster" + ' 'ToolStripSeparator3 ' Me.ToolStripSeparator3.Name = "ToolStripSeparator3" @@ -991,12 +997,6 @@ Partial Class Main 'Timer1 ' ' - 'RDPFensterToolStripMenuItem - ' - Me.RDPFensterToolStripMenuItem.Name = "RDPFensterToolStripMenuItem" - Me.RDPFensterToolStripMenuItem.Size = New System.Drawing.Size(229, 22) - Me.RDPFensterToolStripMenuItem.Text = "RDP Fenster" - ' 'Main ' Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!) diff --git a/Dokumentation/Main.resx b/Dokumentation/Main.resx index 8216b95..9b7268b 100644 --- a/Dokumentation/Main.resx +++ b/Dokumentation/Main.resx @@ -304,9 +304,6 @@ 1067, 17 - - 48 - AAABAAEAgIAAAAAAGAAoyAAAFgAAACgAAACAAAAAAAEAAAEAGAAAAAAAAMAAAAAAAAAAAAAAAAAAAAAA diff --git a/Dokumentation/Main.vb b/Dokumentation/Main.vb index 00c6afc..eb05d4b 100644 --- a/Dokumentation/Main.vb +++ b/Dokumentation/Main.vb @@ -3,6 +3,7 @@ Imports System.IO Imports System.Threading Imports System.ServiceProcess Imports System.DirectoryServices.AccountManagement +Imports System.Web.UI.WebControls Public Class Main Public con As New SqlConnection @@ -653,18 +654,8 @@ Public Class Main DeleteGastWLANUser("ABABAB") End Sub Private Sub btnTest3_Click(sender As Object, e As EventArgs) Handles btnTest3.Click - Dim i As Integer = 0 - Dim c As String - ' For meh As Integer = 0 To 1 - Dim a, b As String - a = UsernamePasswordGenerator("u") - b = UsernamePasswordGenerator("p") - c &= a & " - " & b & vbCrLf - AddGastWLANUser(a, b) - 'Next - - WriteToFile(Application.StartupPath & "\WLAN.txt", c) - 'MsgBox(a & vbCrLf & b) + Dim pascom As New cPascom + pascom.Weiterleitung("555", "199") End Sub Public Function UsernamePasswordGenerator(x As String, Optional ByVal Zeichenanzahl As Integer = 6) As String ' wenn u dann Username, sonst Password @@ -1510,9 +1501,18 @@ exit" End Sub Private Sub Button1_Click_1(sender As Object, e As EventArgs) Handles Button1.Click - Dim DS As New VERAG_PROG_ALLGEMEIN.cDATENSERVER("DOKUMENTE", "VORLAGEN", "SONSTIGE", "", "", "Telefonliste") - 'MsgBox(DS.da_id) - DS.OPEN_SINGLE() + Dim frm As New frmLeer + frm.Text = "Notruf" + Dim usrcntrl As New uscntr_Notruf + + + usrcntrl.Dock = DockStyle.Fill : frm.PanMain.Controls.Add(usrcntrl) + frm.Size = usrcntrl.Size + frm.Show() + + AddHandler frm.FormClosing, Function() + + End Function End Sub Public Sub PictureBox1_Click_1(sender As Object, e As EventArgs) Handles PictureBox1.Click @@ -1714,7 +1714,7 @@ exit" RestartServices(Host2Connect.FQDN, "Druckerwarteschlange") End If Else - MsgBox("Hostname wurde nicht gefunden.") + MsgBox("Hostname wurde nicht gefunden.") End If End Sub diff --git a/Dokumentation/My Project/Resources.Designer.vb b/Dokumentation/My Project/Resources.Designer.vb index 400572e..413f0c3 100644 --- a/Dokumentation/My Project/Resources.Designer.vb +++ b/Dokumentation/My Project/Resources.Designer.vb @@ -289,7 +289,7 @@ Namespace My.Resources End Property ''' - ''' Sucht eine lokalisierte Zeichenfolge, die 0.0.1.83 ähnelt. + ''' Sucht eine lokalisierte Zeichenfolge, die 0.0.1.84 ähnelt. ''' Friend ReadOnly Property Version() As String Get diff --git a/Dokumentation/My Project/Resources.resx b/Dokumentation/My Project/Resources.resx index f22d26b..97970c1 100644 --- a/Dokumentation/My Project/Resources.resx +++ b/Dokumentation/My Project/Resources.resx @@ -155,7 +155,7 @@ ..\Resources\Admin.PNG;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - 0.0.1.83 + 0.0.1.84 ..\Resources\Link.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a diff --git a/Dokumentation/My Project/Settings.Designer.vb b/Dokumentation/My Project/Settings.Designer.vb index c2b9940..57ea2c6 100644 --- a/Dokumentation/My Project/Settings.Designer.vb +++ b/Dokumentation/My Project/Settings.Designer.vb @@ -15,7 +15,7 @@ Option Explicit On Namespace My _ Partial Friend NotInheritable Class MySettings Inherits Global.System.Configuration.ApplicationSettingsBase @@ -53,6 +53,17 @@ Namespace My Return defaultInstance End Get End Property + + _ + Public ReadOnly Property DokuConnectionString() As String + Get + Return CType(Me("DokuConnectionString"),String) + End Get + End Property End Class End Namespace diff --git a/Dokumentation/My Project/Settings.settings b/Dokumentation/My Project/Settings.settings index 85b890b..e024fd6 100644 --- a/Dokumentation/My Project/Settings.settings +++ b/Dokumentation/My Project/Settings.settings @@ -1,7 +1,14 @@  - - - - - - + + + + + <?xml version="1.0" encoding="utf-16"?> +<SerializableConnectionString xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> + <ConnectionString>Data Source=sqlguide01.verag.ost.dmn;Initial Catalog=Doku;Integrated Security=True</ConnectionString> + <ProviderName>System.Data.SqlClient</ProviderName> +</SerializableConnectionString> + Data Source=sqlguide01.verag.ost.dmn;Initial Catalog=Doku;Integrated Security=True + + + \ No newline at end of file diff --git a/Dokumentation/frmHostBearbeiten.Designer.vb b/Dokumentation/frmHostBearbeiten.Designer.vb index eb9ca49..4ffdaa1 100644 --- a/Dokumentation/frmHostBearbeiten.Designer.vb +++ b/Dokumentation/frmHostBearbeiten.Designer.vb @@ -60,6 +60,7 @@ Partial Class frmHostBearbeiten Me.TxtLink = New System.Windows.Forms.TextBox() Me.ContextMenuStrip1 = New System.Windows.Forms.ContextMenuStrip(Me.components) Me.MitHTTPFüllenToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem() + Me.MitHTTPSFuellen = New System.Windows.Forms.ToolStripMenuItem() Me.KopierenToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem() Me.FFPortToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem() Me.CmdIPUp = New System.Windows.Forms.Button() @@ -91,7 +92,6 @@ Partial Class frmHostBearbeiten Me.PanFirewall = New System.Windows.Forms.Panel() Me.PanSlaves = New System.Windows.Forms.Panel() Me.PanNavTop = New System.Windows.Forms.Panel() - Me.MitHTTPSFuellen = New System.Windows.Forms.ToolStripMenuItem() Me.ContextMenuStrip2.SuspendLayout() Me.ContextMenuStrip1.SuspendLayout() Me.Panel1.SuspendLayout() @@ -423,24 +423,30 @@ Partial Class frmHostBearbeiten ' Me.ContextMenuStrip1.Items.AddRange(New System.Windows.Forms.ToolStripItem() {Me.MitHTTPFüllenToolStripMenuItem, Me.MitHTTPSFuellen, Me.KopierenToolStripMenuItem, Me.FFPortToolStripMenuItem}) Me.ContextMenuStrip1.Name = "ContextMenuStrip1" - Me.ContextMenuStrip1.Size = New System.Drawing.Size(181, 114) + Me.ContextMenuStrip1.Size = New System.Drawing.Size(163, 92) ' 'MitHTTPFüllenToolStripMenuItem ' Me.MitHTTPFüllenToolStripMenuItem.Name = "MitHTTPFüllenToolStripMenuItem" - Me.MitHTTPFüllenToolStripMenuItem.Size = New System.Drawing.Size(180, 22) + Me.MitHTTPFüllenToolStripMenuItem.Size = New System.Drawing.Size(162, 22) Me.MitHTTPFüllenToolStripMenuItem.Text = "mit HTTP füllen" ' + 'MitHTTPSFuellen + ' + Me.MitHTTPSFuellen.Name = "MitHTTPSFuellen" + Me.MitHTTPSFuellen.Size = New System.Drawing.Size(162, 22) + Me.MitHTTPSFuellen.Text = "Mit HTTPS füllen" + ' 'KopierenToolStripMenuItem ' Me.KopierenToolStripMenuItem.Name = "KopierenToolStripMenuItem" - Me.KopierenToolStripMenuItem.Size = New System.Drawing.Size(180, 22) + Me.KopierenToolStripMenuItem.Size = New System.Drawing.Size(162, 22) Me.KopierenToolStripMenuItem.Text = "Kopieren" ' 'FFPortToolStripMenuItem ' Me.FFPortToolStripMenuItem.Name = "FFPortToolStripMenuItem" - Me.FFPortToolStripMenuItem.Size = New System.Drawing.Size(180, 22) + Me.FFPortToolStripMenuItem.Size = New System.Drawing.Size(162, 22) Me.FFPortToolStripMenuItem.Text = "FF Port" Me.FFPortToolStripMenuItem.Visible = False ' @@ -792,12 +798,6 @@ Partial Class frmHostBearbeiten Me.PanNavTop.Size = New System.Drawing.Size(309, 32) Me.PanNavTop.TabIndex = 141 ' - 'MitHTTPSFuellen - ' - Me.MitHTTPSFuellen.Name = "MitHTTPSFuellen" - Me.MitHTTPSFuellen.Size = New System.Drawing.Size(180, 22) - Me.MitHTTPSFuellen.Text = "Mit HTTPS füllen" - ' 'frmHostBearbeiten ' Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!) diff --git a/Dokumentation/frmHostBearbeiten.vb b/Dokumentation/frmHostBearbeiten.vb index e3e73e4..440cbed 100644 --- a/Dokumentation/frmHostBearbeiten.vb +++ b/Dokumentation/frmHostBearbeiten.vb @@ -403,4 +403,6 @@ Private Sub MitHTTPSFuellen_Click(sender As Object, e As EventArgs) Handles MitHTTPSFuellen.Click TxtLink.Text = "https://" & TxtIP.Text & "/" End Sub + + End Class \ No newline at end of file diff --git a/Dokumentation/uscntr_Notruf.Designer.vb b/Dokumentation/uscntr_Notruf.Designer.vb new file mode 100644 index 0000000..078569a --- /dev/null +++ b/Dokumentation/uscntr_Notruf.Designer.vb @@ -0,0 +1,187 @@ + _ +Partial Class uscntr_Notruf + Inherits System.Windows.Forms.UserControl + + 'UserControl überschreibt den Löschvorgang, um die Komponentenliste zu bereinigen. + _ + 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. + _ + Private Sub InitializeComponent() + Me.components = New System.ComponentModel.Container() + Me.FlatButton1 = New VERAG_PROG_ALLGEMEIN.FlatButton() + Me.Label2 = New System.Windows.Forms.Label() + Me.DokuDataSet = New Dokumentation.DokuDataSet() + Me.TbLNotfallKontakteBindingSource = New System.Windows.Forms.BindingSource(Me.components) + Me.TbL_NotfallKontakteTableAdapter = New Dokumentation.DokuDataSetTableAdapters.TbL_NotfallKontakteTableAdapter() + Me.TbLNotfallKontakteBindingSource1 = New System.Windows.Forms.BindingSource(Me.components) + Me.ComboBox1 = New System.Windows.Forms.ComboBox() + Me.Label3 = New System.Windows.Forms.Label() + Me.FlatButton2 = New VERAG_PROG_ALLGEMEIN.FlatButton() + Me.FlatButton3 = New VERAG_PROG_ALLGEMEIN.FlatButton() + Me.Label1 = New System.Windows.Forms.Label() + Me.Label4 = New System.Windows.Forms.Label() + CType(Me.DokuDataSet, System.ComponentModel.ISupportInitialize).BeginInit() + CType(Me.TbLNotfallKontakteBindingSource, System.ComponentModel.ISupportInitialize).BeginInit() + CType(Me.TbLNotfallKontakteBindingSource1, System.ComponentModel.ISupportInitialize).BeginInit() + Me.SuspendLayout() + ' + 'FlatButton1 + ' + Me.FlatButton1.allowBorder = False + Me.FlatButton1.BackColor = System.Drawing.SystemColors.AppWorkspace + Me.FlatButton1.FlatAppearance.BorderSize = 0 + Me.FlatButton1.FlatStyle = System.Windows.Forms.FlatStyle.Flat + Me.FlatButton1.ForeColor = System.Drawing.Color.Black + Me.FlatButton1.Location = New System.Drawing.Point(172, 57) + Me.FlatButton1.Name = "FlatButton1" + Me.FlatButton1.Size = New System.Drawing.Size(127, 23) + Me.FlatButton1.TabIndex = 9 + Me.FlatButton1.Text = "Weiterleitung setzen" + Me.FlatButton1.UseVisualStyleBackColor = False + ' + 'Label2 + ' + Me.Label2.AutoSize = True + Me.Label2.Location = New System.Drawing.Point(77, 25) + Me.Label2.Name = "Label2" + Me.Label2.Size = New System.Drawing.Size(89, 13) + Me.Label2.TabIndex = 8 + Me.Label2.Text = "Eingestelltes Ziel:" + ' + 'DokuDataSet + ' + Me.DokuDataSet.DataSetName = "DokuDataSet" + Me.DokuDataSet.SchemaSerializationMode = System.Data.SchemaSerializationMode.IncludeSchema + ' + 'TbLNotfallKontakteBindingSource + ' + Me.TbLNotfallKontakteBindingSource.DataMember = "TbL_NotfallKontakte" + Me.TbLNotfallKontakteBindingSource.DataSource = Me.DokuDataSet + ' + 'TbL_NotfallKontakteTableAdapter + ' + Me.TbL_NotfallKontakteTableAdapter.ClearBeforeFill = True + ' + 'TbLNotfallKontakteBindingSource1 + ' + Me.TbLNotfallKontakteBindingSource1.DataMember = "TbL_NotfallKontakte" + Me.TbLNotfallKontakteBindingSource1.DataSource = Me.DokuDataSet + ' + 'ComboBox1 + ' + Me.ComboBox1.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.Suggest + Me.ComboBox1.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.CustomSource + Me.ComboBox1.FormattingEnabled = True + Me.ComboBox1.Location = New System.Drawing.Point(35, 58) + Me.ComboBox1.Name = "ComboBox1" + Me.ComboBox1.Size = New System.Drawing.Size(121, 21) + Me.ComboBox1.TabIndex = 10 + ' + 'Label3 + ' + Me.Label3.AutoSize = True + Me.Label3.Location = New System.Drawing.Point(172, 25) + Me.Label3.Name = "Label3" + Me.Label3.Size = New System.Drawing.Size(39, 13) + Me.Label3.TabIndex = 11 + Me.Label3.Text = "Label3" + ' + 'FlatButton2 + ' + Me.FlatButton2.allowBorder = False + Me.FlatButton2.BackColor = System.Drawing.SystemColors.AppWorkspace + Me.FlatButton2.FlatAppearance.BorderSize = 0 + Me.FlatButton2.FlatStyle = System.Windows.Forms.FlatStyle.Flat + Me.FlatButton2.ForeColor = System.Drawing.Color.Black + Me.FlatButton2.Location = New System.Drawing.Point(172, 95) + Me.FlatButton2.Name = "FlatButton2" + Me.FlatButton2.Size = New System.Drawing.Size(127, 23) + Me.FlatButton2.TabIndex = 12 + Me.FlatButton2.Text = "Weiterleitung starten" + Me.FlatButton2.UseVisualStyleBackColor = False + ' + 'FlatButton3 + ' + Me.FlatButton3.allowBorder = False + Me.FlatButton3.BackColor = System.Drawing.SystemColors.AppWorkspace + Me.FlatButton3.FlatAppearance.BorderSize = 0 + Me.FlatButton3.FlatStyle = System.Windows.Forms.FlatStyle.Flat + Me.FlatButton3.ForeColor = System.Drawing.Color.Black + Me.FlatButton3.Location = New System.Drawing.Point(172, 124) + Me.FlatButton3.Name = "FlatButton3" + Me.FlatButton3.Size = New System.Drawing.Size(127, 23) + Me.FlatButton3.TabIndex = 13 + Me.FlatButton3.Text = "Weiterleitung beenden" + Me.FlatButton3.UseVisualStyleBackColor = False + ' + 'Label1 + ' + Me.Label1.AutoSize = True + Me.Label1.Location = New System.Drawing.Point(172, 0) + Me.Label1.Name = "Label1" + Me.Label1.Size = New System.Drawing.Size(39, 13) + Me.Label1.TabIndex = 15 + Me.Label1.Text = "Label1" + ' + 'Label4 + ' + Me.Label4.AutoSize = True + Me.Label4.Location = New System.Drawing.Point(93, 0) + Me.Label4.Name = "Label4" + Me.Label4.Size = New System.Drawing.Size(73, 13) + Me.Label4.TabIndex = 14 + Me.Label4.Text = "Akutelles Ziel:" + ' + 'uscntr_Notruf + ' + Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!) + Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font + Me.AutoSize = True + Me.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink + Me.Controls.Add(Me.Label1) + Me.Controls.Add(Me.Label4) + Me.Controls.Add(Me.FlatButton3) + Me.Controls.Add(Me.FlatButton2) + Me.Controls.Add(Me.Label3) + Me.Controls.Add(Me.ComboBox1) + Me.Controls.Add(Me.FlatButton1) + Me.Controls.Add(Me.Label2) + Me.MinimumSize = New System.Drawing.Size(320, 162) + Me.Name = "uscntr_Notruf" + Me.Size = New System.Drawing.Size(320, 162) + CType(Me.DokuDataSet, System.ComponentModel.ISupportInitialize).EndInit() + CType(Me.TbLNotfallKontakteBindingSource, System.ComponentModel.ISupportInitialize).EndInit() + CType(Me.TbLNotfallKontakteBindingSource1, System.ComponentModel.ISupportInitialize).EndInit() + Me.ResumeLayout(False) + Me.PerformLayout() + + End Sub + + Friend WithEvents FlatButton1 As VERAG_PROG_ALLGEMEIN.FlatButton + Friend WithEvents Label2 As Label + Friend WithEvents TbLNotfallKontakteBindingSource As BindingSource + Friend WithEvents DokuDataSet As DokuDataSet + Friend WithEvents TbL_NotfallKontakteTableAdapter As DokuDataSetTableAdapters.TbL_NotfallKontakteTableAdapter + Friend WithEvents TbLNotfallKontakteBindingSource1 As BindingSource + Friend WithEvents ComboBox1 As ComboBox + Friend WithEvents Label3 As Label + Friend WithEvents FlatButton2 As VERAG_PROG_ALLGEMEIN.FlatButton + Friend WithEvents FlatButton3 As VERAG_PROG_ALLGEMEIN.FlatButton + Friend WithEvents Label1 As Label + Friend WithEvents Label4 As Label +End Class diff --git a/Dokumentation/uscntr_Notruf.resx b/Dokumentation/uscntr_Notruf.resx new file mode 100644 index 0000000..3540632 --- /dev/null +++ b/Dokumentation/uscntr_Notruf.resx @@ -0,0 +1,132 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + 17, 17 + + + 140, 17 + + + 375, 17 + + + 610, 17 + + \ No newline at end of file diff --git a/Dokumentation/uscntr_Notruf.vb b/Dokumentation/uscntr_Notruf.vb new file mode 100644 index 0000000..3fa6afb --- /dev/null +++ b/Dokumentation/uscntr_Notruf.vb @@ -0,0 +1,55 @@ +Public Class uscntr_Notruf + + Dim ds As New DataSet + Dim WeiterleitungsZiel As String = "" + Dim aktuellesWeiterleitungsziel As String = "" + + Private Sub uscntr_Notruf_Load(sender As Object, e As EventArgs) Handles MyBase.Load + refreshDisplay() : refreshds() + Class1.AutocompleteCombo(ComboBox1, "Name", "TbL_NotfallKontakte") + + End Sub + + Function refreshds() + cSQL.SQL2DS("select name, Telefonnummer,notruf from TbL_NotfallKontakte", ds) + End Function + + Function refreshDisplay() + Dim tmp As New DataSet + cSQL.SQL2DS("select name, Telefonnummer from TbL_NotfallKontakte where Notruf = 1", tmp) + If tmp.Tables(0).Rows.Count > 0 Then + Label3.Text = tmp.Tables(0).Rows(0).Item(0).ToString + WeiterleitungsZiel = tmp.Tables(0).Rows(0).Item(1).ToString + End If + Dim pascom As New cPascom + aktuellesWeiterleitungsziel = pascom.getredirect("555") + Label1.Text = aktuellesWeiterleitungsziel + End Function + + Private Sub FlatButton1_Click(sender As Object, e As EventArgs) Handles FlatButton1.Click + cSQL.UpdateSQL("TbL_NotfallKontakte", "Notruf = 0", "Notruf = 1") + cSQL.UpdateSQL("TbL_NotfallKontakte", "Notruf = 1", "name = " & "'" & ComboBox1.SelectedValue & "'") + refreshDisplay() + refreshds() + + + End Sub + + Private Sub FlatButton2_Click(sender As Object, e As EventArgs) Handles FlatButton2.Click + Dim pascom As New cPascom + pascom.Weiterleitung("555", WeiterleitungsZiel, aktuellesWeiterleitungsziel) + refreshDisplay() + + End Sub + + Private Sub FlatButton3_Click(sender As Object, e As EventArgs) Handles FlatButton3.Click + Dim pascom As New cPascom + pascom.Weiterleitung("555", "199", aktuellesWeiterleitungsziel) + refreshDisplay() + End Sub + + Private Sub Label1_Click(sender As Object, e As EventArgs) Handles Label1.Click + refreshDisplay() + + End Sub +End Class