Initial
This commit is contained in:
808
EDOKA/Backup1/Reporting/frmValueSelect.vb
Normal file
808
EDOKA/Backup1/Reporting/frmValueSelect.vb
Normal file
@@ -0,0 +1,808 @@
|
||||
Imports System.Data
|
||||
Imports System.Data.SqlTypes
|
||||
Imports System.Data.SqlClient
|
||||
|
||||
Public Class frmValueSelect
|
||||
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 Panel1 As System.Windows.Forms.Panel
|
||||
Friend WithEvents Panel2 As System.Windows.Forms.Panel
|
||||
Friend WithEvents Splitter1 As System.Windows.Forms.Splitter
|
||||
Friend WithEvents grdValue As C1.Win.C1TrueDBGrid.C1TrueDBGrid
|
||||
Friend WithEvents Panel3 As System.Windows.Forms.Panel
|
||||
Friend WithEvents grdSelected As C1.Win.C1TrueDBGrid.C1TrueDBGrid
|
||||
Friend WithEvents ImageList1 As System.Windows.Forms.ImageList
|
||||
Friend WithEvents Abbrechen As System.Windows.Forms.ToolBarButton
|
||||
Friend WithEvents Uebernehmen As System.Windows.Forms.ToolBarButton
|
||||
Friend WithEvents tlbValueSelect As System.Windows.Forms.ToolBar
|
||||
Friend WithEvents Partnersuche As System.Windows.Forms.ToolBarButton
|
||||
Friend WithEvents Timer1 As System.Windows.Forms.Timer
|
||||
Friend WithEvents timHinweismeldung As System.Windows.Forms.Timer
|
||||
<System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()
|
||||
Me.components = New System.ComponentModel.Container()
|
||||
Dim resources As System.Resources.ResourceManager = New System.Resources.ResourceManager(GetType(frmValueSelect))
|
||||
Dim GridLines1 As C1.Win.C1TrueDBGrid.Util.GridLines = New C1.Win.C1TrueDBGrid.Util.GridLines()
|
||||
Dim GridLines2 As C1.Win.C1TrueDBGrid.Util.GridLines = New C1.Win.C1TrueDBGrid.Util.GridLines()
|
||||
Me.Panel1 = New System.Windows.Forms.Panel()
|
||||
Me.tlbValueSelect = New System.Windows.Forms.ToolBar()
|
||||
Me.Abbrechen = New System.Windows.Forms.ToolBarButton()
|
||||
Me.Uebernehmen = New System.Windows.Forms.ToolBarButton()
|
||||
Me.Partnersuche = New System.Windows.Forms.ToolBarButton()
|
||||
Me.ImageList1 = New System.Windows.Forms.ImageList(Me.components)
|
||||
Me.Panel2 = New System.Windows.Forms.Panel()
|
||||
Me.grdValue = New C1.Win.C1TrueDBGrid.C1TrueDBGrid()
|
||||
Me.Splitter1 = New System.Windows.Forms.Splitter()
|
||||
Me.Panel3 = New System.Windows.Forms.Panel()
|
||||
Me.grdSelected = New C1.Win.C1TrueDBGrid.C1TrueDBGrid()
|
||||
Me.Timer1 = New System.Windows.Forms.Timer(Me.components)
|
||||
Me.timHinweismeldung = New System.Windows.Forms.Timer(Me.components)
|
||||
Me.Panel1.SuspendLayout()
|
||||
Me.Panel2.SuspendLayout()
|
||||
CType(Me.grdValue, System.ComponentModel.ISupportInitialize).BeginInit()
|
||||
Me.Panel3.SuspendLayout()
|
||||
CType(Me.grdSelected, System.ComponentModel.ISupportInitialize).BeginInit()
|
||||
Me.SuspendLayout()
|
||||
'
|
||||
'Panel1
|
||||
'
|
||||
Me.Panel1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle
|
||||
Me.Panel1.Controls.AddRange(New System.Windows.Forms.Control() {Me.tlbValueSelect})
|
||||
Me.Panel1.Dock = System.Windows.Forms.DockStyle.Top
|
||||
Me.Panel1.Name = "Panel1"
|
||||
Me.Panel1.Size = New System.Drawing.Size(752, 32)
|
||||
Me.Panel1.TabIndex = 6
|
||||
'
|
||||
'tlbValueSelect
|
||||
'
|
||||
Me.tlbValueSelect.Buttons.AddRange(New System.Windows.Forms.ToolBarButton() {Me.Abbrechen, Me.Uebernehmen, Me.Partnersuche})
|
||||
Me.tlbValueSelect.DropDownArrows = True
|
||||
Me.tlbValueSelect.ImageList = Me.ImageList1
|
||||
Me.tlbValueSelect.Name = "tlbValueSelect"
|
||||
Me.tlbValueSelect.ShowToolTips = True
|
||||
Me.tlbValueSelect.Size = New System.Drawing.Size(750, 25)
|
||||
Me.tlbValueSelect.TabIndex = 6
|
||||
'
|
||||
'Abbrechen
|
||||
'
|
||||
Me.Abbrechen.ImageIndex = 1
|
||||
Me.Abbrechen.Tag = "Abbrechen"
|
||||
Me.Abbrechen.ToolTipText = "Abbrechen"
|
||||
'
|
||||
'Uebernehmen
|
||||
'
|
||||
Me.Uebernehmen.ImageIndex = 4
|
||||
Me.Uebernehmen.Tag = "Uebernehmen"
|
||||
Me.Uebernehmen.ToolTipText = "Übernehmen"
|
||||
'
|
||||
'Partnersuche
|
||||
'
|
||||
Me.Partnersuche.ImageIndex = 3
|
||||
Me.Partnersuche.Tag = "Partnersuche"
|
||||
Me.Partnersuche.ToolTipText = "Partnersuche"
|
||||
'
|
||||
'ImageList1
|
||||
'
|
||||
Me.ImageList1.ColorDepth = System.Windows.Forms.ColorDepth.Depth8Bit
|
||||
Me.ImageList1.ImageSize = New System.Drawing.Size(16, 16)
|
||||
Me.ImageList1.ImageStream = CType(resources.GetObject("ImageList1.ImageStream"), System.Windows.Forms.ImageListStreamer)
|
||||
Me.ImageList1.TransparentColor = System.Drawing.Color.Transparent
|
||||
'
|
||||
'Panel2
|
||||
'
|
||||
Me.Panel2.Controls.AddRange(New System.Windows.Forms.Control() {Me.grdValue})
|
||||
Me.Panel2.Dock = System.Windows.Forms.DockStyle.Left
|
||||
Me.Panel2.Location = New System.Drawing.Point(0, 32)
|
||||
Me.Panel2.Name = "Panel2"
|
||||
Me.Panel2.Size = New System.Drawing.Size(396, 551)
|
||||
Me.Panel2.TabIndex = 7
|
||||
'
|
||||
'grdValue
|
||||
'
|
||||
Me.grdValue.AllowFilter = True
|
||||
Me.grdValue.AllowRowSizing = C1.Win.C1TrueDBGrid.RowSizingEnum.AllRows
|
||||
Me.grdValue.AllowSort = True
|
||||
Me.grdValue.AllowUpdate = False
|
||||
Me.grdValue.AlternatingRows = True
|
||||
Me.grdValue.CaptionHeight = 17
|
||||
Me.grdValue.CollapseColor = System.Drawing.Color.Black
|
||||
Me.grdValue.DataChanged = False
|
||||
Me.grdValue.DeadAreaBackColor = System.Drawing.Color.Empty
|
||||
Me.grdValue.ExpandColor = System.Drawing.Color.Black
|
||||
Me.grdValue.FetchRowStyles = True
|
||||
Me.grdValue.FilterBar = True
|
||||
Me.grdValue.GroupByCaption = "Drag a column header here to group by that column"
|
||||
Me.grdValue.Images.Add(CType(resources.GetObject("resource.Images"), System.Drawing.Bitmap))
|
||||
Me.grdValue.Location = New System.Drawing.Point(26, 20)
|
||||
Me.grdValue.MarqueeStyle = C1.Win.C1TrueDBGrid.MarqueeEnum.DottedCellBorder
|
||||
Me.grdValue.Name = "grdValue"
|
||||
Me.grdValue.PreviewInfo.Location = New System.Drawing.Point(0, 0)
|
||||
Me.grdValue.PreviewInfo.Size = New System.Drawing.Size(0, 0)
|
||||
Me.grdValue.PreviewInfo.ZoomFactor = 75
|
||||
Me.grdValue.PrintInfo.ShowOptionsDialog = False
|
||||
Me.grdValue.RecordSelectorWidth = 16
|
||||
GridLines1.Color = System.Drawing.Color.DarkGray
|
||||
GridLines1.Style = C1.Win.C1TrueDBGrid.LineStyleEnum.Single
|
||||
Me.grdValue.RowDivider = GridLines1
|
||||
Me.grdValue.RowHeight = 15
|
||||
Me.grdValue.RowSubDividerColor = System.Drawing.Color.DarkGray
|
||||
Me.grdValue.ScrollTips = False
|
||||
Me.grdValue.Size = New System.Drawing.Size(282, 88)
|
||||
Me.grdValue.TabIndex = 4
|
||||
Me.grdValue.Text = "C1TrueDBGrid1"
|
||||
Me.grdValue.PropBag = "<?xml version=""1.0""?><Blob><Styles type=""C1.Win.C1TrueDBGrid.Design.ContextWrappe" & _
|
||||
"r""><Data>Group{BackColor:ControlDark;Border:None,,0, 0, 0, 0;AlignVert:Center;}E" & _
|
||||
"ditor{}Style2{}Style5{}Style4{}Style7{}Style6{}EvenRow{BackColor:White;}Selected" & _
|
||||
"{ForeColor:HighlightText;BackColor:Highlight;}Style3{}Inactive{ForeColor:Inactiv" & _
|
||||
"eCaptionText;BackColor:InactiveCaption;}FilterBar{BackColor:255, 255, 192;}Foote" & _
|
||||
"r{}Caption{AlignHorz:Center;}Normal{}HighlightRow{ForeColor:HighlightText;BackCo" & _
|
||||
"lor:Highlight;}Style9{}OddRow{BackColor:224, 224, 224;}RecordSelector{AlignImage" & _
|
||||
":Center;}Heading{Wrap:True;AlignVert:Center;Border:Raised,,1, 1, 1, 1;ForeColor:" & _
|
||||
"ControlText;BackColor:Control;}Style8{}Style10{AlignHorz:Near;}Style11{}Style12{" & _
|
||||
"}Style13{}Style1{}</Data></Styles><Splits><C1.Win.C1TrueDBGrid.MergeView Name=""""" & _
|
||||
" AlternatingRowStyle=""True"" CaptionHeight=""17"" ColumnCaptionHeight=""17"" ColumnFo" & _
|
||||
"oterHeight=""17"" FetchRowStyles=""True"" FilterBar=""True"" MarqueeStyle=""DottedCellB" & _
|
||||
"order"" RecordSelectorWidth=""16"" DefRecSelWidth=""16"" VerticalScrollGroup=""1"" Hori" & _
|
||||
"zontalScrollGroup=""1""><ClientRect>0, 0, 278, 84</ClientRect><BorderSide>0</Borde" & _
|
||||
"rSide><CaptionStyle parent=""Style2"" me=""Style10"" /><EditorStyle parent=""Editor"" " & _
|
||||
"me=""Style5"" /><EvenRowStyle parent=""EvenRow"" me=""Style8"" /><FilterBarStyle paren" & _
|
||||
"t=""FilterBar"" me=""Style13"" /><FooterStyle parent=""Footer"" me=""Style3"" /><GroupSt" & _
|
||||
"yle parent=""Group"" me=""Style12"" /><HeadingStyle parent=""Heading"" me=""Style2"" /><" & _
|
||||
"HighLightRowStyle parent=""HighlightRow"" me=""Style7"" /><InactiveStyle parent=""Ina" & _
|
||||
"ctive"" me=""Style4"" /><OddRowStyle parent=""OddRow"" me=""Style9"" /><RecordSelectorS" & _
|
||||
"tyle parent=""RecordSelector"" me=""Style11"" /><SelectedStyle parent=""Selected"" me=" & _
|
||||
"""Style6"" /><Style parent=""Normal"" me=""Style1"" /></C1.Win.C1TrueDBGrid.MergeView>" & _
|
||||
"</Splits><NamedStyles><Style parent="""" me=""Normal"" /><Style parent=""Normal"" me=""" & _
|
||||
"Heading"" /><Style parent=""Heading"" me=""Footer"" /><Style parent=""Heading"" me=""Cap" & _
|
||||
"tion"" /><Style parent=""Heading"" me=""Inactive"" /><Style parent=""Normal"" me=""Selec" & _
|
||||
"ted"" /><Style parent=""Normal"" me=""Editor"" /><Style parent=""Normal"" me=""Highlight" & _
|
||||
"Row"" /><Style parent=""Normal"" me=""EvenRow"" /><Style parent=""Normal"" me=""OddRow"" " & _
|
||||
"/><Style parent=""Heading"" me=""RecordSelector"" /><Style parent=""Normal"" me=""Filte" & _
|
||||
"rBar"" /><Style parent=""Caption"" me=""Group"" /></NamedStyles><vertSplits>1</vertSp" & _
|
||||
"lits><horzSplits>1</horzSplits><Layout>None</Layout><DefaultRecSelWidth>16</Defa" & _
|
||||
"ultRecSelWidth><ClientArea>0, 0, 278, 84</ClientArea></Blob>"
|
||||
'
|
||||
'Splitter1
|
||||
'
|
||||
Me.Splitter1.Location = New System.Drawing.Point(396, 32)
|
||||
Me.Splitter1.Name = "Splitter1"
|
||||
Me.Splitter1.Size = New System.Drawing.Size(3, 551)
|
||||
Me.Splitter1.TabIndex = 8
|
||||
Me.Splitter1.TabStop = False
|
||||
'
|
||||
'Panel3
|
||||
'
|
||||
Me.Panel3.Controls.AddRange(New System.Windows.Forms.Control() {Me.grdSelected})
|
||||
Me.Panel3.Dock = System.Windows.Forms.DockStyle.Fill
|
||||
Me.Panel3.Location = New System.Drawing.Point(399, 32)
|
||||
Me.Panel3.Name = "Panel3"
|
||||
Me.Panel3.Size = New System.Drawing.Size(353, 551)
|
||||
Me.Panel3.TabIndex = 9
|
||||
'
|
||||
'grdSelected
|
||||
'
|
||||
Me.grdSelected.AllowDelete = True
|
||||
Me.grdSelected.AllowFilter = True
|
||||
Me.grdSelected.AllowRowSizing = C1.Win.C1TrueDBGrid.RowSizingEnum.AllRows
|
||||
Me.grdSelected.AllowSort = True
|
||||
Me.grdSelected.AllowUpdate = False
|
||||
Me.grdSelected.AlternatingRows = True
|
||||
Me.grdSelected.CaptionHeight = 17
|
||||
Me.grdSelected.CollapseColor = System.Drawing.Color.Black
|
||||
Me.grdSelected.DataChanged = False
|
||||
Me.grdSelected.DeadAreaBackColor = System.Drawing.Color.Empty
|
||||
Me.grdSelected.Dock = System.Windows.Forms.DockStyle.Fill
|
||||
Me.grdSelected.ExpandColor = System.Drawing.Color.Black
|
||||
Me.grdSelected.FetchRowStyles = True
|
||||
Me.grdSelected.FilterBar = True
|
||||
Me.grdSelected.GroupByCaption = "Drag a column header here to group by that column"
|
||||
Me.grdSelected.Images.Add(CType(resources.GetObject("resource.Images1"), System.Drawing.Bitmap))
|
||||
Me.grdSelected.MarqueeStyle = C1.Win.C1TrueDBGrid.MarqueeEnum.DottedCellBorder
|
||||
Me.grdSelected.Name = "grdSelected"
|
||||
Me.grdSelected.PreviewInfo.Location = New System.Drawing.Point(0, 0)
|
||||
Me.grdSelected.PreviewInfo.Size = New System.Drawing.Size(0, 0)
|
||||
Me.grdSelected.PreviewInfo.ZoomFactor = 75
|
||||
Me.grdSelected.PrintInfo.ShowOptionsDialog = False
|
||||
Me.grdSelected.RecordSelectorWidth = 16
|
||||
GridLines2.Color = System.Drawing.Color.DarkGray
|
||||
GridLines2.Style = C1.Win.C1TrueDBGrid.LineStyleEnum.Single
|
||||
Me.grdSelected.RowDivider = GridLines2
|
||||
Me.grdSelected.RowHeight = 15
|
||||
Me.grdSelected.RowSubDividerColor = System.Drawing.Color.DarkGray
|
||||
Me.grdSelected.ScrollTips = False
|
||||
Me.grdSelected.Size = New System.Drawing.Size(353, 551)
|
||||
Me.grdSelected.TabIndex = 5
|
||||
Me.grdSelected.Text = "C1TrueDBGrid1"
|
||||
Me.grdSelected.PropBag = "<?xml version=""1.0""?><Blob><Styles type=""C1.Win.C1TrueDBGrid.Design.ContextWrappe" & _
|
||||
"r""><Data>Group{AlignVert:Center;Border:None,,0, 0, 0, 0;BackColor:ControlDark;}E" & _
|
||||
"ditor{}Style2{}Style5{}Style4{}Style7{}Style6{}EvenRow{BackColor:White;}Selected" & _
|
||||
"{ForeColor:HighlightText;BackColor:Highlight;}Style3{}Inactive{ForeColor:Inactiv" & _
|
||||
"eCaptionText;BackColor:InactiveCaption;}FilterBar{BackColor:255, 255, 192;}Foote" & _
|
||||
"r{}Caption{AlignHorz:Center;}Normal{}HighlightRow{ForeColor:HighlightText;BackCo" & _
|
||||
"lor:Highlight;}Style1{}OddRow{BackColor:224, 224, 224;}RecordSelector{AlignImage" & _
|
||||
":Center;}Heading{Wrap:True;BackColor:Control;Border:Raised,,1, 1, 1, 1;ForeColor" & _
|
||||
":ControlText;AlignVert:Center;}Style8{}Style10{AlignHorz:Near;}Style11{}Style12{" & _
|
||||
"}Style13{}Style9{}</Data></Styles><Splits><C1.Win.C1TrueDBGrid.MergeView Name=""""" & _
|
||||
" AlternatingRowStyle=""True"" CaptionHeight=""17"" ColumnCaptionHeight=""17"" ColumnFo" & _
|
||||
"oterHeight=""17"" FetchRowStyles=""True"" FilterBar=""True"" MarqueeStyle=""DottedCellB" & _
|
||||
"order"" RecordSelectorWidth=""16"" DefRecSelWidth=""16"" VerticalScrollGroup=""1"" Hori" & _
|
||||
"zontalScrollGroup=""1""><ClientRect>0, 0, 349, 547</ClientRect><BorderSide>0</Bord" & _
|
||||
"erSide><CaptionStyle parent=""Style2"" me=""Style10"" /><EditorStyle parent=""Editor""" & _
|
||||
" me=""Style5"" /><EvenRowStyle parent=""EvenRow"" me=""Style8"" /><FilterBarStyle pare" & _
|
||||
"nt=""FilterBar"" me=""Style13"" /><FooterStyle parent=""Footer"" me=""Style3"" /><GroupS" & _
|
||||
"tyle parent=""Group"" me=""Style12"" /><HeadingStyle parent=""Heading"" me=""Style2"" />" & _
|
||||
"<HighLightRowStyle parent=""HighlightRow"" me=""Style7"" /><InactiveStyle parent=""In" & _
|
||||
"active"" me=""Style4"" /><OddRowStyle parent=""OddRow"" me=""Style9"" /><RecordSelector" & _
|
||||
"Style parent=""RecordSelector"" me=""Style11"" /><SelectedStyle parent=""Selected"" me" & _
|
||||
"=""Style6"" /><Style parent=""Normal"" me=""Style1"" /></C1.Win.C1TrueDBGrid.MergeView" & _
|
||||
"></Splits><NamedStyles><Style parent="""" me=""Normal"" /><Style parent=""Normal"" me=" & _
|
||||
"""Heading"" /><Style parent=""Heading"" me=""Footer"" /><Style parent=""Heading"" me=""Ca" & _
|
||||
"ption"" /><Style parent=""Heading"" me=""Inactive"" /><Style parent=""Normal"" me=""Sele" & _
|
||||
"cted"" /><Style parent=""Normal"" me=""Editor"" /><Style parent=""Normal"" me=""Highligh" & _
|
||||
"tRow"" /><Style parent=""Normal"" me=""EvenRow"" /><Style parent=""Normal"" me=""OddRow""" & _
|
||||
" /><Style parent=""Heading"" me=""RecordSelector"" /><Style parent=""Normal"" me=""Filt" & _
|
||||
"erBar"" /><Style parent=""Caption"" me=""Group"" /></NamedStyles><vertSplits>1</vertS" & _
|
||||
"plits><horzSplits>1</horzSplits><Layout>None</Layout><DefaultRecSelWidth>16</Def" & _
|
||||
"aultRecSelWidth><ClientArea>0, 0, 349, 547</ClientArea></Blob>"
|
||||
'
|
||||
'Timer1
|
||||
'
|
||||
'
|
||||
'timHinweismeldung
|
||||
'
|
||||
Me.timHinweismeldung.Interval = 1000
|
||||
'
|
||||
'frmValueSelect
|
||||
'
|
||||
Me.AutoScaleBaseSize = New System.Drawing.Size(5, 13)
|
||||
Me.ClientSize = New System.Drawing.Size(752, 583)
|
||||
Me.Controls.AddRange(New System.Windows.Forms.Control() {Me.Panel3, Me.Splitter1, Me.Panel2, Me.Panel1})
|
||||
Me.Icon = CType(resources.GetObject("$this.Icon"), System.Drawing.Icon)
|
||||
Me.Name = "frmValueSelect"
|
||||
Me.Text = "frmValueSelect"
|
||||
Me.Panel1.ResumeLayout(False)
|
||||
Me.Panel2.ResumeLayout(False)
|
||||
CType(Me.grdValue, System.ComponentModel.ISupportInitialize).EndInit()
|
||||
Me.Panel3.ResumeLayout(False)
|
||||
CType(Me.grdSelected, System.ComponentModel.ISupportInitialize).EndInit()
|
||||
Me.ResumeLayout(False)
|
||||
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
|
||||
#Region " Declaration "
|
||||
Dim WithEvents PartnerSearch As New FrmPartnersuche()
|
||||
Dim dtSelected As New DataTable("Valueselected")
|
||||
|
||||
Public Enum Enum_SelelectType
|
||||
ValueSelect = 1
|
||||
End Enum
|
||||
|
||||
Dim mypartner As New edokadb.clsMyPartner()
|
||||
Dim partner As DataTable
|
||||
Dim m_sDatenherkunft As String
|
||||
Dim m_sDislpayResult As String
|
||||
Dim m_sNavigationResult As String
|
||||
Dim m_iSelectionType As Enum_SelelectType
|
||||
Dim m_sID As String
|
||||
Private m_sTableName As String
|
||||
|
||||
#End Region
|
||||
|
||||
#Region " Property "
|
||||
Property Datenherkunft() As String
|
||||
' Werte dienen für die Anziege
|
||||
Get
|
||||
Return m_sDatenherkunft
|
||||
End Get
|
||||
Set(ByVal Value As String)
|
||||
m_sDatenherkunft = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Property NavigationResult() As String
|
||||
' Werte dienen für die Steuerung
|
||||
Get
|
||||
Return m_sNavigationResult
|
||||
End Get
|
||||
Set(ByVal Value As String)
|
||||
m_sNavigationResult = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Property DislpayResult() As String
|
||||
Get
|
||||
Return m_sDislpayResult
|
||||
End Get
|
||||
Set(ByVal Value As String)
|
||||
m_sDislpayResult = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Property SelectionType() As Enum_SelelectType
|
||||
'Typisierung für datenherkunft Bestimmt Welche Stored Procedure aufgerufen wird
|
||||
Get
|
||||
Return m_iSelectionType
|
||||
End Get
|
||||
Set(ByVal Value As Enum_SelelectType)
|
||||
m_iSelectionType = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Property TableName() As String
|
||||
Get
|
||||
Return m_sTableName
|
||||
End Get
|
||||
Set(ByVal Value As String)
|
||||
m_sTableName = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Property ID() As String
|
||||
'Typisierung für datenherkunft Bestimmt Welche Stored Procedure aufgerufen wird
|
||||
Get
|
||||
Return m_sID
|
||||
End Get
|
||||
Set(ByVal Value As String)
|
||||
m_sID = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
#End Region
|
||||
|
||||
#Region " Formularfunktionen "
|
||||
Private Sub frmValueSelect_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles MyBase.Load
|
||||
'===============================================================================
|
||||
'Desc : Laden der Datem gem Datenherkunft
|
||||
'Output : Wenn eine ID übergeben wurde wird das GridValue Positioniert
|
||||
'Erstellt : koe 10.11.2003
|
||||
'Geaendert :
|
||||
'===============================================================================
|
||||
Dim iCount As Integer
|
||||
Dim i As Integer = 50
|
||||
Dim sRowName As String
|
||||
Try
|
||||
Me.TableName = "Valueselect" & Replace(m_sDatenherkunft, "&", "")
|
||||
Dim DS As New DataSet(Me.TableName)
|
||||
Dim DSSelected As New DataSet("Valueselected")
|
||||
Select Case m_sDatenherkunft
|
||||
Case "&Partner&"
|
||||
Panel2.Width = 0
|
||||
Me.tlbValueSelect.Buttons(2).Enabled = True
|
||||
Me.tlbValueSelect.Buttons(2).Visible = True
|
||||
Case Else
|
||||
Me.tlbValueSelect.Buttons(2).Enabled = False
|
||||
Me.tlbValueSelect.Buttons(2).Visible = False
|
||||
grdValue.Dock = DockStyle.Fill
|
||||
grdValue.Visible = True
|
||||
grdValue.DataSource = Generic_Select()
|
||||
DS.Tables.Add(grdValue.DataSource)
|
||||
SpaltenTitel_Aktualisieren(DS, Me.grdValue)
|
||||
grdValue.Columns("aktiv").FilterText = True
|
||||
|
||||
End Select
|
||||
|
||||
CreateDatatablel()
|
||||
grdSelected.DataSource = dtSelected
|
||||
grdSelected.DataMember = dtSelected.TableName
|
||||
|
||||
DSSelected.Tables.Add(grdSelected.DataSource)
|
||||
Me.TableName = DSSelected.Tables(0).TableName
|
||||
SpaltenTitel_Aktualisieren(DSSelected, Me.grdSelected)
|
||||
Select Case m_sDatenherkunft
|
||||
Case "&Partner&"
|
||||
Me.Timer1.Enabled = True
|
||||
End Select
|
||||
Catch ex As Exception
|
||||
MsgBox(ex.Message)
|
||||
End Try
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
#End Region
|
||||
|
||||
#Region " Datenfunktionen "
|
||||
Private Sub FillProperty()
|
||||
'===============================================================================
|
||||
'Desc : Füllen der Property DislpayResult & NavigationResult
|
||||
'Erstellt : koe 10.11.2003
|
||||
'Geaendert :
|
||||
'===============================================================================
|
||||
Dim row As Long
|
||||
Dim iCnt As Integer
|
||||
Dim sDelimeter As String = ""
|
||||
m_sDislpayResult = ""
|
||||
m_sNavigationResult = ""
|
||||
For iCnt = 0 To grdSelected.Splits(0).Rows.Count - 1
|
||||
Me.m_sDislpayResult = Me.m_sDislpayResult & sDelimeter & Me.grdSelected.Columns(1).CellText(iCnt)
|
||||
Me.m_sNavigationResult = Me.m_sNavigationResult & sDelimeter & Me.grdSelected.Columns(0).CellText(iCnt)
|
||||
sDelimeter = ";"
|
||||
Next
|
||||
|
||||
End Sub
|
||||
|
||||
Private Function Generic_Select() As DataTable
|
||||
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
|
||||
Dim dtToReturn As DataTable
|
||||
|
||||
Select Case m_iSelectionType
|
||||
Case Enum_SelelectType.ValueSelect
|
||||
scmCmdToExecute.CommandText = "dbo.SP_ValueSelect"
|
||||
Case Else
|
||||
MyMsg.show_standardmessage(209, MsgBoxStyle.Information)
|
||||
Exit Function
|
||||
End Select
|
||||
scmCmdToExecute.CommandType = CommandType.StoredProcedure
|
||||
'Dim dtToReturn As DataTable = New DataTable(Me.TableName)
|
||||
dtToReturn = New DataTable(Me.TableName)
|
||||
Dim sdaAdapter As SqlDataAdapter = New SqlDataAdapter(scmCmdToExecute)
|
||||
|
||||
scmCmdToExecute.Connection = conn.scoDBConnection
|
||||
Try
|
||||
scmCmdToExecute.Parameters.Clear()
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@Datenherkunft", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, Me.Datenherkunft))
|
||||
sdaAdapter.Fill(dtToReturn)
|
||||
'sdaAdapter.Fill(dtToReturn)
|
||||
Return dtToReturn
|
||||
Catch ex As Exception
|
||||
' // some error occured. Bubble it to caller and encapsulate Exception object
|
||||
Throw New Exception("SelectValue::Generic_Select::" & scmCmdToExecute.CommandText & "::Error occured." & ex.Message, ex)
|
||||
Finally
|
||||
scmCmdToExecute.Dispose()
|
||||
sdaAdapter.Dispose()
|
||||
End Try
|
||||
End Function
|
||||
|
||||
#End Region
|
||||
|
||||
#Region " Command Controlsfunction"
|
||||
Private Sub cmdOk_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
|
||||
FillProperty()
|
||||
Me.DialogResult = DialogResult.OK
|
||||
Me.Close()
|
||||
End Sub
|
||||
|
||||
Private Sub cmdCancel_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
|
||||
Me.DialogResult = DialogResult.Cancel
|
||||
Me.Close()
|
||||
End Sub
|
||||
|
||||
Private Sub grdSelected_DoubleClick(ByVal sender As Object, ByVal e As System.EventArgs) Handles grdSelected.DoubleClick
|
||||
grdSelected.Delete()
|
||||
End Sub
|
||||
|
||||
Private Sub grdValue_DoubleClick(ByVal sender As Object, ByVal e As System.EventArgs) Handles grdValue.DoubleClick
|
||||
AddToSelectetd()
|
||||
End Sub
|
||||
|
||||
Private Sub PartnerList_DoubleClick(ByVal sender As System.Object, ByVal e As System.EventArgs)
|
||||
AddToSelectetd()
|
||||
End Sub
|
||||
|
||||
Private Sub tlbValueSelect_ButtonClick(ByVal sender As System.Object, ByVal e As System.Windows.Forms.ToolBarButtonClickEventArgs) Handles tlbValueSelect.ButtonClick
|
||||
Select Case tlbValueSelect.Buttons.IndexOf(e.Button)
|
||||
Case 0 'close Exit
|
||||
Me.DialogResult = DialogResult.Cancel
|
||||
Me.Close()
|
||||
|
||||
Case 1 'Uebernehnmen
|
||||
FillProperty()
|
||||
Me.DialogResult = DialogResult.OK
|
||||
Me.Close()
|
||||
Case 2 'Partnersuche
|
||||
Me.PartnerSearch.NoClose = True
|
||||
Me.PartnerSearch.TopMost = True
|
||||
Me.PartnerSearch.Show()
|
||||
|
||||
End Select
|
||||
End Sub
|
||||
|
||||
Private Sub grdSelected_MouseDown(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles grdSelected.MouseDown
|
||||
If e.X < 2 And e.Y < 2 Then
|
||||
MsgBox(dtSelected.TableName)
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub grdValue_MouseDown(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles grdValue.MouseDown
|
||||
If e.X < 2 And e.Y < 2 Then
|
||||
MsgBox(Me.TableName)
|
||||
End If
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
|
||||
#Region " Extra Funktionen "
|
||||
|
||||
Private Sub AddToSelectetd()
|
||||
'*********************************************************************************************************************
|
||||
'Description: Datensattz in das Grid selected übenehmen
|
||||
'Input:
|
||||
'Criteria:
|
||||
'Output:
|
||||
'Erstellt : koe 11.01.2004
|
||||
'Geaendert:
|
||||
'*********************************************************************************************************************
|
||||
Dim rc As DataRowCollection
|
||||
Dim newrow As DataRow()
|
||||
Dim rowvals(1) As Object
|
||||
Dim iCount As Integer
|
||||
|
||||
Select Case m_sDatenherkunft
|
||||
Case "&Mitarbeiter&"
|
||||
With grdSelected
|
||||
For iCount = 0 To .Splits(0).Rows.Count - 1
|
||||
If grdValue.Columns(1).Text = .Columns(1).CellValue(iCount) Then
|
||||
Exit Sub
|
||||
End If
|
||||
Next
|
||||
End With
|
||||
rowvals(0) = grdValue.Columns(0).Text
|
||||
rowvals(1) = grdValue.Columns("Nachname").Text
|
||||
Case "&Partner&"
|
||||
With grdSelected
|
||||
For iCount = 0 To .Splits(0).Rows.Count - 1
|
||||
If Me.PartnerSearch.PartnerKurzbezeichnnung = .Columns(1).CellValue(iCount) Then
|
||||
Exit Sub
|
||||
End If
|
||||
Next
|
||||
End With
|
||||
rowvals(0) = Me.PartnerSearch.PartnerNr
|
||||
rowvals(1) = Me.PartnerSearch.PartnerKurzbezeichnnung
|
||||
|
||||
Case Else
|
||||
With grdSelected
|
||||
For iCount = 0 To .Splits(0).Rows.Count - 1
|
||||
If grdValue.Columns(1).Text = .Columns("Bezeichnung").CellValue(iCount) Then
|
||||
Exit Sub
|
||||
End If
|
||||
Next
|
||||
End With
|
||||
rowvals(0) = grdValue.Columns(0).Text
|
||||
rowvals(1) = grdValue.Columns("Bezeichnung").Text
|
||||
End Select
|
||||
dtSelected.Rows.Add(rowvals)
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub CreateDatatablel()
|
||||
Dim rc As DataRowCollection
|
||||
Dim newrow As DataRow()
|
||||
Dim sDisplayResult() As String
|
||||
Dim sNavigationResult() As String
|
||||
Dim rowvals(1) As Object
|
||||
Dim iCount As Integer
|
||||
Select Case m_sDatenherkunft
|
||||
Case "&Mitarbeiter&"
|
||||
With dtSelected
|
||||
.Columns.Add("ID")
|
||||
.Columns.Add("Bezeichnung")
|
||||
End With
|
||||
Case Else
|
||||
With dtSelected
|
||||
.Columns.Add("ID")
|
||||
.Columns.Add("Bezeichnung")
|
||||
End With
|
||||
End Select
|
||||
|
||||
rc = dtSelected.Rows
|
||||
sDisplayResult = Split(m_sDislpayResult, ";")
|
||||
sNavigationResult = Split(m_sNavigationResult, ";")
|
||||
|
||||
If UBound(sNavigationResult) > 0 Then
|
||||
For iCount = 0 To UBound(sNavigationResult)
|
||||
rowvals(0) = sNavigationResult(iCount)
|
||||
rowvals(1) = sDisplayResult(iCount)
|
||||
dtSelected.Rows.Add(rowvals)
|
||||
Next
|
||||
Else
|
||||
If m_sNavigationResult <> "" Then
|
||||
rowvals(0) = m_sNavigationResult
|
||||
rowvals(1) = m_sDislpayResult
|
||||
dtSelected.Rows.Add(rowvals)
|
||||
End If
|
||||
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub InsertPartner() Handles PartnerSearch.partner_selected
|
||||
'*********************************************************************************************************************
|
||||
'Description: Wird aufgerufen, wenn aus der Partnerwahl ein Record übernommen wird
|
||||
'Input:
|
||||
'Criteria:
|
||||
'Output:
|
||||
'Erstellt : koe 11.01.2004
|
||||
'Geaendert:
|
||||
'*********************************************************************************************************************
|
||||
'Dim msg As String
|
||||
'Dim fHinweis As New frmHinweismeldung()
|
||||
AddToSelectetd()
|
||||
'msg = MyTxt.Get_Meldungstext(216) '+ vbCrLf + vbCrLf + "Partner: " + Me.txtPartner + vbCrLf + "Dokument: " & Me.txtDokumenttyp
|
||||
'fHinweis.MsgBoxStyle = 1
|
||||
'fHinweis.Label1.Text = msg
|
||||
'fHinweis.CheckBox1.Visible = False
|
||||
'fHinweis.Show()
|
||||
'fHinweis.TopMost = True
|
||||
'Me.timHinweismeldung.Enabled = True
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub Timer1_Tick(ByVal sender As Object, ByVal e As System.EventArgs) Handles Timer1.Tick
|
||||
Me.Timer1.Enabled = False
|
||||
Me.PartnerSearch.NoClose = True
|
||||
Me.PartnerSearch.TopMost = True
|
||||
Me.PartnerSearch.Show()
|
||||
|
||||
End Sub
|
||||
|
||||
Public Sub SpaltenTitel_Aktualisieren(ByVal ds As DataSet, ByRef grd As C1.Win.C1TrueDBGrid.C1TrueDBGrid)
|
||||
|
||||
'Spaltentitel setzen
|
||||
Dim titel As New EDOKA.MySpaltenTitel()
|
||||
Dim cols(grd.Splits(0).DisplayColumns.Count) As C1.Win.C1TrueDBGrid.C1DisplayColumn
|
||||
Dim ts As New EDOKA.Tabellenspalte()
|
||||
Dim i As Integer
|
||||
Dim t As New DataTable()
|
||||
Dim dc As C1.Win.C1TrueDBGrid.C1DisplayColumn
|
||||
Dim s As String
|
||||
|
||||
Dim DisplayColumnsCount As Integer
|
||||
Dim aSpalten(0, 0) As C1.Win.C1TrueDBGrid.C1DisplayColumn
|
||||
Dim Reihe As C1.Win.C1TrueDBGrid.C1DisplayColumn
|
||||
Dim iMaxSortOrderValue As Integer = 0
|
||||
Dim dsMaxSortOrder As New DataSet()
|
||||
Dim bSetNewSortOrder As Boolean = True
|
||||
Dim iSpaltenOffset As Integer = 0 'Offset wenn Nothing in Array
|
||||
|
||||
'============ Bestimmt Anzahl Displaycolumn und MaxValue Sortorder
|
||||
'Dim ssql As String
|
||||
'ssql = "SELECT MAX(Reihenfolge) AS MaxSortOrder FROM spalten WHERE tabelle = '" & Me.TableName & "'"
|
||||
Dim daMaxSortOrder As New SqlDataAdapter("SELECT MAX(Reihenfolge) AS MaxSortOrder FROM spalten WHERE tabelle = '" & Me.TableName & "'", Globals.sConnectionString)
|
||||
Try
|
||||
daMaxSortOrder.Fill(dsMaxSortOrder)
|
||||
DisplayColumnsCount = grd.Splits(0).DisplayColumns.Count - 1
|
||||
iMaxSortOrderValue = dsMaxSortOrder.Tables(0).Rows(0).Item(0)
|
||||
ReDim aSpalten(iMaxSortOrderValue - 1, 0) 'Array für Anzahlen definieren
|
||||
|
||||
t = ds.Tables(0)
|
||||
ts.Tabelle = Me.TableName
|
||||
For i = 0 To grd.Columns.Count - 1
|
||||
s = grd.Columns(i).DataField
|
||||
ts.Feld = s
|
||||
ts.getspalte()
|
||||
grd.Columns(i).Caption = ts.spaltenname
|
||||
If ts.ColWith = 0 Then
|
||||
grd.Splits(0).DisplayColumns(i).Width = 0
|
||||
grd.Splits(0).DisplayColumns(i).Visible = False
|
||||
Else
|
||||
grd.Splits(0).DisplayColumns(i).Width = ts.ColWith
|
||||
End If
|
||||
|
||||
'If grd.Columns(i).Caption = "" Then
|
||||
' 'grd.Splits(0).DisplayColumns(i).Visible = False
|
||||
' grd.Splits(0).DisplayColumns(i).Width = 0
|
||||
' 'grd.Columns(i).Caption = grd.Columns(i).DataField
|
||||
'Else
|
||||
' grd.Splits(0).DisplayColumns(i).Width = ts.ColWith
|
||||
'End If
|
||||
If ts.locked Then
|
||||
grd.Splits(0).DisplayColumns(i).Locked = True
|
||||
End If
|
||||
|
||||
If ts.AlsHacken Then
|
||||
grd.Columns(i).ValueItems.Presentation = C1.Win.C1TrueDBGrid.PresentationEnum.CheckBox
|
||||
End If
|
||||
|
||||
'Präsentation von aktiv
|
||||
If grd.Columns(i).DataField = "aktiv" Then
|
||||
grd.Columns(i).ValueItems.Presentation = C1.Win.C1TrueDBGrid.PresentationEnum.CheckBox
|
||||
grd.Columns(i).ValueItems.DefaultItem = True
|
||||
grd.Columns(i).DefaultValue = True
|
||||
grd.Columns(i).FilterText = True
|
||||
End If
|
||||
If grd.Columns(i).DataField = "erstellt_am" Then
|
||||
grd.Columns(i).DefaultValue = Now
|
||||
End If
|
||||
|
||||
|
||||
'============ Aktuelle Spalte in ArraySpalten schreiben
|
||||
'============ Sortorder darf nicht 0 sein
|
||||
If iMaxSortOrderValue > 0 Then
|
||||
If ts.Order = 0 Then
|
||||
MessageBox.Show("Fehler Reihenfolge" & vbCrLf & "Tabelle " & Me.TableName & vbCrLf & "Spalte " & s & vbCrLf & "Sortierreihenfolge mit dem Wert 0 sind nicht erlaubt!" & vbCrLf & "Prüfen Sie die Reihenfolge der Tabelle " & Me.TableName & " in der Systemadministration Spalten", "Sortierreihenfolge 0", MessageBoxButtons.OK, MessageBoxIcon.Information, MessageBoxDefaultButton.Button1)
|
||||
Else
|
||||
Reihe = grd.Splits(0).DisplayColumns(i)
|
||||
If Not aSpalten(ts.Order - 1, 0) Is Nothing Then
|
||||
'============ Arrayplatz bereits bleget
|
||||
' MessageBox.Show("Doppelte Sortier-Nummer!" & vbCrLf & "Tabelle " & Me.TableName & vbCrLf & "Spalte " & s & vbCrLf & "Prüfen Sie die Sortierreihenfoge der Tabelle " & Me.TableName & " in der Systemadministration Spalten!", MessageBoxButtons.OK, "Sortierreihenfolge ", MessageBoxIcon.Information, MessageBoxDefaultButton.Button1)
|
||||
MessageBox.Show("Doppelte Sortier-Nummer!" & vbCrLf & "Tabelle " & Me.TableName & vbCrLf & "Spalte " & s & vbCrLf & "Sortierreihenfolge mit 2 gleichen Werten sind nicht erlaubt!" & vbCrLf & "Prüfen Sie die Reihenfolge der Tabelle " & Me.TableName & " in der Systemadministration Spalten", "Doppelte Sortier-Nummer " & ts.Order, MessageBoxButtons.OK, MessageBoxIcon.Information, MessageBoxDefaultButton.Button1)
|
||||
'bSetNewSortOrder = False
|
||||
End If
|
||||
If ts.Order > 0 And aSpalten(ts.Order - 1, 0) Is Nothing Then
|
||||
'============ Aktuelle Spalte in ArraySpalten schreiben
|
||||
aSpalten(ts.Order - 1, 0) = Reihe
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
Next
|
||||
|
||||
If iMaxSortOrderValue > 0 And bSetNewSortOrder = True Then
|
||||
'===============================================================================
|
||||
'Wenn in der Sortierreihenfoge keine 0 steht werden die Spalten neu Sortiert
|
||||
'===============================================================================
|
||||
Try
|
||||
'============ Spalten löschen
|
||||
For i = 0 To DisplayColumnsCount
|
||||
grd.Splits(0).DisplayColumns.RemoveAt(0)
|
||||
Next
|
||||
Catch
|
||||
End Try
|
||||
'============ Spalten nachh Sortorder einfügen
|
||||
For i = 0 To iMaxSortOrderValue - 1
|
||||
Try
|
||||
If Not aSpalten(i, 0) Is Nothing Then
|
||||
If aSpalten(i, 0).Width > 0 Then
|
||||
grd.Splits(0).DisplayColumns.Insert(i - iSpaltenOffset, aSpalten(i, 0))
|
||||
Else
|
||||
iSpaltenOffset += 1
|
||||
End If
|
||||
Else
|
||||
iSpaltenOffset += 1
|
||||
End If
|
||||
Catch ex As Exception
|
||||
MsgBox(ex.Message)
|
||||
End Try
|
||||
|
||||
Next
|
||||
End If
|
||||
dsMaxSortOrder = Nothing
|
||||
daMaxSortOrder = Nothing
|
||||
|
||||
Catch ex As Exception
|
||||
MsgBox(ex.Message)
|
||||
End Try
|
||||
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
End Class
|
||||
Reference in New Issue
Block a user