Initial commit
This commit is contained in:
@@ -0,0 +1,94 @@
|
||||
<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _
|
||||
Partial Class frmAbout
|
||||
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()
|
||||
Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(frmAbout))
|
||||
Me.PictureBox1 = New System.Windows.Forms.PictureBox
|
||||
Me.btnOK = New System.Windows.Forms.Button
|
||||
Me.lblversiondatum = New System.Windows.Forms.Label
|
||||
Me.lblVersion = New System.Windows.Forms.Label
|
||||
CType(Me.PictureBox1, System.ComponentModel.ISupportInitialize).BeginInit()
|
||||
Me.SuspendLayout()
|
||||
'
|
||||
'PictureBox1
|
||||
'
|
||||
Me.PictureBox1.ErrorImage = CType(resources.GetObject("PictureBox1.ErrorImage"), System.Drawing.Image)
|
||||
Me.PictureBox1.Image = CType(resources.GetObject("PictureBox1.Image"), System.Drawing.Image)
|
||||
Me.PictureBox1.Location = New System.Drawing.Point(0, 0)
|
||||
Me.PictureBox1.Name = "PictureBox1"
|
||||
Me.PictureBox1.Size = New System.Drawing.Size(469, 330)
|
||||
Me.PictureBox1.TabIndex = 1
|
||||
Me.PictureBox1.TabStop = False
|
||||
'
|
||||
'btnOK
|
||||
'
|
||||
Me.btnOK.Location = New System.Drawing.Point(201, 339)
|
||||
Me.btnOK.Name = "btnOK"
|
||||
Me.btnOK.Size = New System.Drawing.Size(75, 23)
|
||||
Me.btnOK.TabIndex = 2
|
||||
Me.btnOK.Text = "OK"
|
||||
Me.btnOK.UseVisualStyleBackColor = True
|
||||
'
|
||||
'lblversiondatum
|
||||
'
|
||||
Me.lblversiondatum.BackColor = System.Drawing.Color.White
|
||||
Me.lblversiondatum.Font = New System.Drawing.Font("Microsoft Sans Serif", 11.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
|
||||
Me.lblversiondatum.Location = New System.Drawing.Point(249, 273)
|
||||
Me.lblversiondatum.Name = "lblversiondatum"
|
||||
Me.lblversiondatum.Size = New System.Drawing.Size(193, 24)
|
||||
Me.lblversiondatum.TabIndex = 4
|
||||
Me.lblversiondatum.Text = "Version "
|
||||
Me.lblversiondatum.TextAlign = System.Drawing.ContentAlignment.MiddleCenter
|
||||
'
|
||||
'lblVersion
|
||||
'
|
||||
Me.lblVersion.BackColor = System.Drawing.Color.White
|
||||
Me.lblVersion.Font = New System.Drawing.Font("Microsoft Sans Serif", 14.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
|
||||
Me.lblVersion.Location = New System.Drawing.Point(245, 249)
|
||||
Me.lblVersion.Name = "lblVersion"
|
||||
Me.lblVersion.Size = New System.Drawing.Size(197, 24)
|
||||
Me.lblVersion.TabIndex = 3
|
||||
Me.lblVersion.Text = "Version "
|
||||
Me.lblVersion.TextAlign = System.Drawing.ContentAlignment.MiddleCenter
|
||||
'
|
||||
'frmAbout
|
||||
'
|
||||
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
|
||||
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
|
||||
Me.ClientSize = New System.Drawing.Size(464, 374)
|
||||
Me.Controls.Add(Me.lblversiondatum)
|
||||
Me.Controls.Add(Me.lblVersion)
|
||||
Me.Controls.Add(Me.btnOK)
|
||||
Me.Controls.Add(Me.PictureBox1)
|
||||
Me.Icon = CType(resources.GetObject("$this.Icon"), System.Drawing.Icon)
|
||||
Me.Name = "frmAbout"
|
||||
Me.Text = "frmAbout"
|
||||
CType(Me.PictureBox1, System.ComponentModel.ISupportInitialize).EndInit()
|
||||
Me.ResumeLayout(False)
|
||||
|
||||
End Sub
|
||||
Friend WithEvents PictureBox1 As System.Windows.Forms.PictureBox
|
||||
Friend WithEvents btnOK As System.Windows.Forms.Button
|
||||
Friend WithEvents lblversiondatum As System.Windows.Forms.Label
|
||||
Friend WithEvents lblVersion As System.Windows.Forms.Label
|
||||
End Class
|
||||
@@ -0,0 +1,130 @@
|
||||
Imports System.IO
|
||||
Imports System.Data
|
||||
Imports System.Data.SqlTypes
|
||||
Imports System.Data.SqlClient
|
||||
''' <summary>
|
||||
''' Form mit generalisiertem Domain-Table-Editor.
|
||||
''' </summary>
|
||||
''' <remarks>
|
||||
''' <img src="SampleDomainEditor.png"/>
|
||||
''' </remarks>
|
||||
''' <seealso
|
||||
''' cref="Vertragsverwaltung.TKB.VV.Sysadmin.DomainTable">Vertragsverwaltung.TKB.VV.Sysadmin.DomainTable</seealso>
|
||||
Public Class frmDomainEditorExtTables
|
||||
|
||||
#Region "Deklarationen"
|
||||
Dim ds As New DataSet
|
||||
Dim da As SqlDataAdapter
|
||||
Dim co As New SqlConnection
|
||||
Dim cb As SqlCommandBuilder
|
||||
Dim tablename As String
|
||||
Dim SpaltenTitel As New Utils.Tabellenspalte
|
||||
#End Region
|
||||
|
||||
#Region "Formular-Funktionen"
|
||||
''' <summary>
|
||||
''' Tabellenname übernehmen und Objekt DomainTable initialisieren
|
||||
''' Initialisierung der Komponenten
|
||||
''' </summary>
|
||||
''' <param name="tblname">Tabellenname der Tabelle, welche über den Domaineditor editiert werden soll</param>
|
||||
''' <remarks>Benötigt werden entsprechende Stored_Procedures, welche mit LBLLGEN_2 generiert wurden
|
||||
''' pr_"Tablename"_SelectAll
|
||||
''' pr_"Tablename"_Update
|
||||
''' </remarks>
|
||||
Public Sub New(ByVal tblname As String, ByVal Connectionstring As String)
|
||||
' Domaintable = New TKB.VV.Sysadmin.DomainTable(tblname)
|
||||
Me.InitializeComponent()
|
||||
' Me.Text = "Domaineditor: " & tblname
|
||||
Me.tablename = tblname
|
||||
Me.co.ConnectionString = Connectionstring
|
||||
End Sub
|
||||
''' <summary>
|
||||
''' Zuordnung der Daten aus Domaintable und Spaltentitel des Grids setzen
|
||||
''' </summary>
|
||||
''' <param name="sender"></param>
|
||||
''' <param name="e"></param>
|
||||
''' <remarks></remarks>
|
||||
Private Sub frmDomainEditor_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
|
||||
Try
|
||||
da = New SqlDataAdapter("Select * from " & Me.tablename, Me.co)
|
||||
cb = New SqlCommandBuilder(da)
|
||||
da.Fill(ds, "ExtTable")
|
||||
Me.C1Daten.DataSource = ds.Tables(0)
|
||||
Me.C1Daten.DataMember = ds.Tables(0).TableName
|
||||
Catch ex As Exception
|
||||
MsgBox(ex.Message)
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
|
||||
''' <summary>
|
||||
''' Schliessen des Formulars
|
||||
''' </summary>
|
||||
''' <param name="sender"></param>
|
||||
''' <param name="e"></param>
|
||||
''' <remarks></remarks>
|
||||
Private Sub BeendenToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BeendenToolStripMenuItem.Click
|
||||
Me.Close()
|
||||
End Sub
|
||||
''' <summary>
|
||||
''' Ruft BeendetnToolStipMenuItem_Click auf
|
||||
''' </summary>
|
||||
''' <param name="sender"></param>
|
||||
''' <param name="e"></param>
|
||||
''' <remarks></remarks>
|
||||
Private Sub TSBtnQuit_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TSBtnQuit.Click
|
||||
BeendenToolStripMenuItem_Click(sender, e)
|
||||
End Sub
|
||||
''' <summary>
|
||||
''' Prüfung auf allfällige Daten-Changes. Wurden Daten verändert, kann der User entscheiden, ob gespeichert, nichtgespeichert oder
|
||||
''' das Formular nicht gespeichert werden soll.
|
||||
''' </summary>
|
||||
''' <param name="sender"></param>
|
||||
''' <param name="e"></param>
|
||||
''' <remarks></remarks>
|
||||
Private Sub frmDomainEditor_FormClosing(ByVal sender As Object, ByVal e As System.Windows.Forms.FormClosingEventArgs) Handles Me.FormClosing
|
||||
If Me.ds.HasChanges Then
|
||||
Dim msg As New Utils.MyMessage
|
||||
Dim msgboxres As MsgBoxResult
|
||||
msgboxres = msg.Show_MessageYesNoCancel(3)
|
||||
If msgboxres = MsgBoxResult.Cancel Then
|
||||
e.Cancel = True
|
||||
Exit Sub
|
||||
End If
|
||||
If msgboxres = MsgBoxResult.Yes Then
|
||||
Try
|
||||
da.Update(ds, "ExtTable")
|
||||
|
||||
Catch ex As Exception
|
||||
MsgBox(ex.Message)
|
||||
End Try
|
||||
|
||||
End If
|
||||
End If
|
||||
Try
|
||||
Me.co.Close()
|
||||
da.Dispose()
|
||||
co.Dispose()
|
||||
cb.Dispose()
|
||||
ds.Dispose()
|
||||
Catch ex As Exception
|
||||
MsgBox(ex.Message)
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
''' <summary>
|
||||
''' Sichern der Daten
|
||||
''' </summary>
|
||||
''' <param name="sender"></param>
|
||||
''' <param name="e"></param>
|
||||
''' <remarks></remarks>
|
||||
Private Sub TSBtnSave_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TSBtnSave.Click
|
||||
Try
|
||||
da.Update(ds, "ExtTable")
|
||||
Catch ex As Exception
|
||||
MsgBox(ex.Message)
|
||||
End Try
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
End Class
|
||||
Reference in New Issue
Block a user