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.
189 lines
10 KiB
189 lines
10 KiB
Imports UtilityLibrary
|
|
Imports System.IO
|
|
Imports C1.Win.C1TrueDBGrid
|
|
Imports System.Data
|
|
Imports System.Data.SqlTypes
|
|
Imports System.Data.SqlClient
|
|
Imports System.ComponentModel
|
|
Imports UtilityLibrary.Win32
|
|
Public Class frmRestorJournal
|
|
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 C1TrueDBGrid1 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(frmRestorJournal))
|
|
Dim GridLines1 As C1.Win.C1TrueDBGrid.Util.GridLines = New C1.Win.C1TrueDBGrid.Util.GridLines()
|
|
Me.ToolBar1 = New System.Windows.Forms.ToolBar()
|
|
Me.ImageList1 = New System.Windows.Forms.ImageList(Me.components)
|
|
Me.ToolBarButton1 = New System.Windows.Forms.ToolBarButton()
|
|
Me.C1TrueDBGrid1 = New C1.Win.C1TrueDBGrid.C1TrueDBGrid()
|
|
CType(Me.C1TrueDBGrid1, System.ComponentModel.ISupportInitialize).BeginInit()
|
|
Me.SuspendLayout()
|
|
'
|
|
'ToolBar1
|
|
'
|
|
Me.ToolBar1.Buttons.AddRange(New System.Windows.Forms.ToolBarButton() {Me.ToolBarButton1})
|
|
Me.ToolBar1.DropDownArrows = True
|
|
Me.ToolBar1.ImageList = Me.ImageList1
|
|
Me.ToolBar1.Name = "ToolBar1"
|
|
Me.ToolBar1.ShowToolTips = True
|
|
Me.ToolBar1.Size = New System.Drawing.Size(536, 25)
|
|
Me.ToolBar1.TabIndex = 0
|
|
'
|
|
'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
|
|
'
|
|
'ToolBarButton1
|
|
'
|
|
Me.ToolBarButton1.ImageIndex = 0
|
|
'
|
|
'C1TrueDBGrid1
|
|
'
|
|
Me.C1TrueDBGrid1.AllowFilter = True
|
|
Me.C1TrueDBGrid1.AllowRowSizing = C1.Win.C1TrueDBGrid.RowSizingEnum.AllRows
|
|
Me.C1TrueDBGrid1.AllowSort = True
|
|
Me.C1TrueDBGrid1.CaptionHeight = 17
|
|
Me.C1TrueDBGrid1.CollapseColor = System.Drawing.Color.Black
|
|
Me.C1TrueDBGrid1.DataChanged = False
|
|
Me.C1TrueDBGrid1.DeadAreaBackColor = System.Drawing.Color.Empty
|
|
Me.C1TrueDBGrid1.Dock = System.Windows.Forms.DockStyle.Fill
|
|
Me.C1TrueDBGrid1.ExpandColor = System.Drawing.Color.Black
|
|
Me.C1TrueDBGrid1.GroupByCaption = "Drag a column header here to group by that column"
|
|
Me.C1TrueDBGrid1.Images.Add(CType(resources.GetObject("resource.Images"), System.Drawing.Bitmap))
|
|
Me.C1TrueDBGrid1.Location = New System.Drawing.Point(0, 25)
|
|
Me.C1TrueDBGrid1.MarqueeStyle = C1.Win.C1TrueDBGrid.MarqueeEnum.DottedCellBorder
|
|
Me.C1TrueDBGrid1.Name = "C1TrueDBGrid1"
|
|
Me.C1TrueDBGrid1.PreviewInfo.Location = New System.Drawing.Point(0, 0)
|
|
Me.C1TrueDBGrid1.PreviewInfo.Size = New System.Drawing.Size(0, 0)
|
|
Me.C1TrueDBGrid1.PreviewInfo.ZoomFactor = 75
|
|
Me.C1TrueDBGrid1.PrintInfo.ShowOptionsDialog = False
|
|
Me.C1TrueDBGrid1.RecordSelectorWidth = 16
|
|
GridLines1.Color = System.Drawing.Color.DarkGray
|
|
GridLines1.Style = C1.Win.C1TrueDBGrid.LineStyleEnum.Single
|
|
Me.C1TrueDBGrid1.RowDivider = GridLines1
|
|
Me.C1TrueDBGrid1.RowHeight = 15
|
|
Me.C1TrueDBGrid1.RowSubDividerColor = System.Drawing.Color.DarkGray
|
|
Me.C1TrueDBGrid1.ScrollTips = False
|
|
Me.C1TrueDBGrid1.Size = New System.Drawing.Size(536, 248)
|
|
Me.C1TrueDBGrid1.TabIndex = 1
|
|
Me.C1TrueDBGrid1.Text = "C1TrueDBGrid1"
|
|
Me.C1TrueDBGrid1.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:Aqua;}Selected{" & _
|
|
"ForeColor:HighlightText;BackColor:Highlight;}Style3{}Inactive{ForeColor:Inactive" & _
|
|
"CaptionText;BackColor:InactiveCaption;}FilterBar{}Footer{}Caption{AlignHorz:Cent" & _
|
|
"er;}Normal{}HighlightRow{ForeColor:HighlightText;BackColor:Highlight;}Style9{}Od" & _
|
|
"dRow{}RecordSelector{AlignImage:Center;}Heading{Wrap:True;AlignVert:Center;Borde" & _
|
|
"r:Raised,,1, 1, 1, 1;ForeColor:ControlText;BackColor:Control;}Style8{}Style10{Al" & _
|
|
"ignHorz:Near;}Style11{}Style12{}Style13{}Style1{}</Data></Styles><Splits><C1.Win" & _
|
|
".C1TrueDBGrid.MergeView Name="""" CaptionHeight=""17"" ColumnCaptionHeight=""17"" Colu" & _
|
|
"mnFooterHeight=""17"" MarqueeStyle=""DottedCellBorder"" RecordSelectorWidth=""16"" Def" & _
|
|
"RecSelWidth=""16"" VerticalScrollGroup=""1"" HorizontalScrollGroup=""1""><ClientRect>0" & _
|
|
", 0, 532, 244</ClientRect><BorderSide>0</BorderSide><CaptionStyle parent=""Style2" & _
|
|
""" me=""Style10"" /><EditorStyle parent=""Editor"" me=""Style5"" /><EvenRowStyle parent" & _
|
|
"=""EvenRow"" me=""Style8"" /><FilterBarStyle parent=""FilterBar"" me=""Style13"" /><Foot" & _
|
|
"erStyle parent=""Footer"" me=""Style3"" /><GroupStyle parent=""Group"" me=""Style12"" />" & _
|
|
"<HeadingStyle parent=""Heading"" me=""Style2"" /><HighLightRowStyle parent=""Highligh" & _
|
|
"tRow"" me=""Style7"" /><InactiveStyle parent=""Inactive"" me=""Style4"" /><OddRowStyle " & _
|
|
"parent=""OddRow"" me=""Style9"" /><RecordSelectorStyle parent=""RecordSelector"" me=""S" & _
|
|
"tyle11"" /><SelectedStyle parent=""Selected"" me=""Style6"" /><Style parent=""Normal"" " & _
|
|
"me=""Style1"" /></C1.Win.C1TrueDBGrid.MergeView></Splits><NamedStyles><Style paren" & _
|
|
"t="""" me=""Normal"" /><Style parent=""Normal"" me=""Heading"" /><Style parent=""Heading""" & _
|
|
" me=""Footer"" /><Style parent=""Heading"" me=""Caption"" /><Style parent=""Heading"" me" & _
|
|
"=""Inactive"" /><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=""Reco" & _
|
|
"rdSelector"" /><Style parent=""Normal"" me=""FilterBar"" /><Style parent=""Caption"" me" & _
|
|
"=""Group"" /></NamedStyles><vertSplits>1</vertSplits><horzSplits>1</horzSplits><La" & _
|
|
"yout>None</Layout><DefaultRecSelWidth>16</DefaultRecSelWidth><ClientArea>0, 0, 5" & _
|
|
"32, 244</ClientArea></Blob>"
|
|
'
|
|
'frmRestorJournal
|
|
'
|
|
Me.AutoScaleBaseSize = New System.Drawing.Size(5, 13)
|
|
Me.ClientSize = New System.Drawing.Size(536, 273)
|
|
Me.Controls.AddRange(New System.Windows.Forms.Control() {Me.C1TrueDBGrid1, Me.ToolBar1})
|
|
Me.Name = "frmRestorJournal"
|
|
Me.Text = "Journal Dokument-Restore"
|
|
CType(Me.C1TrueDBGrid1, System.ComponentModel.ISupportInitialize).EndInit()
|
|
Me.ResumeLayout(False)
|
|
|
|
End Sub
|
|
|
|
#End Region
|
|
|
|
Private Sub ToolBar1_ButtonClick(ByVal sender As System.Object, ByVal e As System.Windows.Forms.ToolBarButtonClickEventArgs) Handles ToolBar1.ButtonClick
|
|
Me.Close()
|
|
End Sub
|
|
|
|
Private Sub frmRestorJournal_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
|
|
Dim t As DataTable
|
|
Dim i As Integer
|
|
t = get_data()
|
|
Me.C1TrueDBGrid1.DataSource = t
|
|
Me.C1TrueDBGrid1.DataMember = t.TableName
|
|
For i = 0 To Me.C1TrueDBGrid1.Columns.Count - 1
|
|
Me.C1TrueDBGrid1.Splits(0).DisplayColumns(i).AutoSize()
|
|
Next
|
|
End Sub
|
|
|
|
Public Function get_data() As DataTable
|
|
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
|
|
Dim i As Integer
|
|
Dim dtToReturn As DataTable = New DataTable()
|
|
Dim sdaAdapter As SqlDataAdapter = New SqlDataAdapter(scmCmdToExecute)
|
|
scmCmdToExecute.CommandText = "dbo.sp_dokumentrestore"
|
|
scmCmdToExecute.CommandType = CommandType.StoredProcedure
|
|
scmCmdToExecute.Connection = conn.scoDBConnection
|
|
Try
|
|
scmCmdToExecute.Parameters.Add(New SqlParameter("@mitarbeiternr", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, 0))
|
|
scmCmdToExecute.Parameters.Add(New SqlParameter("@meldung", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, ""))
|
|
scmCmdToExecute.Parameters.Add(New SqlParameter("@fnkt", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, 2))
|
|
sdaAdapter.Fill(dtToReturn)
|
|
Return dtToReturn
|
|
Catch ex As Exception
|
|
MsgBox(ex.Message)
|
|
Throw New Exception("Dokument_Information_Wert::" & scmCmdToExecute.CommandText & "::Error occured." & ex.Message, ex)
|
|
Finally
|
|
scmCmdToExecute.Dispose()
|
|
sdaAdapter.Dispose()
|
|
End Try
|
|
End Function
|
|
End Class
|