You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
206 lines
10 KiB
206 lines
10 KiB
Imports System.Data
|
|
Imports System.Data.SqlTypes
|
|
Imports System.Data.SqlClient
|
|
Imports System.ComponentModel
|
|
Imports System.Drawing
|
|
Imports System.Drawing.Color
|
|
|
|
Public Class frmRevision
|
|
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 ToolBar1 As System.Windows.Forms.ToolBar
|
|
Friend WithEvents ImageList1 As System.Windows.Forms.ImageList
|
|
Friend WithEvents ToolBarButton1 As System.Windows.Forms.ToolBarButton
|
|
Friend WithEvents ToolBarButton2 As System.Windows.Forms.ToolBarButton
|
|
Friend WithEvents DokList As C1.Win.C1TrueDBGrid.C1TrueDBGrid
|
|
<System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()
|
|
Me.components = New System.ComponentModel.Container()
|
|
Dim resources As System.Resources.ResourceManager = New System.Resources.ResourceManager(GetType(frmRevision))
|
|
Dim GridLines1 As C1.Win.C1TrueDBGrid.Util.GridLines = New C1.Win.C1TrueDBGrid.Util.GridLines()
|
|
Me.ToolBar1 = New System.Windows.Forms.ToolBar()
|
|
Me.ToolBarButton1 = New System.Windows.Forms.ToolBarButton()
|
|
Me.ToolBarButton2 = New System.Windows.Forms.ToolBarButton()
|
|
Me.ImageList1 = New System.Windows.Forms.ImageList(Me.components)
|
|
Me.DokList = New C1.Win.C1TrueDBGrid.C1TrueDBGrid()
|
|
CType(Me.DokList, System.ComponentModel.ISupportInitialize).BeginInit()
|
|
Me.SuspendLayout()
|
|
'
|
|
'ToolBar1
|
|
'
|
|
Me.ToolBar1.Buttons.AddRange(New System.Windows.Forms.ToolBarButton() {Me.ToolBarButton1, Me.ToolBarButton2})
|
|
Me.ToolBar1.DropDownArrows = True
|
|
Me.ToolBar1.ImageList = Me.ImageList1
|
|
Me.ToolBar1.Name = "ToolBar1"
|
|
Me.ToolBar1.ShowToolTips = True
|
|
Me.ToolBar1.Size = New System.Drawing.Size(776, 25)
|
|
Me.ToolBar1.TabIndex = 0
|
|
'
|
|
'ToolBarButton1
|
|
'
|
|
Me.ToolBarButton1.ImageIndex = 0
|
|
'
|
|
'ToolBarButton2
|
|
'
|
|
Me.ToolBarButton2.ImageIndex = 1
|
|
'
|
|
'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
|
|
'
|
|
'DokList
|
|
'
|
|
Me.DokList.AllowFilter = True
|
|
Me.DokList.AllowRowSizing = C1.Win.C1TrueDBGrid.RowSizingEnum.AllRows
|
|
Me.DokList.AllowSort = True
|
|
Me.DokList.AllowUpdate = False
|
|
Me.DokList.AllowUpdateOnBlur = False
|
|
Me.DokList.AlternatingRows = True
|
|
Me.DokList.CaptionHeight = 17
|
|
Me.DokList.CollapseColor = System.Drawing.Color.Black
|
|
Me.DokList.Cursor = System.Windows.Forms.Cursors.Default
|
|
Me.DokList.DataChanged = False
|
|
Me.DokList.DeadAreaBackColor = System.Drawing.Color.Empty
|
|
Me.DokList.Dock = System.Windows.Forms.DockStyle.Fill
|
|
Me.DokList.ExpandColor = System.Drawing.Color.Black
|
|
Me.DokList.FetchRowStyles = True
|
|
Me.DokList.FilterBar = True
|
|
Me.DokList.GroupByCaption = "Drag a column header here to group by that column"
|
|
Me.DokList.Images.Add(CType(resources.GetObject("resource.Images"), System.Drawing.Bitmap))
|
|
Me.DokList.Location = New System.Drawing.Point(0, 25)
|
|
Me.DokList.MarqueeStyle = C1.Win.C1TrueDBGrid.MarqueeEnum.DottedCellBorder
|
|
Me.DokList.Name = "DokList"
|
|
Me.DokList.PreviewInfo.Location = New System.Drawing.Point(0, 0)
|
|
Me.DokList.PreviewInfo.Size = New System.Drawing.Size(0, 0)
|
|
Me.DokList.PreviewInfo.ZoomFactor = 75
|
|
Me.DokList.PrintInfo.ShowOptionsDialog = False
|
|
Me.DokList.RecordSelectorWidth = 16
|
|
GridLines1.Color = System.Drawing.Color.DarkGray
|
|
GridLines1.Style = C1.Win.C1TrueDBGrid.LineStyleEnum.Single
|
|
Me.DokList.RowDivider = GridLines1
|
|
Me.DokList.RowHeight = 15
|
|
Me.DokList.RowSubDividerColor = System.Drawing.Color.DarkGray
|
|
Me.DokList.ScrollTips = True
|
|
Me.DokList.Size = New System.Drawing.Size(776, 436)
|
|
Me.DokList.TabIndex = 26
|
|
Me.DokList.Text = "C1TrueDBGrid1"
|
|
Me.DokList.PropBag = "<?xml version=""1.0""?><Blob><Styles type=""C1.Win.C1TrueDBGrid.Design.ContextWrappe" & _
|
|
"r""><Data>Style11{}Style12{}Style13{}Style5{}Style4{}Style7{}Style6{}EvenRow{Back" & _
|
|
"Color:White;}Selected{ForeColor:HighlightText;BackColor:Highlight;}Heading{Wrap:" & _
|
|
"True;AlignVert:Center;Border:Raised,,1, 1, 1, 1;ForeColor:ControlText;BackColor:" & _
|
|
"Control;}Inactive{ForeColor:InactiveCaptionText;BackColor:InactiveCaption;}Filte" & _
|
|
"rBar{BackColor:255, 255, 192;}OddRow{BackColor:224, 224, 224;}Footer{}Caption{Al" & _
|
|
"ignHorz:Center;}Style27{}Normal{BackColor:Control;}Style26{}HighlightRow{ForeCol" & _
|
|
"or:HighlightText;BackColor:Highlight;}Style10{AlignHorz:Near;}Editor{}RecordSele" & _
|
|
"ctor{AlignImage:Center;}Style9{}Style8{}Style3{}Style2{}Group{BackColor:ControlD" & _
|
|
"ark;Border:None,,0, 0, 0, 0;AlignVert:Center;}Style1{}</Data></Styles><Splits><C" & _
|
|
"1.Win.C1TrueDBGrid.MergeView Name="""" AlternatingRowStyle=""True"" CaptionHeight=""1" & _
|
|
"7"" ColumnCaptionHeight=""17"" ColumnFooterHeight=""17"" FetchRowStyles=""True"" Filter" & _
|
|
"Bar=""True"" MarqueeStyle=""DottedCellBorder"" RecordSelectorWidth=""16"" DefRecSelWid" & _
|
|
"th=""16"" VerticalScrollGroup=""1"" HorizontalScrollGroup=""1""><ClientRect>0, 0, 772," & _
|
|
" 432</ClientRect><BorderSide>0</BorderSide><CaptionStyle parent=""Heading"" me=""St" & _
|
|
"yle10"" /><EditorStyle parent=""Editor"" me=""Style2"" /><EvenRowStyle parent=""EvenRo" & _
|
|
"w"" me=""Style8"" /><FilterBarStyle parent=""FilterBar"" me=""Style27"" /><FooterStyle " & _
|
|
"parent=""Footer"" me=""Style4"" /><GroupStyle parent=""Group"" me=""Style12"" /><Heading" & _
|
|
"Style parent=""Heading"" me=""Style3"" /><HighLightRowStyle parent=""HighlightRow"" me" & _
|
|
"=""Style7"" /><InactiveStyle parent=""Inactive"" me=""Style6"" /><OddRowStyle parent=""" & _
|
|
"OddRow"" me=""Style9"" /><RecordSelectorStyle parent=""RecordSelector"" me=""Style11"" " & _
|
|
"/><SelectedStyle parent=""Selected"" me=""Style5"" /><Style parent=""Normal"" me=""Styl" & _
|
|
"e1"" /></C1.Win.C1TrueDBGrid.MergeView></Splits><NamedStyles><Style parent="""" me=" & _
|
|
"""Normal"" /><Style parent=""Normal"" me=""Heading"" /><Style parent=""Heading"" me=""Foo" & _
|
|
"ter"" /><Style parent=""Heading"" me=""Caption"" /><Style parent=""Heading"" me=""Inacti" & _
|
|
"ve"" /><Style parent=""Normal"" me=""Selected"" /><Style parent=""Normal"" me=""Editor"" " & _
|
|
"/><Style parent=""Normal"" me=""HighlightRow"" /><Style parent=""Normal"" me=""EvenRow""" & _
|
|
" /><Style parent=""Normal"" me=""OddRow"" /><Style parent=""Heading"" me=""RecordSelect" & _
|
|
"or"" /><Style parent=""Normal"" me=""FilterBar"" /><Style parent=""Caption"" me=""Group""" & _
|
|
" /></NamedStyles><vertSplits>1</vertSplits><horzSplits>1</horzSplits><Layout>Mod" & _
|
|
"ified</Layout><DefaultRecSelWidth>16</DefaultRecSelWidth><ClientArea>0, 0, 772, " & _
|
|
"432</ClientArea></Blob>"
|
|
'
|
|
'frmRevision
|
|
'
|
|
Me.AutoScaleBaseSize = New System.Drawing.Size(5, 13)
|
|
Me.ClientSize = New System.Drawing.Size(776, 461)
|
|
Me.Controls.AddRange(New System.Windows.Forms.Control() {Me.DokList, Me.ToolBar1})
|
|
Me.Icon = CType(resources.GetObject("$this.Icon"), System.Drawing.Icon)
|
|
Me.Name = "frmRevision"
|
|
Me.Text = "Revisionsdaten"
|
|
CType(Me.DokList, System.ComponentModel.ISupportInitialize).EndInit()
|
|
Me.ResumeLayout(False)
|
|
|
|
End Sub
|
|
|
|
#End Region
|
|
|
|
Private Sub frmRevision_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
|
|
Dim i As Integer
|
|
Me.DokList.DataSource = Generic_Select()
|
|
For i = 0 To Me.DokList.Splits(0).DisplayColumns.Count - 1
|
|
Me.DokList.Splits(0).DisplayColumns(i).AutoSize()
|
|
Next
|
|
|
|
End Sub
|
|
|
|
Private Function Generic_Select() As DataTable
|
|
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
|
|
scmCmdToExecute.CommandText = "dbo.SP_Revisionsjournal_select"
|
|
scmCmdToExecute.CommandType = CommandType.StoredProcedure
|
|
Dim dtToReturn As DataTable = New DataTable()
|
|
Dim sdaAdapter As SqlDataAdapter = New SqlDataAdapter(scmCmdToExecute)
|
|
scmCmdToExecute.Connection = conn.scoDBConnection
|
|
Try
|
|
sdaAdapter.Fill(dtToReturn)
|
|
Return dtToReturn
|
|
Catch ex As Exception
|
|
' // some error occured. Bubble it to caller and encapsulate Exception object
|
|
Throw New Exception("Dokumenterstellung::Generic_Select::" & scmCmdToExecute.CommandText & "::Error occured." & ex.Message, ex)
|
|
Finally
|
|
scmCmdToExecute.Dispose()
|
|
sdaAdapter.Dispose()
|
|
End Try
|
|
End Function
|
|
|
|
Private Sub ToolBar1_ButtonClick(ByVal sender As System.Object, ByVal e As System.Windows.Forms.ToolBarButtonClickEventArgs) Handles ToolBar1.ButtonClick
|
|
Select Case ToolBar1.Buttons.IndexOf(e.Button)
|
|
Case 0 'close button
|
|
Me.Close()
|
|
Case 1
|
|
Me.DokList.PrintInfo.PrintPreview()
|
|
Me.DokList.PrintInfo.PageSettings.Landscape = False
|
|
Me.DokList.PrintInfo.ShowProgressForm = True
|
|
Me.DokList.PrintInfo.ShowOptionsDialog = True
|
|
Case Else
|
|
End Select
|
|
End Sub
|
|
End Class
|