This commit is contained in:
2022-12-25 10:09:49 +01:00
commit 406d053e79
3903 changed files with 2127541 additions and 0 deletions

View File

@@ -0,0 +1,138 @@
<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _
Partial Class frmAllgDomainEditor
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(frmAllgDomainEditor))
Me.MenuStrip1 = New System.Windows.Forms.MenuStrip
Me.DateiToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem
Me.BeendenToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem
Me.ToolStrip1 = New System.Windows.Forms.ToolStrip
Me.TSBtnQuit = New System.Windows.Forms.ToolStripButton
Me.TSBtnSave = New System.Windows.Forms.ToolStripButton
Me.c1Daten = New C1.Win.C1TrueDBGrid.C1TrueDBGrid
Me.MenuStrip1.SuspendLayout()
Me.ToolStrip1.SuspendLayout()
CType(Me.c1Daten, System.ComponentModel.ISupportInitialize).BeginInit()
Me.SuspendLayout()
'
'MenuStrip1
'
Me.MenuStrip1.Items.AddRange(New System.Windows.Forms.ToolStripItem() {Me.DateiToolStripMenuItem})
Me.MenuStrip1.Location = New System.Drawing.Point(0, 0)
Me.MenuStrip1.Name = "MenuStrip1"
Me.MenuStrip1.Size = New System.Drawing.Size(786, 24)
Me.MenuStrip1.TabIndex = 1
Me.MenuStrip1.Text = "MenuStrip1"
'
'DateiToolStripMenuItem
'
Me.DateiToolStripMenuItem.DropDownItems.AddRange(New System.Windows.Forms.ToolStripItem() {Me.BeendenToolStripMenuItem})
Me.DateiToolStripMenuItem.Name = "DateiToolStripMenuItem"
Me.DateiToolStripMenuItem.Size = New System.Drawing.Size(46, 20)
Me.DateiToolStripMenuItem.Text = "&Datei"
'
'BeendenToolStripMenuItem
'
Me.BeendenToolStripMenuItem.Name = "BeendenToolStripMenuItem"
Me.BeendenToolStripMenuItem.Size = New System.Drawing.Size(120, 22)
Me.BeendenToolStripMenuItem.Text = "&Beenden"
'
'ToolStrip1
'
Me.ToolStrip1.Items.AddRange(New System.Windows.Forms.ToolStripItem() {Me.TSBtnQuit, Me.TSBtnSave})
Me.ToolStrip1.Location = New System.Drawing.Point(0, 24)
Me.ToolStrip1.Name = "ToolStrip1"
Me.ToolStrip1.Size = New System.Drawing.Size(786, 25)
Me.ToolStrip1.TabIndex = 2
Me.ToolStrip1.Text = "ToolStrip1"
'
'TSBtnQuit
'
Me.TSBtnQuit.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image
Me.TSBtnQuit.Image = CType(resources.GetObject("TSBtnQuit.Image"), System.Drawing.Image)
Me.TSBtnQuit.ImageTransparentColor = System.Drawing.Color.Magenta
Me.TSBtnQuit.Name = "TSBtnQuit"
Me.TSBtnQuit.Size = New System.Drawing.Size(23, 22)
Me.TSBtnQuit.Text = "ToolStripButton1"
Me.TSBtnQuit.ToolTipText = "Fenster schliessen"
'
'TSBtnSave
'
Me.TSBtnSave.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image
Me.TSBtnSave.Image = CType(resources.GetObject("TSBtnSave.Image"), System.Drawing.Image)
Me.TSBtnSave.ImageTransparentColor = System.Drawing.Color.Magenta
Me.TSBtnSave.Name = "TSBtnSave"
Me.TSBtnSave.Size = New System.Drawing.Size(23, 22)
Me.TSBtnSave.Text = "ToolStripButton1"
Me.TSBtnSave.ToolTipText = "Daten speichern"
'
'c1Daten
'
Me.c1Daten.AllowAddNew = True
Me.c1Daten.AlternatingRows = True
Me.c1Daten.BackColor = System.Drawing.Color.Gray
Me.c1Daten.CellTips = C1.Win.C1TrueDBGrid.CellTipEnum.Anchored
Me.c1Daten.Dock = System.Windows.Forms.DockStyle.Fill
Me.c1Daten.FilterBar = True
Me.c1Daten.GroupByCaption = "Drag a column header here to group by that column"
Me.c1Daten.Images.Add(CType(resources.GetObject("c1Daten.Images"), System.Drawing.Image))
Me.c1Daten.Location = New System.Drawing.Point(0, 49)
Me.c1Daten.MarqueeStyle = C1.Win.C1TrueDBGrid.MarqueeEnum.SolidCellBorder
Me.c1Daten.Name = "c1Daten"
Me.c1Daten.PreviewInfo.Location = New System.Drawing.Point(0, 0)
Me.c1Daten.PreviewInfo.Size = New System.Drawing.Size(0, 0)
Me.c1Daten.PreviewInfo.ZoomFactor = 75
Me.c1Daten.PrintInfo.PageSettings = CType(resources.GetObject("DomainList.PrintInfo.PageSettings"), System.Drawing.Printing.PageSettings)
Me.c1Daten.Size = New System.Drawing.Size(786, 329)
Me.c1Daten.TabAction = C1.Win.C1TrueDBGrid.TabActionEnum.ColumnNavigation
Me.c1Daten.TabIndex = 8
Me.c1Daten.Text = "C1TrueDBGrid1"
Me.c1Daten.PropBag = resources.GetString("c1Daten.PropBag")
'
'frmAllgDomainEditor
'
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
Me.ClientSize = New System.Drawing.Size(786, 378)
Me.Controls.Add(Me.c1Daten)
Me.Controls.Add(Me.ToolStrip1)
Me.Controls.Add(Me.MenuStrip1)
Me.Name = "frmAllgDomainEditor"
Me.Text = "frmAllgDomainEditor"
Me.MenuStrip1.ResumeLayout(False)
Me.MenuStrip1.PerformLayout()
Me.ToolStrip1.ResumeLayout(False)
Me.ToolStrip1.PerformLayout()
CType(Me.c1Daten, System.ComponentModel.ISupportInitialize).EndInit()
Me.ResumeLayout(False)
Me.PerformLayout()
End Sub
Friend WithEvents MenuStrip1 As System.Windows.Forms.MenuStrip
Friend WithEvents DateiToolStripMenuItem As System.Windows.Forms.ToolStripMenuItem
Friend WithEvents BeendenToolStripMenuItem As System.Windows.Forms.ToolStripMenuItem
Friend WithEvents ToolStrip1 As System.Windows.Forms.ToolStrip
Friend WithEvents TSBtnQuit As System.Windows.Forms.ToolStripButton
Friend WithEvents TSBtnSave As System.Windows.Forms.ToolStripButton
Friend WithEvents c1Daten As C1.Win.C1TrueDBGrid.C1TrueDBGrid
End Class

View File

@@ -0,0 +1,181 @@
<?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=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<metadata name="MenuStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
<metadata name="ToolStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>232, 17</value>
</metadata>
<assembly alias="System.Drawing" name="System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="TSBtnQuit.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAACkSURBVDhPlZOBDoAgCET9dD7NPyNPgpAIzY21oTzPg1rL
F4/0aaQEJqJXAIo8Vu9dL9gDYiGRgG6VCwBJLDvgbxRVsodvBPiEASDXF3mIB3AbBzPjBLDeHBVIcRbj
KScKuMGQElArmKZNSNJ7VYC2Ib48EIjE0gX1QPerLigkATytqxT4gQht3HsQx9H8+OpCeHL+R+FQnIPT
QiXaHPwtNMCu8ALckGXYKNsEDQAAAABJRU5ErkJggg==
</value>
</data>
<data name="TSBtnSave.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAABeSURBVDhPYzhw4MB/SjADSDMDAwNZGKwXZkBDA8QQQq6B
qYHT5BgAczHZLkB2LVleGMQGwJyGL1pBanB6ASZJDI01GolxAUgjXhfgcj4sgQ1SA8jNUPCkTCgD4ZMH
ADk0Kh+zxKF0AAAAAElFTkSuQmCC
</value>
</data>
<data name="c1Daten.Images" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAAAkAAAAJCAYAAADgkQYQAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAA3SURBVChTY2DABP+xiIGFkCVwsVEUwhThNREkiaEAJoiP
RnEmskKs7kd3C1YrYTrx+g6bIrAYAKCqHOQvFu6BAAAAAElFTkSuQmCC
</value>
</data>
<data name="DomainList.PrintInfo.PageSettings" mimetype="application/x-microsoft.net.object.binary.base64">
<value>
AAEAAAD/////AQAAAAAAAAAMAgAAAFFTeXN0ZW0uRHJhd2luZywgVmVyc2lvbj0yLjAuMC4wLCBDdWx0
dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWIwM2Y1ZjdmMTFkNTBhM2EFAQAAACRTeXN0ZW0uRHJh
d2luZy5QcmludGluZy5QYWdlU2V0dGluZ3MHAAAAD3ByaW50ZXJTZXR0aW5ncwVjb2xvcglwYXBlclNp
emULcGFwZXJTb3VyY2URcHJpbnRlclJlc29sdXRpb24JbGFuZHNjYXBlB21hcmdpbnMEBAQEBAQEJ1N5
c3RlbS5EcmF3aW5nLlByaW50aW5nLlByaW50ZXJTZXR0aW5ncwIAAAAgU3lzdGVtLkRyYXdpbmcuUHJp
bnRpbmcuVHJpU3RhdGUCAAAAIVN5c3RlbS5EcmF3aW5nLlByaW50aW5nLlBhcGVyU2l6ZQIAAAAjU3lz
dGVtLkRyYXdpbmcuUHJpbnRpbmcuUGFwZXJTb3VyY2UCAAAAKVN5c3RlbS5EcmF3aW5nLlByaW50aW5n
LlByaW50ZXJSZXNvbHV0aW9uAgAAACBTeXN0ZW0uRHJhd2luZy5QcmludGluZy5UcmlTdGF0ZQIAAAAf
U3lzdGVtLkRyYXdpbmcuUHJpbnRpbmcuTWFyZ2lucwIAAAACAAAACQMAAAAF/P///yBTeXN0ZW0uRHJh
d2luZy5QcmludGluZy5UcmlTdGF0ZQEAAAAFdmFsdWUAAgIAAAAACgoKAfv////8////AAkGAAAABQMA
AAAnU3lzdGVtLkRyYXdpbmcuUHJpbnRpbmcuUHJpbnRlclNldHRpbmdzEgAAAAtwcmludGVyTmFtZQpk
cml2ZXJOYW1lCm91dHB1dFBvcnQLcHJpbnRUb0ZpbGUUcHJpbnREaWFsb2dEaXNwbGF5ZWQKZXh0cmFi
eXRlcwlleHRyYWluZm8GY29waWVzBmR1cGxleAdjb2xsYXRlE2RlZmF1bHRQYWdlU2V0dGluZ3MIZnJv
bVBhZ2UGdG9QYWdlB21heFBhZ2UHbWluUGFnZQpwcmludFJhbmdlDGRldm1vZGVieXRlcw1jYWNoZWRE
ZXZtb2RlAQEBAAAABwAEBAQAAAAABAAHAQEHAgceU3lzdGVtLkRyYXdpbmcuUHJpbnRpbmcuRHVwbGV4
AgAAACBTeXN0ZW0uRHJhd2luZy5QcmludGluZy5UcmlTdGF0ZQIAAAAkU3lzdGVtLkRyYXdpbmcuUHJp
bnRpbmcuUGFnZVNldHRpbmdzAgAAAAgICAgiU3lzdGVtLkRyYXdpbmcuUHJpbnRpbmcuUHJpbnRSYW5n
ZQIAAAAHAgIAAAAKBgcAAAAACQcAAAAAAAAACv//Bfj///8eU3lzdGVtLkRyYXdpbmcuUHJpbnRpbmcu
RHVwbGV4AQAAAAd2YWx1ZV9fAAgCAAAA/////wH3/////P///wAJCgAAAAAAAAAAAAAADycAAAAAAAAF
9f///yJTeXN0ZW0uRHJhd2luZy5QcmludGluZy5QcmludFJhbmdlAQAAAAd2YWx1ZV9fAAgCAAAAAAAA
AAAACgUGAAAAH1N5c3RlbS5EcmF3aW5nLlByaW50aW5nLk1hcmdpbnMEAAAABGxlZnQFcmlnaHQDdG9w
BmJvdHRvbQAAAAAICAgIAgAAAGQAAABkAAAAZAAAAGQAAAABCgAAAAEAAAAJAwAAAAHz/////P///wAK
CgoB8v////z///8ACQ8AAAABDwAAAAYAAABkAAAAZAAAAGQAAABkAAAACw==
</value>
</data>
<data name="c1Daten.PropBag" xml:space="preserve">
<value>&lt;?xml version="1.0"?&gt;&lt;Blob&gt;&lt;Styles type="C1.Win.C1TrueDBGrid.Design.ContextWrapper"&gt;&lt;Data&gt;Style15{}Inactive{ForeColor:InactiveCaptionText;BackColor:InactiveCaption;}OddRow{BackColor:224, 224, 224;}Style5{}Style1{}RecordSelector{AlignImage:Center;}Style6{}Style8{}Footer{}Style3{}Style12{}HighlightRow{ForeColor:HighlightText;BackColor:Highlight;}Editor{}Style4{}FilterBar{Wrap:True;BackColor:255, 255, 192;}EvenRow{BackColor:White;}Style11{}Style13{}Caption{AlignHorz:Center;}Selected{ForeColor:HighlightText;BackColor:Highlight;}Style9{}Style2{}Style14{}Normal{}Style7{}Heading{Wrap:True;AlignVert:Center;Border:Raised,,1, 1, 1, 1;ForeColor:ControlText;BackColor:Control;}Style10{AlignHorz:Near;}Group{BackColor:ControlDark;Border:None,,0, 0, 0, 0;AlignVert:Center;}&lt;/Data&gt;&lt;/Styles&gt;&lt;Splits&gt;&lt;C1.Win.C1TrueDBGrid.MergeView Name="" AlternatingRowStyle="True" CaptionHeight="17" ColumnCaptionHeight="17" ColumnFooterHeight="17" FilterBar="True" MarqueeStyle="SolidCellBorder" RecordSelectorWidth="17" DefRecSelWidth="17" VerticalScrollGroup="1" HorizontalScrollGroup="1"&gt;&lt;Height&gt;327&lt;/Height&gt;&lt;CaptionStyle parent="Style2" me="Style10" /&gt;&lt;EditorStyle parent="Editor" me="Style5" /&gt;&lt;EvenRowStyle parent="EvenRow" me="Style8" /&gt;&lt;FilterBarStyle parent="FilterBar" me="Style13" /&gt;&lt;FooterStyle parent="Footer" me="Style3" /&gt;&lt;GroupStyle parent="Group" me="Style12" /&gt;&lt;HeadingStyle parent="Heading" me="Style2" /&gt;&lt;HighLightRowStyle parent="HighlightRow" me="Style7" /&gt;&lt;InactiveStyle parent="Inactive" me="Style4" /&gt;&lt;OddRowStyle parent="OddRow" me="Style9" /&gt;&lt;RecordSelectorStyle parent="RecordSelector" me="Style11" /&gt;&lt;SelectedStyle parent="Selected" me="Style6" /&gt;&lt;Style parent="Normal" me="Style1" /&gt;&lt;ClientRect&gt;0, 0, 784, 327&lt;/ClientRect&gt;&lt;BorderSide&gt;0&lt;/BorderSide&gt;&lt;/C1.Win.C1TrueDBGrid.MergeView&gt;&lt;/Splits&gt;&lt;NamedStyles&gt;&lt;Style parent="" me="Normal" /&gt;&lt;Style parent="Normal" me="Heading" /&gt;&lt;Style parent="Heading" me="Footer" /&gt;&lt;Style parent="Heading" me="Caption" /&gt;&lt;Style parent="Heading" me="Inactive" /&gt;&lt;Style parent="Normal" me="Selected" /&gt;&lt;Style parent="Normal" me="Editor" /&gt;&lt;Style parent="Normal" me="HighlightRow" /&gt;&lt;Style parent="Normal" me="EvenRow" /&gt;&lt;Style parent="Normal" me="OddRow" /&gt;&lt;Style parent="Heading" me="RecordSelector" /&gt;&lt;Style parent="Normal" me="FilterBar" /&gt;&lt;Style parent="Caption" me="Group" /&gt;&lt;/NamedStyles&gt;&lt;vertSplits&gt;1&lt;/vertSplits&gt;&lt;horzSplits&gt;1&lt;/horzSplits&gt;&lt;Layout&gt;Modified&lt;/Layout&gt;&lt;DefaultRecSelWidth&gt;17&lt;/DefaultRecSelWidth&gt;&lt;ClientArea&gt;0, 0, 784, 327&lt;/ClientArea&gt;&lt;PrintPageHeaderStyle parent="" me="Style14" /&gt;&lt;PrintPageFooterStyle parent="" me="Style15" /&gt;&lt;/Blob&gt;</value>
</data>
</root>

View File

@@ -0,0 +1,131 @@
Imports System.Data
Imports System.Data.Sql
Imports System.Data.SqlClient
Imports System.Data.SqlTypes
Public Class frmAllgDomainEditor
Dim ds As New DataSet
Dim da As SqlDataAdapter
Dim co As New SqlConnection
Dim cb As SqlCommandBuilder
Dim tablename As String
#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
Load_Table()
Catch ex As Exception
MsgBox(ex.Message)
End Try
End Sub
Private Sub Load_Table()
Try
da = Nothing
cb = Nothing
Me.c1Daten.DataSource = Nothing
Catch ex As Exception
End Try
Me.Text = Me.tablename
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
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 msgboxres As MsgBoxResult
msgboxres = MsgBox("Daten wurnde verändert. Wollen Sie diese sichern?", MsgBoxStyle.YesNoCancel + MsgBoxStyle.Question)
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

View File

@@ -0,0 +1,139 @@
<?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=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<metadata name="OpenFileDialog1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
<assembly alias="System.Drawing" name="System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="Button2.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAIhJREFUOE+1kgsO
gCAMQzk6R9vNJot2fNY4SJTEoIvtymOlfLlqrbo+2/4mZMvqqQnEItI8is67hlRI6ca9+yrGd8z2JLvT
vSfgpm7AwGU1O+ZkQOmRIkTGKBhwgDF+O7FDtfdjBuhMIcYr5ACRwhOMN7FjMnTvQ5aRJyNu4jClKJ7s
6aT/+8MFg3zbUfLgpsoAAAAASUVORK5CYII=
</value>
</data>
<metadata name="MainMenu1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>149, 17</value>
</metadata>
<metadata name="OpenFileDialog2.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>266, 17</value>
</metadata>
</root>

View File

@@ -0,0 +1,495 @@
Imports System.Data
Imports System.Data.SqlClient
Imports System.Data.SqlTypes
Imports System.IO
Imports System.Reflection
Imports System.Xml
Public Class frmBinData
Inherits System.Windows.Forms.Form
#Region " Vom Windows Form Designer generierter Code "
Public Sub New()
MyBase.New()
' Dieser Aufruf ist für den Windows Form-Designer erforderlich.
InitializeComponent()
' Initialisierungen nach dem Aufruf InitializeComponent() hinzufügen
End Sub
' Die Form überschreibt den Löschvorgang der Basisklasse, um Komponenten zu bereinigen.
Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean)
If disposing Then
If Not (components Is Nothing) Then
components.Dispose()
End If
End If
MyBase.Dispose(disposing)
End Sub
' Für Windows Form-Designer erforderlich
Private components As System.ComponentModel.IContainer
'HINWEIS: Die folgende Prozedur ist für den Windows Form-Designer erforderlich
'Sie kann mit dem Windows Form-Designer modifiziert werden.
'Verwenden Sie nicht den Code-Editor zur Bearbeitung.
Friend WithEvents OpenFileDialog1 As System.Windows.Forms.OpenFileDialog
Friend WithEvents Label1 As System.Windows.Forms.Label
Friend WithEvents Button2 As System.Windows.Forms.Button
Friend WithEvents Label2 As System.Windows.Forms.Label
Friend WithEvents TxtTable As System.Windows.Forms.TextBox
Friend WithEvents Label3 As System.Windows.Forms.Label
Friend WithEvents TxtKeyField As System.Windows.Forms.TextBox
Friend WithEvents TxtKeyValue As System.Windows.Forms.TextBox
Friend WithEvents KeyFeld As System.Windows.Forms.Label
Friend WithEvents Label4 As System.Windows.Forms.Label
Friend WithEvents Label5 As System.Windows.Forms.Label
Friend WithEvents Button3 As System.Windows.Forms.Button
Friend WithEvents Button4 As System.Windows.Forms.Button
Friend WithEvents txtConnstring As System.Windows.Forms.TextBox
Friend WithEvents txtFilename As System.Windows.Forms.TextBox
Friend WithEvents txtBindDatafeld As System.Windows.Forms.TextBox
Friend WithEvents cbstring As System.Windows.Forms.CheckBox
Friend WithEvents MainMenu1 As System.Windows.Forms.MainMenu
Friend WithEvents MenuItem1 As System.Windows.Forms.MenuItem
Friend WithEvents MenuItem3 As System.Windows.Forms.MenuItem
Friend WithEvents OpenFileDialog2 As System.Windows.Forms.OpenFileDialog
Friend WithEvents cboDefaults As System.Windows.Forms.ComboBox
Friend WithEvents Label6 As System.Windows.Forms.Label
Friend WithEvents MenuItem2 As System.Windows.Forms.MenuItem
<System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()
Me.components = New System.ComponentModel.Container
Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(frmBinData))
Me.OpenFileDialog1 = New System.Windows.Forms.OpenFileDialog
Me.txtConnstring = New System.Windows.Forms.TextBox
Me.Label1 = New System.Windows.Forms.Label
Me.txtFilename = New System.Windows.Forms.TextBox
Me.Button2 = New System.Windows.Forms.Button
Me.Label2 = New System.Windows.Forms.Label
Me.TxtTable = New System.Windows.Forms.TextBox
Me.Label3 = New System.Windows.Forms.Label
Me.TxtKeyField = New System.Windows.Forms.TextBox
Me.TxtKeyValue = New System.Windows.Forms.TextBox
Me.KeyFeld = New System.Windows.Forms.Label
Me.Label4 = New System.Windows.Forms.Label
Me.txtBindDatafeld = New System.Windows.Forms.TextBox
Me.Label5 = New System.Windows.Forms.Label
Me.Button3 = New System.Windows.Forms.Button
Me.Button4 = New System.Windows.Forms.Button
Me.cbstring = New System.Windows.Forms.CheckBox
Me.MainMenu1 = New System.Windows.Forms.MainMenu(Me.components)
Me.MenuItem1 = New System.Windows.Forms.MenuItem
Me.MenuItem2 = New System.Windows.Forms.MenuItem
Me.MenuItem3 = New System.Windows.Forms.MenuItem
Me.OpenFileDialog2 = New System.Windows.Forms.OpenFileDialog
Me.cboDefaults = New System.Windows.Forms.ComboBox
Me.Label6 = New System.Windows.Forms.Label
Me.SuspendLayout()
'
'txtConnstring
'
Me.txtConnstring.Location = New System.Drawing.Point(112, 8)
Me.txtConnstring.Name = "txtConnstring"
Me.txtConnstring.ReadOnly = True
Me.txtConnstring.Size = New System.Drawing.Size(472, 20)
Me.txtConnstring.TabIndex = 3
Me.txtConnstring.Text = "data source=shu00;initial catalog=edoka;persist security info=false;workstation i" & _
"d=;packet size=4096;user id=sa;password=*shu29;"
'
'Label1
'
Me.Label1.Location = New System.Drawing.Point(8, 8)
Me.Label1.Name = "Label1"
Me.Label1.Size = New System.Drawing.Size(100, 23)
Me.Label1.TabIndex = 4
Me.Label1.Text = "Connestionstring"
'
'txtFilename
'
Me.txtFilename.Location = New System.Drawing.Point(112, 32)
Me.txtFilename.Name = "txtFilename"
Me.txtFilename.Size = New System.Drawing.Size(472, 20)
Me.txtFilename.TabIndex = 5
Me.txtFilename.Text = "c:\temp\testdata."
'
'Button2
'
Me.Button2.Image = CType(resources.GetObject("Button2.Image"), System.Drawing.Image)
Me.Button2.Location = New System.Drawing.Point(584, 32)
Me.Button2.Name = "Button2"
Me.Button2.Size = New System.Drawing.Size(24, 23)
Me.Button2.TabIndex = 6
'
'Label2
'
Me.Label2.Location = New System.Drawing.Point(8, 32)
Me.Label2.Name = "Label2"
Me.Label2.Size = New System.Drawing.Size(100, 23)
Me.Label2.TabIndex = 7
Me.Label2.Text = "Dateiname"
'
'TxtTable
'
Me.TxtTable.Location = New System.Drawing.Point(112, 85)
Me.TxtTable.Name = "TxtTable"
Me.TxtTable.Size = New System.Drawing.Size(472, 20)
Me.TxtTable.TabIndex = 8
'
'Label3
'
Me.Label3.Location = New System.Drawing.Point(8, 85)
Me.Label3.Name = "Label3"
Me.Label3.Size = New System.Drawing.Size(100, 23)
Me.Label3.TabIndex = 9
Me.Label3.Text = "Tabelle"
'
'TxtKeyField
'
Me.TxtKeyField.Location = New System.Drawing.Point(112, 109)
Me.TxtKeyField.Name = "TxtKeyField"
Me.TxtKeyField.Size = New System.Drawing.Size(472, 20)
Me.TxtKeyField.TabIndex = 10
'
'TxtKeyValue
'
Me.TxtKeyValue.Location = New System.Drawing.Point(112, 133)
Me.TxtKeyValue.Name = "TxtKeyValue"
Me.TxtKeyValue.Size = New System.Drawing.Size(352, 20)
Me.TxtKeyValue.TabIndex = 11
'
'KeyFeld
'
Me.KeyFeld.Location = New System.Drawing.Point(8, 109)
Me.KeyFeld.Name = "KeyFeld"
Me.KeyFeld.Size = New System.Drawing.Size(100, 23)
Me.KeyFeld.TabIndex = 12
Me.KeyFeld.Text = "Key-Feld"
'
'Label4
'
Me.Label4.Location = New System.Drawing.Point(8, 133)
Me.Label4.Name = "Label4"
Me.Label4.Size = New System.Drawing.Size(100, 23)
Me.Label4.TabIndex = 13
Me.Label4.Text = "Key-Value"
'
'txtBindDatafeld
'
Me.txtBindDatafeld.Location = New System.Drawing.Point(112, 157)
Me.txtBindDatafeld.Name = "txtBindDatafeld"
Me.txtBindDatafeld.Size = New System.Drawing.Size(472, 20)
Me.txtBindDatafeld.TabIndex = 14
'
'Label5
'
Me.Label5.Location = New System.Drawing.Point(8, 157)
Me.Label5.Name = "Label5"
Me.Label5.Size = New System.Drawing.Size(100, 23)
Me.Label5.TabIndex = 15
Me.Label5.Text = "Bin-Datafeld"
'
'Button3
'
Me.Button3.Location = New System.Drawing.Point(112, 200)
Me.Button3.Name = "Button3"
Me.Button3.Size = New System.Drawing.Size(120, 40)
Me.Button3.TabIndex = 16
Me.Button3.Text = "DB -> Datei"
'
'Button4
'
Me.Button4.Location = New System.Drawing.Point(464, 200)
Me.Button4.Name = "Button4"
Me.Button4.Size = New System.Drawing.Size(120, 40)
Me.Button4.TabIndex = 17
Me.Button4.Text = "Datei -> DB"
'
'cbstring
'
Me.cbstring.Location = New System.Drawing.Point(488, 133)
Me.cbstring.Name = "cbstring"
Me.cbstring.Size = New System.Drawing.Size(104, 24)
Me.cbstring.TabIndex = 19
Me.cbstring.Text = "String"
'
'MainMenu1
'
Me.MainMenu1.MenuItems.AddRange(New System.Windows.Forms.MenuItem() {Me.MenuItem1})
'
'MenuItem1
'
Me.MenuItem1.Index = 0
Me.MenuItem1.MenuItems.AddRange(New System.Windows.Forms.MenuItem() {Me.MenuItem2, Me.MenuItem3})
Me.MenuItem1.Text = "&Datei"
'
'MenuItem2
'
Me.MenuItem2.Index = 0
Me.MenuItem2.Text = "&Beenden"
'
'MenuItem3
'
Me.MenuItem3.Index = 1
Me.MenuItem3.Text = "&Öffnen"
'
'OpenFileDialog2
'
Me.OpenFileDialog2.FileName = "OpenFileDialog2"
'
'cboDefaults
'
Me.cboDefaults.FormattingEnabled = True
Me.cboDefaults.Items.AddRange(New Object() {"Doks", "Office_2010_Params", "Office_Vorlage_Datei"})
Me.cboDefaults.Location = New System.Drawing.Point(111, 58)
Me.cboDefaults.Name = "cboDefaults"
Me.cboDefaults.Size = New System.Drawing.Size(121, 21)
Me.cboDefaults.TabIndex = 20
'
'Label6
'
Me.Label6.Location = New System.Drawing.Point(8, 59)
Me.Label6.Name = "Label6"
Me.Label6.Size = New System.Drawing.Size(100, 23)
Me.Label6.TabIndex = 21
Me.Label6.Text = "Defaults"
'
'frmBinData
'
Me.AutoScaleBaseSize = New System.Drawing.Size(5, 13)
Me.ClientSize = New System.Drawing.Size(624, 249)
Me.Controls.Add(Me.Label6)
Me.Controls.Add(Me.cboDefaults)
Me.Controls.Add(Me.cbstring)
Me.Controls.Add(Me.Button4)
Me.Controls.Add(Me.Button3)
Me.Controls.Add(Me.Label5)
Me.Controls.Add(Me.txtBindDatafeld)
Me.Controls.Add(Me.Label4)
Me.Controls.Add(Me.KeyFeld)
Me.Controls.Add(Me.TxtKeyValue)
Me.Controls.Add(Me.TxtKeyField)
Me.Controls.Add(Me.Label3)
Me.Controls.Add(Me.TxtTable)
Me.Controls.Add(Me.Label2)
Me.Controls.Add(Me.Button2)
Me.Controls.Add(Me.txtFilename)
Me.Controls.Add(Me.Label1)
Me.Controls.Add(Me.txtConnstring)
Me.Menu = Me.MainMenu1
Me.Name = "frmBinData"
Me.Text = "SQL-BinData"
Me.ResumeLayout(False)
Me.PerformLayout()
End Sub
#End Region
Public args As String() = Environment.GetCommandLineArgs()
Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
Load_Data()
End Sub
Private Sub Load_Data()
Dim dsdata As New DataSet
Dim filename As String = Me.txtFilename.Text
Dim sql As String = ""
sql = "Select * from " + Me.TxtTable.Text
sql = sql & " where " + Me.TxtKeyField.Text
sql = sql & "="
If Me.cbstring.Checked = True Then sql = sql & "'"
sql = sql & Me.TxtKeyValue.Text
If Me.cbstring.Checked = True Then sql = sql & "'"
Try
dsdata.Tables.Clear()
Dim connection As New SqlConnection
Dim da As New SqlDataAdapter(sql, connection)
Dim cb As SqlCommandBuilder = New SqlCommandBuilder(da)
Dim ds As New DataSet
Try
connection.ConnectionString = Me.txtConnstring.Text
connection.Open()
da.Fill(ds, "Daten")
Dim myrow As DataRow
If ds.Tables(0).Rows.Count = 0 Then
MsgBox("Empfänger konnten nicht geladen werden.")
Else
If ds.Tables(0).Rows.Count > 1 Then
MsgBox("Mehr als ein Datensatz ausgewählt.", MsgBoxStyle.Exclamation)
Else
Dim i As Integer
Dim idatafield As Integer = -1
For i = 0 To ds.Tables(0).Columns.Count - 1
If UCase(ds.Tables(0).Columns(i).Caption) = UCase(Me.txtBindDatafeld.Text) Then
idatafield = i
End If
Next
If idatafield > -1 Then
myrow = ds.Tables(0).Rows(0)
Dim MyData() As Byte
MyData = myrow.Item(idatafield)
Dim K As Long
K = UBound(MyData)
Dim fs As New FileStream(Me.txtFilename.Text, FileMode.OpenOrCreate, FileAccess.Write)
fs.Write(MyData, 0, K)
fs.Close()
fs = Nothing
Else
MsgBox("Bin-Datenfeld in der Tabelle nicht vorhanden", MsgBoxStyle.Exclamation)
End If
End If
End If
MsgBox("Auslesen der Daten erfolgreich beendet.")
Catch ex As Exception
MsgBox("Ein Fehler ist aufgetreten" + ex.Message)
Finally
cb = Nothing
ds = Nothing
da = Nothing
connection.Close()
connection = Nothing
End Try
Catch ex As Exception
MsgBox("Ein Fehler ist aufgetreten" + ex.Message)
Finally
dsdata = Nothing
End Try
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
Dim s As String
Me.OpenFileDialog1.ShowDialog()
If Me.OpenFileDialog1.FileName <> "" Then
Me.txtConnstring.Text = ""
FileOpen(1, Me.OpenFileDialog1.FileName, OpenMode.Input)
While Not EOF(1)
Input(1, s)
Me.txtConnstring.Text = Me.txtConnstring.Text + s
End While
FileClose(1)
End If
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
Me.OpenFileDialog1.ShowDialog()
If Me.OpenFileDialog1.FileName <> "" Then Me.txtFilename.Text = Me.OpenFileDialog1.FileName
End Sub
Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button4.Click
save_data()
End Sub
Private Sub save_data()
Dim dsdata As New DataSet
Dim filename As String = Me.txtFilename.Text
Dim sql As String = ""
sql = "Select * from " + Me.TxtTable.Text
sql = sql & " where " + Me.TxtKeyField.Text
sql = sql & "="
If Me.cbstring.Checked = True Then sql = sql & "'"
sql = sql & Me.TxtKeyValue.Text
If Me.cbstring.Checked = True Then sql = sql & "'"
Try
dsdata.Tables.Clear()
Dim connection As New SqlConnection
Dim da As New SqlDataAdapter(sql, connection)
Dim cb As SqlCommandBuilder = New SqlCommandBuilder(da)
Dim ds As New DataSet
Dim fs As New FileStream(filename, FileMode.Open, FileAccess.Read)
Dim mydata(fs.Length) As Byte
fs.Read(mydata, 0, fs.Length)
fs.Close()
connection.ConnectionString = Me.txtConnstring.Text
connection.Open()
da.Fill(ds, "empf")
Dim myRow As DataRow
If ds.Tables(0).Rows.Count = 0 Then
MsgBox("Es wurde kein Daten für den Update selektiert.")
Else
If ds.Tables(0).Rows.Count > 1 Then
MsgBox("Es wurden mehr als 1 Datensatz für den Update selektiert.")
Else
Dim i As Integer
Dim idatafield As Integer = -1
For i = 0 To ds.Tables(0).Columns.Count - 1
If UCase(ds.Tables(0).Columns(i).Caption) = UCase(Me.txtBindDatafeld.Text) Then
idatafield = i
End If
Next
myRow = ds.Tables(0).Rows(0)
myRow.Item(idatafield) = mydata
da.Update(ds, "empf")
End If
End If
fs = Nothing
cb = Nothing
ds = Nothing
da = Nothing
connection.Close()
connection = Nothing
MsgBox("Speichern der Daten erfolgreich beendet.")
Catch ex As Exception
MsgBox("Es ist ein Fehler aufgetreten." & ex.Message)
End Try
End Sub
Private Sub MenuItem2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MenuItem2.Click
Me.Close()
End Sub
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
If args.Length > 0 Then
get_args(args(1))
End If
End Sub
Private Function get_args(ByVal filename As String)
Dim xmldoc As New XmlDocument
xmldoc.Load(filename)
Me.txtConnstring.Text = xmldoc.SelectSingleNode("/Configuration/ConnString").InnerText
Me.txtFilename.Text = xmldoc.SelectSingleNode("/Configuration/Filename").InnerText
Me.TxtTable.Text = xmldoc.SelectSingleNode("/Configuration/Table").InnerText
Me.TxtKeyField.Text = xmldoc.SelectSingleNode("/Configuration/KeyField").InnerText
Me.TxtKeyValue.Text = xmldoc.SelectSingleNode("/Configuration/KeyValue").InnerText
Me.txtBindDatafeld.Text = xmldoc.SelectSingleNode("/Configuration/BinFeld").InnerText
xmldoc = Nothing
End Function
Private Sub MenuItem3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MenuItem3.Click
Me.OpenFileDialog1.ShowDialog()
If Me.OpenFileDialog1.FileName <> "" Then Me.get_args(Me.OpenFileDialog1.FileName)
End Sub
Private Sub cboDefaults_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cboDefaults.SelectedIndexChanged
Select Case cboDefaults.Text
Case "Doks"
Me.TxtTable.Text = "Doks"
Me.TxtKeyField.Text = "Dokumentid"
Me.TxtKeyValue.Text = ""
Me.txtBindDatafeld.Text = "Dokument"
Case "Office_2010_Params"
Me.TxtTable.Text = "Office_2010_Params"
Me.TxtKeyField.Text = "NrEintrag"
Me.TxtKeyValue.Text = "1"
Me.txtBindDatafeld.Text = "BinFile"
Case "Office_Vorlage_Datei"
Me.TxtTable.Text = "Office_Vorlage_Datei"
Me.TxtKeyField.Text = "Office_Vorlage_Dateinr"
Me.TxtKeyValue.Text = ""
Me.txtBindDatafeld.Text = "Vorlage"
End Select
End Sub
End Class

View File

@@ -0,0 +1,128 @@
<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _
Partial Class frmImportOffice2010
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(frmImportOffice2010))
Me.OpenFileDialog1 = New System.Windows.Forms.OpenFileDialog
Me.Label1 = New System.Windows.Forms.Label
Me.btnOpenfile = New System.Windows.Forms.Button
Me.txtFilename = New System.Windows.Forms.TextBox
Me.Label2 = New System.Windows.Forms.Label
Me.cboxAnwendung = New System.Windows.Forms.ComboBox
Me.btnImport = New System.Windows.Forms.Button
Me.btnAbbruch = New System.Windows.Forms.Button
Me.SaveFileDialog1 = New System.Windows.Forms.SaveFileDialog
Me.SuspendLayout()
'
'OpenFileDialog1
'
Me.OpenFileDialog1.FileName = "OpenFileDialog1"
'
'Label1
'
Me.Label1.AutoSize = True
Me.Label1.Location = New System.Drawing.Point(24, 62)
Me.Label1.Name = "Label1"
Me.Label1.Size = New System.Drawing.Size(58, 13)
Me.Label1.TabIndex = 0
Me.Label1.Text = "Dateiname"
'
'btnOpenfile
'
Me.btnOpenfile.Image = CType(resources.GetObject("btnOpenfile.Image"), System.Drawing.Image)
Me.btnOpenfile.Location = New System.Drawing.Point(406, 59)
Me.btnOpenfile.Name = "btnOpenfile"
Me.btnOpenfile.Size = New System.Drawing.Size(41, 25)
Me.btnOpenfile.TabIndex = 1
Me.btnOpenfile.UseVisualStyleBackColor = True
'
'txtFilename
'
Me.txtFilename.Location = New System.Drawing.Point(101, 62)
Me.txtFilename.Name = "txtFilename"
Me.txtFilename.Size = New System.Drawing.Size(303, 20)
Me.txtFilename.TabIndex = 2
'
'Label2
'
Me.Label2.AutoSize = True
Me.Label2.Location = New System.Drawing.Point(24, 31)
Me.Label2.Name = "Label2"
Me.Label2.Size = New System.Drawing.Size(70, 13)
Me.Label2.TabIndex = 3
Me.Label2.Text = "Dokumenttyp"
'
'cboxAnwendung
'
Me.cboxAnwendung.FormattingEnabled = True
Me.cboxAnwendung.Location = New System.Drawing.Point(101, 28)
Me.cboxAnwendung.Name = "cboxAnwendung"
Me.cboxAnwendung.Size = New System.Drawing.Size(303, 21)
Me.cboxAnwendung.TabIndex = 4
'
'btnImport
'
Me.btnImport.Location = New System.Drawing.Point(101, 108)
Me.btnImport.Name = "btnImport"
Me.btnImport.Size = New System.Drawing.Size(75, 23)
Me.btnImport.TabIndex = 5
Me.btnImport.Text = "Importieren"
Me.btnImport.UseVisualStyleBackColor = True
'
'btnAbbruch
'
Me.btnAbbruch.Location = New System.Drawing.Point(372, 108)
Me.btnAbbruch.Name = "btnAbbruch"
Me.btnAbbruch.Size = New System.Drawing.Size(75, 23)
Me.btnAbbruch.TabIndex = 6
Me.btnAbbruch.Text = "Abbruch"
Me.btnAbbruch.UseVisualStyleBackColor = True
'
'frmImportOffice2010
'
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
Me.ClientSize = New System.Drawing.Size(465, 152)
Me.Controls.Add(Me.btnAbbruch)
Me.Controls.Add(Me.btnImport)
Me.Controls.Add(Me.cboxAnwendung)
Me.Controls.Add(Me.Label2)
Me.Controls.Add(Me.txtFilename)
Me.Controls.Add(Me.btnOpenfile)
Me.Controls.Add(Me.Label1)
Me.Name = "frmImportOffice2010"
Me.Text = "Import Office 2010 Vorlage"
Me.ResumeLayout(False)
Me.PerformLayout()
End Sub
Friend WithEvents OpenFileDialog1 As System.Windows.Forms.OpenFileDialog
Friend WithEvents Label1 As System.Windows.Forms.Label
Friend WithEvents btnOpenfile As System.Windows.Forms.Button
Friend WithEvents txtFilename As System.Windows.Forms.TextBox
Friend WithEvents Label2 As System.Windows.Forms.Label
Friend WithEvents cboxAnwendung As System.Windows.Forms.ComboBox
Friend WithEvents btnImport As System.Windows.Forms.Button
Friend WithEvents btnAbbruch As System.Windows.Forms.Button
Friend WithEvents SaveFileDialog1 As System.Windows.Forms.SaveFileDialog
End Class

View File

@@ -0,0 +1,145 @@
<?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=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<metadata name="OpenFileDialog1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
<assembly alias="System.Drawing" name="System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="btnOpenfile.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
YQUAAALHSURBVDhPdZNrSJNRGMel5m2ummPpwNDU/CAiCdGHiGFUpIVWZhiVDLcRiAYuUbTl/Vr2wYV4
oYsTKkxFp+alslhGgda8lKmplKbmZTrn0nmp5N97znSZ1oHfh/c5z/N7nsM5r0VreWgHA9oqRXhfE4bu
OjF66iV/8alRCgZ9d50kzGLjIsUw5kDbF4/+5giQ7/43yZgZLQOgMbNoeIKux2L9PwUr8zewMmdieSYL
k73xVITBm8DQKvoK1FafgedDPjzu8XLNIpL4y3Cd8nOWkE0h8eXOaKx0xQDdsZTqyiDsKeHBqXg7nBU7
1FRCEn/MZNPOy7o/kLhRI8NSR7RZ0F4lgluR/SHBbQ54+bZwzOCkUMHSVCYWtatMZmKBgcRnW6NgbJOh
VyNFQKUXAh94gTQV3OKobIstYZ9io6eChYkMGMfTYRxLx/wqJK59fRnvXongW+GBKl0ZTlT5UoFjlp2a
CDjJVqCCudE0zI2k4TthOBUGBhJXPz2Psw1CqHTliOoUwTWfS8ZW8nPZIAK23NIkMHxNxexQCvRfCMwV
fk5GRfkpBDcKoTY+Q7gmEAfqd2F3HhdO+duw875JYB3LMglIgW4gCbr+JEz3JeFbZxz8a3zwcqEJERp/
HGtypwJvlQNcy7hUwC5kBJe2qqlgui8RU72J0PYk0NFbykJxtGIvwlv8ENzsuUnAV7JhLWPpWZItPlRA
Cic+XsP4BzkVNNy5gMKiAAgLXODX4G4WeJby4ZBjB5tI1qCllCleewekcKzzKkbbTS+wuuAcHilCUFty
EUKFCw6qnOkR+ElsZOYK6U2sf4n63heRGNHEY/htHBWUZB9HXsIRlOeeRM3dIOxLE8CnVACe3BbPlSGm
zmuLKeAyqNqrxRhovoI2lRgxkv1RzL7bWg5HZsW1jWCprKRblZt+pnWi04xITyZQyA97/zdxw8ZvRHI4
8Bya8wcAAAAASUVORK5CYII=
</value>
</data>
<metadata name="SaveFileDialog1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>159, 17</value>
</metadata>
</root>

View File

@@ -0,0 +1,208 @@
Imports System.Data
Imports System.Data.SqlClient
Imports System.Data.SqlTypes
Imports System.IO
Public Class frmImportOffice2010
Dim DokTypes As New DataTable
Dim ds As New DataSet()
Dim Office_Vorlage_Dateinr As Integer
Sub New(ByVal Office_Vorlage_Dateinr As Integer)
' Dieser Aufruf ist für den Windows Form-Designer erforderlich.
InitializeComponent()
Me.Office_Vorlage_Dateinr = Office_Vorlage_Dateinr
' Fügen Sie Initialisierungen nach dem InitializeComponent()-Aufruf hinzu.
End Sub
Private Sub btnOpenfile_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnOpenfile.Click
Me.OpenFileDialog1.FileName = ""
Try
If Me.cboxAnwendung.Text <> "" Then
Me.OpenFileDialog1.Filter = Me.cboxAnwendung.Text + "|*." + Microsoft.VisualBasic.Right(Me.cboxAnwendung.Text, 4) + "|Alle Dateien (*.*)|*.*"
If Me.OpenFileDialog1.ShowDialog = Windows.Forms.DialogResult.OK And Me.OpenFileDialog1.FileName <> "" Then
Me.txtFilename.Text = Me.OpenFileDialog1.FileName
End If
Else
Dim s As String = "Alle Dateien(*.*)|*.*"
For Each dr As DataRow In ds.Tables(0).Rows
s = dr.Item("Bezeichnung") + "|*." + Microsoft.VisualBasic.Right(dr.Item("Bezeichnung"), 4) + "|" + s
Next
Me.OpenFileDialog1.Filter = s
If Me.OpenFileDialog1.ShowDialog = Windows.Forms.DialogResult.OK And Me.OpenFileDialog1.FileName <> "" Then
Me.txtFilename.Text = Me.OpenFileDialog1.FileName
End If
End If
Catch ex As Exception
Me.OpenFileDialog1.Filter = "Alle Dateien (*.*)|*.*"
If Me.OpenFileDialog1.ShowDialog = Windows.Forms.DialogResult.OK Then Me.txtFilename.Text = Me.OpenFileDialog1.FileName
End Try
End Sub
Private Sub frmImportOffice2010_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Get_Doktypes()
Me.cboxAnwendung.DataSource = ds.Tables(0)
Me.cboxAnwendung.DisplayMember = "Bezeichnung"
Me.cboxAnwendung.ValueMember = "Anwendungnr"
End Sub
Private Sub Get_Doktypes()
Dim connection As New SqlConnection()
Dim da As New SqlDataAdapter("Select * From Anwendung where anwendungnr > 3 and aktiv=1", connection)
Dim CB As SqlCommandBuilder = New SqlCommandBuilder(da)
Try
connection.ConnectionString = Globals.sConnectionString
connection.Open()
da.Fill(ds, "Anwendung")
Catch ex As Exception
MsgBox(ex.Message)
End Try
CB = Nothing
da = Nothing
connection.Close()
connection = Nothing
End Sub
Private Sub btnImport_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnImport.Click
If Me.Save_Vorlage_To_Db(Me.txtFilename.Text) Then
MsgBox("Import erfolgreich druchgeführt.", MsgBoxStyle.Information)
Me.Close()
End If
End Sub
Private Function Save_Vorlage_To_Db(ByVal dokumentname As String) As Boolean
Try
Dim IntFilename As String
Dim Connection As New SqlConnection()
Dim DA As New SqlDataAdapter("select * from Office2010_Vorlage_datei where office_vorlage_dateinr = " + Me.Office_Vorlage_Dateinr.ToString, Connection)
Dim cb As SqlCommandBuilder = New SqlCommandBuilder(DA)
Dim ds As New DataSet()
Dim fs As New FileStream(dokumentname, FileMode.OpenOrCreate, FileAccess.Read)
Dim mydata(fs.Length) As Byte
Dim fi As New IO.FileInfo(dokumentname)
IntFilename = (fi.Name)
Try
fs.Read(mydata, 0, fs.Length)
If fs.Length = 0 Then
MsgBox("Fehler bei der Datei Nr: " + Me.Office_Vorlage_Dateinr.ToString + ", " + dokumentname)
fs.Close()
Return False
End If
fs.Close()
Connection.ConnectionString = Globals.sConnectionString
Connection.Open()
DA.Fill(ds, "docs")
Dim myRow As DataRow
If ds.Tables(0).Rows.Count = 0 Then
' Neues Dokument speichern
myRow = ds.Tables(0).NewRow
myRow.Item(1) = Me.Office_Vorlage_Dateinr
myRow.Item(2) = mydata
myRow.Item(3) = Me.cboxAnwendung.SelectedValue
myRow.Item(4) = Now
myRow.Item(5) = Now
myRow.Item(6) = Globals.MitarbeiterNr
myRow.Item(7) = Globals.MandantNr
myRow.Item(10) = System.IO.Path.GetFileName(dokumentname)
ds.Tables(0).Rows.Add(myRow)
DA.Update(ds, "docs")
Else
'Bestehendes Dokument sichenr
myRow = ds.Tables(0).Rows(0)
myRow.Item(2) = mydata
myRow.Item(3) = Me.cboxAnwendung.SelectedValue
myRow.Item(5) = Now
myRow.Item(6) = Globals.MitarbeiterNr
DA.Update(ds, "docs")
End If
Catch ex As Exception
MyMsg.show_standardmessage(86, MsgBoxStyle.Critical)
MsgBox(ex.Message)
End Try
fs = Nothing
cb = Nothing
ds = Nothing
DA = Nothing
Connection.Close()
Connection = Nothing
Return True
Catch
MyMsg.show_standardmessage(86, MsgBoxStyle.Critical)
Return False
End Try
End Function
Public Function Get_From_DB_Office_2010()
Me.SaveFileDialog1.FileName = ""
If SaveFileDialog1.ShowDialog = Windows.Forms.DialogResult.OK Then
Dim connection As New SqlConnection()
Dim da As New SqlDataAdapter("Select * From Office2010_Vorlage_datei where office_vorlage_Dateinr=" + Me.Office_Vorlage_Dateinr, connection)
Dim CB As SqlCommandBuilder = New SqlCommandBuilder(da)
Dim ds As New DataSet()
Try
connection.ConnectionString = Globals.sConnectionString
connection.Open()
da.Fill(ds, "docs")
Dim myRow As DataRow
myRow = ds.Tables(0).Rows(0)
Dim MyData() As Byte
MyData = myRow.Item(2)
Dim K As Long
K = UBound(MyData)
Dim fs As New FileStream(Me.SaveFileDialog1.FileName, FileMode.OpenOrCreate, FileAccess.Write)
fs.Write(MyData, 0, K)
fs.Close()
fs = Nothing
Catch ex As Exception
MsgBox(ex.Message)
End Try
End If
End Function
Public Function Get_Applikationnr(ByVal Dateinr As Integer)
Try
Dim connection As New SqlConnection()
Dim da As New SqlDataAdapter("Select * From Office2010_Vorlage_datei where Office_Vorlage_Dateinr=" + Dateinr.ToString, connection)
Dim CB As SqlCommandBuilder = New SqlCommandBuilder(da)
Dim ds As New DataSet()
Try
connection.ConnectionString = Globals.sConnectionString
connection.Open()
da.Fill(ds, "docs")
If ds.Tables(0).Rows.Count > 0 Then
Return ds.Tables(0).Rows(0).Item(3)
Else
Return 0
End If
Catch ex As Exception
MsgBox(ex.Message)
End Try
CB = Nothing
ds = Nothing
da = Nothing
connection.Close()
connection = Nothing
CB = Nothing
ds = Nothing
da = Nothing
connection.Close()
connection = Nothing
Catch ex As Exception
Return 0
End Try
End Function
Private Sub btnAbbruch_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnAbbruch.Click
Me.DialogResult = Windows.Forms.DialogResult.Abort
Me.Close()
End Sub
End Class