Initial
This commit is contained in:
117
Backup/EDOKA/DivAMS/frmAMSOfficeVorlage.resx
Normal file
117
Backup/EDOKA/DivAMS/frmAMSOfficeVorlage.resx
Normal file
@@ -0,0 +1,117 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 1.3
|
||||
|
||||
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">1.3</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1">this is my long string</data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
[base64 mime encoded serialized .NET Framework object]
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
[base64 mime encoded string representing a byte array form of the .NET Framework object]
|
||||
</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.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:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<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" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
</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>1.3</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=1.0.3300.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=1.0.3300.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<data name="Label1.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.3300.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>Assembly</value>
|
||||
</data>
|
||||
<data name="ComboBox1.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.3300.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>Assembly</value>
|
||||
</data>
|
||||
<data name="btnAbbruch.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.3300.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>Assembly</value>
|
||||
</data>
|
||||
<data name="btnImport.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.3300.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>Assembly</value>
|
||||
</data>
|
||||
<data name="Button1.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.3300.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>Assembly</value>
|
||||
</data>
|
||||
<data name="$this.Name">
|
||||
<value>frmAMSOfficeVorlage</value>
|
||||
</data>
|
||||
</root>
|
||||
263
Backup/EDOKA/DivAMS/frmAMSOfficeVorlage.vb
Normal file
263
Backup/EDOKA/DivAMS/frmAMSOfficeVorlage.vb
Normal file
@@ -0,0 +1,263 @@
|
||||
Imports System.Data
|
||||
Imports System.Data.SqlTypes
|
||||
Imports System.Data.SqlClient
|
||||
Imports System.Drawing
|
||||
Imports System.Drawing.Color
|
||||
Imports System.ComponentModel
|
||||
|
||||
Public Class frmAMSOfficeVorlage
|
||||
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 Label1 As System.Windows.Forms.Label
|
||||
Friend WithEvents ComboBox1 As System.Windows.Forms.ComboBox
|
||||
Friend WithEvents btnAbbruch As System.Windows.Forms.Button
|
||||
Friend WithEvents btnImport As System.Windows.Forms.Button
|
||||
Friend WithEvents Button1 As System.Windows.Forms.Button
|
||||
<System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()
|
||||
Me.Label1 = New System.Windows.Forms.Label()
|
||||
Me.ComboBox1 = New System.Windows.Forms.ComboBox()
|
||||
Me.btnAbbruch = New System.Windows.Forms.Button()
|
||||
Me.btnImport = New System.Windows.Forms.Button()
|
||||
Me.Button1 = New System.Windows.Forms.Button()
|
||||
Me.SuspendLayout()
|
||||
'
|
||||
'Label1
|
||||
'
|
||||
Me.Label1.Location = New System.Drawing.Point(8, 24)
|
||||
Me.Label1.Name = "Label1"
|
||||
Me.Label1.Size = New System.Drawing.Size(112, 23)
|
||||
Me.Label1.TabIndex = 0
|
||||
Me.Label1.Text = "AMS-Officevorlagen"
|
||||
'
|
||||
'ComboBox1
|
||||
'
|
||||
Me.ComboBox1.Location = New System.Drawing.Point(120, 24)
|
||||
Me.ComboBox1.Name = "ComboBox1"
|
||||
Me.ComboBox1.Size = New System.Drawing.Size(328, 21)
|
||||
Me.ComboBox1.TabIndex = 1
|
||||
Me.ComboBox1.Text = "ComboBox1"
|
||||
'
|
||||
'btnAbbruch
|
||||
'
|
||||
Me.btnAbbruch.Location = New System.Drawing.Point(8, 80)
|
||||
Me.btnAbbruch.Name = "btnAbbruch"
|
||||
Me.btnAbbruch.TabIndex = 2
|
||||
Me.btnAbbruch.Text = "Abbruch"
|
||||
'
|
||||
'btnImport
|
||||
'
|
||||
Me.btnImport.Location = New System.Drawing.Point(296, 80)
|
||||
Me.btnImport.Name = "btnImport"
|
||||
Me.btnImport.Size = New System.Drawing.Size(152, 23)
|
||||
Me.btnImport.TabIndex = 3
|
||||
Me.btnImport.Text = "Vorlagenfelder improtieren"
|
||||
'
|
||||
'Button1
|
||||
'
|
||||
Me.Button1.Location = New System.Drawing.Point(136, 80)
|
||||
Me.Button1.Name = "Button1"
|
||||
Me.Button1.TabIndex = 4
|
||||
Me.Button1.Text = "Alle AMS-Vorlagen generieren"
|
||||
'
|
||||
'frmAMSOfficeVorlage
|
||||
'
|
||||
Me.AutoScaleBaseSize = New System.Drawing.Size(5, 13)
|
||||
Me.ClientSize = New System.Drawing.Size(472, 109)
|
||||
Me.Controls.AddRange(New System.Windows.Forms.Control() {Me.Button1, Me.btnImport, Me.btnAbbruch, Me.ComboBox1, Me.Label1})
|
||||
Me.Name = "frmAMSOfficeVorlage"
|
||||
Me.Text = "frmAMSOfficeVorlage"
|
||||
Me.ResumeLayout(False)
|
||||
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
|
||||
Dim m_vorlagenfelder As DataTable
|
||||
Property Vorlagenfleder() As DataTable
|
||||
Get
|
||||
Return m_vorlagenfelder
|
||||
End Get
|
||||
Set(ByVal Value As DataTable)
|
||||
m_vorlagenfelder = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Dim m_dokumenttypnr As Integer
|
||||
Property Dokumenttypnr() As Integer
|
||||
Get
|
||||
Return m_dokumenttypnr
|
||||
End Get
|
||||
Set(ByVal Value As Integer)
|
||||
m_dokumenttypnr = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Dim Dokumentvorlagen As New DataTable()
|
||||
Dim doktyp As New edokadb.clsDokumenttyp()
|
||||
Dim doktypnr As Integer = 0
|
||||
Dim amsvorlagenr As Integer = 0
|
||||
|
||||
|
||||
Dim mcbvorlagen As New MultiComboBox()
|
||||
|
||||
Private Sub frmAMSOfficeVorlage_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
|
||||
mcbvorlagen = New MultiComboBox(Me.ComboBox1)
|
||||
mcbvorlagen.DisplayColumnName = "bezeichnung"
|
||||
mcbvorlagen.ValueColumnName = "officevorlagenr"
|
||||
mcbvorlagen.Fill_Data(Generic_Select(1), False)
|
||||
End Sub
|
||||
|
||||
Private Sub btnAbbruch_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnAbbruch.Click
|
||||
Me.DialogResult = DialogResult.Cancel
|
||||
Me.Close()
|
||||
End Sub
|
||||
|
||||
|
||||
Private Function Generic_Select(ByVal typ As Integer) As DataTable
|
||||
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
|
||||
Select Case typ
|
||||
Case 1
|
||||
scmCmdToExecute.CommandText = "dbo.SP_AMS_OfficeVorlage"
|
||||
Case 2
|
||||
scmCmdToExecute.CommandText = "dbo.SP_AMS_OfficeVorlage"
|
||||
Case 3
|
||||
scmCmdToExecute.CommandText = "dbo.SP_AMS_Vorlagenfelder"
|
||||
Case 4
|
||||
scmCmdToExecute.CommandText = "dbo.sp_ams_edoka"
|
||||
Case Else
|
||||
End Select
|
||||
scmCmdToExecute.CommandType = CommandType.StoredProcedure
|
||||
Dim dtToReturn As DataTable = New DataTable()
|
||||
Dim sdaAdapter As SqlDataAdapter = New SqlDataAdapter(scmCmdToExecute)
|
||||
|
||||
scmCmdToExecute.Connection = conn.scoDBConnection
|
||||
Select Case typ
|
||||
Case 1
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@fnkt", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, 1))
|
||||
Case 2
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@fnkt", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, 2))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@officevorlagenr", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, Me.mcbvorlagen.SelectedValue))
|
||||
Case 3
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@officevorlagenr", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, Me.amsvorlagenr))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@dokumenttypnr", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, Me.doktypnr))
|
||||
Case Else
|
||||
End Select
|
||||
|
||||
Try
|
||||
sdaAdapter.Fill(dtToReturn)
|
||||
Return dtToReturn
|
||||
Catch ex As Exception
|
||||
' // some error occured. Bubble it to caller and encapsulate Exception object
|
||||
Throw New Exception("SP_AMS_OfficeVoralgen::Generic_Select::" & scmCmdToExecute.CommandText & "::Error occured." & ex.Message, ex)
|
||||
Finally
|
||||
scmCmdToExecute.Dispose()
|
||||
sdaAdapter.Dispose()
|
||||
End Try
|
||||
End Function
|
||||
|
||||
Private Sub btnImport_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnImport.Click
|
||||
Me.doktypnr = Me.Dokumenttypnr
|
||||
Me.amsvorlagenr = Me.mcbvorlagen.SelectedValue
|
||||
Inser_Vorlagenfelder()
|
||||
End Sub
|
||||
|
||||
Private Sub Inser_Vorlagenfelder()
|
||||
Dim data As DataTable
|
||||
Dim vr As New edokadb.clsVorlagenfeld()
|
||||
Dim dbkey As New edokadb.clsMyKey_Tabelle()
|
||||
Dim key As Long
|
||||
Dim i As Integer
|
||||
data = Generic_Select(3)
|
||||
dbkey.cpMainConnectionProvider = conn
|
||||
Try
|
||||
For i = 0 To data.Rows.Count - 1
|
||||
key = dbkey.get_dbkey("vorlagenfeld")
|
||||
vr.iVorlagenfeldnr = New SqlInt32(CType(key, Int32))
|
||||
vr.iDokumenttypnr = New SqlInt32(CType(Me.doktypnr, Int32))
|
||||
vr.iVorlagenfeldregelnr = New SqlInt32(CType(data.Rows(i).Item("edoka_vorlagenfeldregelnr"), Int32))
|
||||
vr.sFeldname = New SqlString(CType(data.Rows(i).Item("office_feld"), String))
|
||||
vr.sBeginntextmarke = New SqlString(CType(data.Rows(i).Item("beginntextmarke"), String))
|
||||
vr.sEndetextmarke = New SqlString(CType(data.Rows(i).Item("endetextmarke"), String))
|
||||
vr.bAusstiegsmakro = New SqlBoolean(CType(data.Rows(i).Item("ausstiegsmakro"), Boolean))
|
||||
vr.bEinstiegsmakro = New SqlBoolean(CType(data.Rows(i).Item("einstiegsmakro"), Boolean))
|
||||
vr.bAktiv = New SqlBoolean(CType(data.Rows(i).Item("aktiv"), Boolean))
|
||||
vr.sTestdaten = New SqlString(CType("", String))
|
||||
vr.iMandantnr = New SqlInt32(CType(1, Int32))
|
||||
vr.iMutierer = New SqlInt32(CType(Globals.MitarbeiterNr, Int32))
|
||||
vr.daErstellt_am = New SqlDateTime(CType(Now, DateTime))
|
||||
vr.daMutiert_am = New SqlDateTime(CType(Now, DateTime))
|
||||
vr.cpMainConnectionProvider = conn
|
||||
conn.OpenConnection()
|
||||
Try
|
||||
vr.Insert()
|
||||
Catch ex As Exception
|
||||
MsgBox(ex.Message)
|
||||
End Try
|
||||
conn.CloseConnection(True)
|
||||
Next
|
||||
vr.Dispose()
|
||||
data.Dispose()
|
||||
dbkey.Dispose()
|
||||
Catch ex As Exception
|
||||
MsgBox(ex.Message)
|
||||
End Try
|
||||
|
||||
Me.Close()
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
|
||||
|
||||
Dim i As Integer
|
||||
Dim zwdata As DataTable
|
||||
Dokumentvorlagen = Generic_Select(4)
|
||||
doktyp.cpMainConnectionProvider = conn
|
||||
For i = 0 To Dokumentvorlagen.Rows.Count - 1
|
||||
doktyp.iDokumenttypnr = New SqlInt32(CType(Dokumentvorlagen.Rows(i).Item("edoka_dokumenttypnr"), Int32))
|
||||
zwdata = doktyp.SelectOne
|
||||
If zwdata.Rows.Count = 0 Then
|
||||
MsgBox("Kein EDOKA-Dokumenttyp für AMS_Office_Vorlage:" + Str(Dokumentvorlagen.Rows(i).Item("AMS_Vorlagenr")))
|
||||
Else
|
||||
Me.amsvorlagenr = Dokumentvorlagen.Rows(i).Item("ams_vorlagenr")
|
||||
Me.doktypnr = doktyp.iDokumenttypnr.Value
|
||||
Inser_Vorlagenfelder()
|
||||
|
||||
End If
|
||||
Next
|
||||
|
||||
End Sub
|
||||
End Class
|
||||
Reference in New Issue
Block a user