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.
416 lines
25 KiB
416 lines
25 KiB
Imports System.IO
|
|
Imports C1.Win.C1TrueDBGrid
|
|
Imports System.Data
|
|
Imports System.Data.SqlTypes
|
|
Imports System.Data.SqlClient
|
|
Imports System.ComponentModel
|
|
|
|
Public Class frmDokumentInBearbeitung
|
|
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 SqlDataAdapter1 As System.Data.SqlClient.SqlDataAdapter
|
|
Friend WithEvents SqlConnection1 As System.Data.SqlClient.SqlConnection
|
|
Friend WithEvents ContextMenu1 As System.Windows.Forms.ContextMenu
|
|
Friend WithEvents MenuItem1 As System.Windows.Forms.MenuItem
|
|
Friend WithEvents MenuItem2 As System.Windows.Forms.MenuItem
|
|
Friend WithEvents ImageList1 As System.Windows.Forms.ImageList
|
|
Friend WithEvents SqlSelectCommand1 As System.Data.SqlClient.SqlCommand
|
|
Friend WithEvents SqlInsertCommand1 As System.Data.SqlClient.SqlCommand
|
|
Friend WithEvents SqlUpdateCommand1 As System.Data.SqlClient.SqlCommand
|
|
Friend WithEvents SqlDeleteCommand1 As System.Data.SqlClient.SqlCommand
|
|
Friend WithEvents MenuItem3 As System.Windows.Forms.MenuItem
|
|
Friend WithEvents MenuItem4 As System.Windows.Forms.MenuItem
|
|
Friend WithEvents ToolBar1 As System.Windows.Forms.ToolBar
|
|
Friend WithEvents DokList As C1.Win.C1TrueDBGrid.C1TrueDBGrid
|
|
Friend WithEvents ImageList2 As System.Windows.Forms.ImageList
|
|
Friend WithEvents ToolBarButton1 As System.Windows.Forms.ToolBarButton
|
|
Friend WithEvents TextBox1 As System.Windows.Forms.TextBox
|
|
Friend WithEvents TextBox2 As System.Windows.Forms.TextBox
|
|
<System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()
|
|
Me.components = New System.ComponentModel.Container()
|
|
Dim resources As System.Resources.ResourceManager = New System.Resources.ResourceManager(GetType(frmDokumentInBearbeitung))
|
|
Dim GridLines1 As C1.Win.C1TrueDBGrid.Util.GridLines = New C1.Win.C1TrueDBGrid.Util.GridLines()
|
|
Me.ContextMenu1 = New System.Windows.Forms.ContextMenu()
|
|
Me.MenuItem3 = New System.Windows.Forms.MenuItem()
|
|
Me.MenuItem4 = New System.Windows.Forms.MenuItem()
|
|
Me.MenuItem1 = New System.Windows.Forms.MenuItem()
|
|
Me.MenuItem2 = New System.Windows.Forms.MenuItem()
|
|
Me.SqlDataAdapter1 = New System.Data.SqlClient.SqlDataAdapter()
|
|
Me.SqlDeleteCommand1 = New System.Data.SqlClient.SqlCommand()
|
|
Me.SqlInsertCommand1 = New System.Data.SqlClient.SqlCommand()
|
|
Me.SqlSelectCommand1 = New System.Data.SqlClient.SqlCommand()
|
|
Me.SqlUpdateCommand1 = New System.Data.SqlClient.SqlCommand()
|
|
Me.SqlConnection1 = New System.Data.SqlClient.SqlConnection()
|
|
Me.ImageList1 = New System.Windows.Forms.ImageList(Me.components)
|
|
Me.ToolBar1 = New System.Windows.Forms.ToolBar()
|
|
Me.ToolBarButton1 = New System.Windows.Forms.ToolBarButton()
|
|
Me.DokList = New C1.Win.C1TrueDBGrid.C1TrueDBGrid()
|
|
Me.ImageList2 = New System.Windows.Forms.ImageList(Me.components)
|
|
Me.TextBox1 = New System.Windows.Forms.TextBox()
|
|
Me.TextBox2 = New System.Windows.Forms.TextBox()
|
|
CType(Me.DokList, System.ComponentModel.ISupportInitialize).BeginInit()
|
|
Me.SuspendLayout()
|
|
'
|
|
'ContextMenu1
|
|
'
|
|
Me.ContextMenu1.MenuItems.AddRange(New System.Windows.Forms.MenuItem() {Me.MenuItem3, Me.MenuItem4, Me.MenuItem1, Me.MenuItem2})
|
|
'
|
|
'MenuItem3
|
|
'
|
|
Me.MenuItem3.Index = 0
|
|
Me.MenuItem3.Text = "&Dokument anzeigen"
|
|
'
|
|
'MenuItem4
|
|
'
|
|
Me.MenuItem4.Index = 1
|
|
Me.MenuItem4.Text = "-"
|
|
'
|
|
'MenuItem1
|
|
'
|
|
Me.MenuItem1.Index = 2
|
|
Me.MenuItem1.Shortcut = System.Windows.Forms.Shortcut.Del
|
|
Me.MenuItem1.Text = "&Eintrag löschen"
|
|
'
|
|
'MenuItem2
|
|
'
|
|
Me.MenuItem2.Index = 3
|
|
Me.MenuItem2.Shortcut = System.Windows.Forms.Shortcut.F5
|
|
Me.MenuItem2.Text = "&Aktualisieren"
|
|
'
|
|
'SqlDataAdapter1
|
|
'
|
|
Me.SqlDataAdapter1.DeleteCommand = Me.SqlDeleteCommand1
|
|
Me.SqlDataAdapter1.InsertCommand = Me.SqlInsertCommand1
|
|
Me.SqlDataAdapter1.SelectCommand = Me.SqlSelectCommand1
|
|
Me.SqlDataAdapter1.TableMappings.AddRange(New System.Data.Common.DataTableMapping() {New System.Data.Common.DataTableMapping("Table", "dokinbearbeitung", New System.Data.Common.DataColumnMapping() {New System.Data.Common.DataColumnMapping("dokumentid", "dokumentid"), New System.Data.Common.DataColumnMapping("mitarbeiternr", "mitarbeiternr"), New System.Data.Common.DataColumnMapping("datum", "datum"), New System.Data.Common.DataColumnMapping("erstellung", "erstellung")})})
|
|
Me.SqlDataAdapter1.UpdateCommand = Me.SqlUpdateCommand1
|
|
'
|
|
'SqlDeleteCommand1
|
|
'
|
|
Me.SqlDeleteCommand1.CommandText = "[NewDeleteCommand]"
|
|
Me.SqlDeleteCommand1.CommandType = System.Data.CommandType.StoredProcedure
|
|
Me.SqlDeleteCommand1.Parameters.Add(New System.Data.SqlClient.SqlParameter("@RETURN_VALUE", System.Data.SqlDbType.Int, 4, System.Data.ParameterDirection.ReturnValue, False, CType(0, Byte), CType(0, Byte), "", System.Data.DataRowVersion.Current, Nothing))
|
|
Me.SqlDeleteCommand1.Parameters.Add(New System.Data.SqlClient.SqlParameter("@Original_dokumentid", System.Data.SqlDbType.VarChar, 22, System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0, Byte), "dokumentid", System.Data.DataRowVersion.Original, Nothing))
|
|
Me.SqlDeleteCommand1.Parameters.Add(New System.Data.SqlClient.SqlParameter("@Original_datum", System.Data.SqlDbType.DateTime, 8, System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0, Byte), "datum", System.Data.DataRowVersion.Original, Nothing))
|
|
Me.SqlDeleteCommand1.Parameters.Add(New System.Data.SqlClient.SqlParameter("@Original_erstellung", System.Data.SqlDbType.Bit, 1, System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0, Byte), "erstellung", System.Data.DataRowVersion.Original, Nothing))
|
|
Me.SqlDeleteCommand1.Parameters.Add(New System.Data.SqlClient.SqlParameter("@Original_mitarbeiternr", System.Data.SqlDbType.Int, 4, System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0, Byte), "mitarbeiternr", System.Data.DataRowVersion.Original, Nothing))
|
|
'
|
|
'SqlInsertCommand1
|
|
'
|
|
Me.SqlInsertCommand1.CommandText = "[NewInsertCommand]"
|
|
Me.SqlInsertCommand1.CommandType = System.Data.CommandType.StoredProcedure
|
|
Me.SqlInsertCommand1.Parameters.Add(New System.Data.SqlClient.SqlParameter("@RETURN_VALUE", System.Data.SqlDbType.Int, 4, System.Data.ParameterDirection.ReturnValue, False, CType(0, Byte), CType(0, Byte), "", System.Data.DataRowVersion.Current, Nothing))
|
|
Me.SqlInsertCommand1.Parameters.Add(New System.Data.SqlClient.SqlParameter("@dokumentid", System.Data.SqlDbType.VarChar, 22, "dokumentid"))
|
|
Me.SqlInsertCommand1.Parameters.Add(New System.Data.SqlClient.SqlParameter("@mitarbeiternr", System.Data.SqlDbType.Int, 4, "mitarbeiternr"))
|
|
Me.SqlInsertCommand1.Parameters.Add(New System.Data.SqlClient.SqlParameter("@datum", System.Data.SqlDbType.DateTime, 8, "datum"))
|
|
Me.SqlInsertCommand1.Parameters.Add(New System.Data.SqlClient.SqlParameter("@erstellung", System.Data.SqlDbType.Bit, 1, "erstellung"))
|
|
'
|
|
'SqlSelectCommand1
|
|
'
|
|
Me.SqlSelectCommand1.CommandText = "[pv_docsinbearbeitung_select]"
|
|
Me.SqlSelectCommand1.CommandType = System.Data.CommandType.StoredProcedure
|
|
Me.SqlSelectCommand1.Parameters.Add(New System.Data.SqlClient.SqlParameter("@RETURN_VALUE", System.Data.SqlDbType.Int, 4, System.Data.ParameterDirection.ReturnValue, False, CType(0, Byte), CType(0, Byte), "", System.Data.DataRowVersion.Current, Nothing))
|
|
'
|
|
'SqlUpdateCommand1
|
|
'
|
|
Me.SqlUpdateCommand1.CommandText = "[NewUpdateCommand]"
|
|
Me.SqlUpdateCommand1.CommandType = System.Data.CommandType.StoredProcedure
|
|
Me.SqlUpdateCommand1.Parameters.Add(New System.Data.SqlClient.SqlParameter("@RETURN_VALUE", System.Data.SqlDbType.Int, 4, System.Data.ParameterDirection.ReturnValue, False, CType(0, Byte), CType(0, Byte), "", System.Data.DataRowVersion.Current, Nothing))
|
|
Me.SqlUpdateCommand1.Parameters.Add(New System.Data.SqlClient.SqlParameter("@dokumentid", System.Data.SqlDbType.VarChar, 22, "dokumentid"))
|
|
Me.SqlUpdateCommand1.Parameters.Add(New System.Data.SqlClient.SqlParameter("@mitarbeiternr", System.Data.SqlDbType.Int, 4, "mitarbeiternr"))
|
|
Me.SqlUpdateCommand1.Parameters.Add(New System.Data.SqlClient.SqlParameter("@datum", System.Data.SqlDbType.DateTime, 8, "datum"))
|
|
Me.SqlUpdateCommand1.Parameters.Add(New System.Data.SqlClient.SqlParameter("@erstellung", System.Data.SqlDbType.Bit, 1, "erstellung"))
|
|
Me.SqlUpdateCommand1.Parameters.Add(New System.Data.SqlClient.SqlParameter("@Original_dokumentid", System.Data.SqlDbType.VarChar, 22, System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0, Byte), "dokumentid", System.Data.DataRowVersion.Original, Nothing))
|
|
Me.SqlUpdateCommand1.Parameters.Add(New System.Data.SqlClient.SqlParameter("@Original_datum", System.Data.SqlDbType.DateTime, 8, System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0, Byte), "datum", System.Data.DataRowVersion.Original, Nothing))
|
|
Me.SqlUpdateCommand1.Parameters.Add(New System.Data.SqlClient.SqlParameter("@Original_erstellung", System.Data.SqlDbType.Bit, 1, System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0, Byte), "erstellung", System.Data.DataRowVersion.Original, Nothing))
|
|
Me.SqlUpdateCommand1.Parameters.Add(New System.Data.SqlClient.SqlParameter("@Original_mitarbeiternr", System.Data.SqlDbType.Int, 4, System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0, Byte), "mitarbeiternr", System.Data.DataRowVersion.Original, Nothing))
|
|
'
|
|
'SqlConnection1
|
|
'
|
|
Me.SqlConnection1.ConnectionString = "data source=shu;initial catalog=edoka_tkb;integrated security=SSPI;persist securi" & _
|
|
"ty info=False;workstation id=SHU;packet size=4096"
|
|
'
|
|
'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
|
|
'
|
|
'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(776, 25)
|
|
Me.ToolBar1.TabIndex = 13
|
|
'
|
|
'ToolBarButton1
|
|
'
|
|
Me.ToolBarButton1.ImageIndex = 0
|
|
'
|
|
'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.ContextMenu = Me.ContextMenu1
|
|
Me.DokList.DataChanged = False
|
|
Me.DokList.DeadAreaBackColor = System.Drawing.Color.Empty
|
|
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 = False
|
|
Me.DokList.Size = New System.Drawing.Size(776, 391)
|
|
Me.DokList.TabIndex = 14
|
|
Me.DokList.Text = "C1TrueDBGrid1"
|
|
Me.DokList.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{BackColor:Control;}HighlightRow{ForeColor:Hi" & _
|
|
"ghlightText;BackColor:Highlight;}Style9{}OddRow{BackColor:224, 224, 224;}RecordS" & _
|
|
"elector{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"" ColumnCaptionHe" & _
|
|
"ight=""17"" ColumnFooterHeight=""17"" FetchRowStyles=""True"" FilterBar=""True"" Marquee" & _
|
|
"Style=""DottedCellBorder"" RecordSelectorWidth=""16"" DefRecSelWidth=""16"" VerticalSc" & _
|
|
"rollGroup=""1"" HorizontalScrollGroup=""1""><ClientRect>0, 0, 772, 387</ClientRect><" & _
|
|
"BorderSide>0</BorderSide><CaptionStyle parent=""Style2"" me=""Style10"" /><EditorSty" & _
|
|
"le parent=""Editor"" me=""Style5"" /><EvenRowStyle parent=""EvenRow"" me=""Style8"" /><F" & _
|
|
"ilterBarStyle parent=""FilterBar"" me=""Style13"" /><FooterStyle parent=""Footer"" me=" & _
|
|
"""Style3"" /><GroupStyle parent=""Group"" me=""Style12"" /><HeadingStyle parent=""Headi" & _
|
|
"ng"" me=""Style2"" /><HighLightRowStyle parent=""HighlightRow"" me=""Style7"" /><Inacti" & _
|
|
"veStyle parent=""Inactive"" me=""Style4"" /><OddRowStyle parent=""OddRow"" me=""Style9""" & _
|
|
" /><RecordSelectorStyle parent=""RecordSelector"" me=""Style11"" /><SelectedStyle pa" & _
|
|
"rent=""Selected"" me=""Style6"" /><Style parent=""Normal"" me=""Style1"" /></C1.Win.C1Tr" & _
|
|
"ueDBGrid.MergeView></Splits><NamedStyles><Style parent="""" me=""Normal"" /><Style p" & _
|
|
"arent=""Normal"" me=""Heading"" /><Style parent=""Heading"" me=""Footer"" /><Style paren" & _
|
|
"t=""Heading"" me=""Caption"" /><Style parent=""Heading"" me=""Inactive"" /><Style parent" & _
|
|
"=""Normal"" me=""Selected"" /><Style parent=""Normal"" me=""Editor"" /><Style parent=""No" & _
|
|
"rmal"" me=""HighlightRow"" /><Style parent=""Normal"" me=""EvenRow"" /><Style parent=""N" & _
|
|
"ormal"" me=""OddRow"" /><Style parent=""Heading"" me=""RecordSelector"" /><Style parent" & _
|
|
"=""Normal"" me=""FilterBar"" /><Style parent=""Caption"" me=""Group"" /></NamedStyles><v" & _
|
|
"ertSplits>1</vertSplits><horzSplits>1</horzSplits><Layout>None</Layout><DefaultR" & _
|
|
"ecSelWidth>16</DefaultRecSelWidth><ClientArea>0, 0, 772, 387</ClientArea></Blob>" & _
|
|
""
|
|
'
|
|
'ImageList2
|
|
'
|
|
Me.ImageList2.ColorDepth = System.Windows.Forms.ColorDepth.Depth8Bit
|
|
Me.ImageList2.ImageSize = New System.Drawing.Size(16, 16)
|
|
Me.ImageList2.TransparentColor = System.Drawing.Color.Transparent
|
|
'
|
|
'TextBox1
|
|
'
|
|
Me.TextBox1.Location = New System.Drawing.Point(8, 424)
|
|
Me.TextBox1.Multiline = True
|
|
Me.TextBox1.Name = "TextBox1"
|
|
Me.TextBox1.Size = New System.Drawing.Size(760, 56)
|
|
Me.TextBox1.TabIndex = 15
|
|
Me.TextBox1.Text = "Dieses Dokument ist nicht korrekt im EDOKA gespeichert. Bitte gehen Sie wie folgt" & _
|
|
" vor:"
|
|
'
|
|
'TextBox2
|
|
'
|
|
Me.TextBox2.Location = New System.Drawing.Point(8, 488)
|
|
Me.TextBox2.Multiline = True
|
|
Me.TextBox2.Name = "TextBox2"
|
|
Me.TextBox2.Size = New System.Drawing.Size(760, 56)
|
|
Me.TextBox2.TabIndex = 16
|
|
Me.TextBox2.Text = "TextBox2"
|
|
'
|
|
'frmDokumentInBearbeitung
|
|
'
|
|
Me.AutoScaleBaseSize = New System.Drawing.Size(5, 13)
|
|
Me.ClientSize = New System.Drawing.Size(776, 558)
|
|
Me.Controls.AddRange(New System.Windows.Forms.Control() {Me.TextBox2, Me.TextBox1, Me.DokList, Me.ToolBar1})
|
|
Me.Icon = CType(resources.GetObject("$this.Icon"), System.Drawing.Icon)
|
|
Me.Name = "frmDokumentInBearbeitung"
|
|
Me.Text = "Dokumente in Bearbeitung"
|
|
CType(Me.DokList, System.ComponentModel.ISupportInitialize).EndInit()
|
|
Me.ResumeLayout(False)
|
|
|
|
End Sub
|
|
|
|
#End Region
|
|
Dim da As New DataTable()
|
|
|
|
Private Sub frmDokumentInBearbeitung_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
|
|
Dim i As Integer
|
|
da = Generic_Select(1)
|
|
Me.DokList.DataSource = da
|
|
Me.DokList.DataMember = da.TableName
|
|
DivFnkt.SpaltenTitel_Aktualisieren(Me.DokList, da, "dokumenteinbearbeitung")
|
|
For i = 0 To Me.DokList.Splits(0).DisplayColumns.Count - 1
|
|
Me.DokList.Splits(0).DisplayColumns(i).AutoSize()
|
|
Next
|
|
|
|
|
|
Me.TextBox1.Text = "Dieses Dokument ist nicht korrekt im EDOKA gespeichert. Bitte gehen Sie wie folgt vor:"
|
|
Me.TextBox1.Text = Me.TextBox1.Text + vbCrLf + "- Lassen Sie sich das Dokument zur Überprüfung anzeigen."
|
|
Me.TextBox1.Text = Me.TextBox1.Text + vbCrLf + "- Falls es sich nicht anzeigen lässt: Löschen Sie es!"
|
|
Me.TextBox1.Text = Me.TextBox1.Text + vbCrLf + "- Erstellen Sie das Dokument mit demselben Datum ggf nochmals neu."
|
|
Me.TextBox1.Text = Me.TextBox1.Text + vbCrLf + "- Der Versand erübrigt sich, da das ursprüngliche Dok. versendet sein dürfte."
|
|
Me.TextBox1.Text = Me.TextBox1.Text + vbCrLf + vbCrLf + "Mit freundlichen Grüssen"
|
|
Me.TextBox1.Text = Me.TextBox1.Text + vbCrLf + "EDOKA-Systemadministrator"
|
|
|
|
|
|
Me.TextBox2.Text = "Das Partnereröffnungsformular ist nicht korrekt im EDOKA gespeichert. Bitte gehen Sie wie folgt vor:"
|
|
Me.TextBox2.Text = Me.TextBox2.Text + vbCrLf + "- Lassen Sie sich das Dokument zur Überprüfung anzeigen."
|
|
Me.TextBox2.Text = Me.TextBox2.Text + vbCrLf + "- Falls es sich nicht anzeigen lässt: Löschen Sie es!"
|
|
Me.TextBox2.Text = Me.TextBox2.Text + vbCrLf + "- Erstellen Sie das Partnereröffnungsformular mit demselben Datum nochmals neu."
|
|
Me.TextBox2.Text = Me.TextBox2.Text + vbCrLf + "- Drucken Sie das neue Partnereröffnungsformular aus."
|
|
Me.TextBox2.Text = Me.TextBox2.Text + vbCrLf + "- Da sich der Barcode des alten Partnereröffnungsformulars im Scanning nicht verarbeiten lässt, vernichten Sie das sich in Bearbeitung befindliche Dokument und ersetzen es durch das neue."
|
|
|
|
Me.TextBox2.Text = Me.TextBox2.Text + vbCrLf + vbCrLf + "Mit freundlichen Grüssen"
|
|
Me.TextBox2.Text = Me.TextBox2.Text + vbCrLf + "EDOKA-Systemadministrator"
|
|
|
|
|
|
End Sub
|
|
|
|
Private Function Generic_Select(ByVal typ As Integer) As DataTable
|
|
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
|
|
scmCmdToExecute.CommandText = "dbo.sp_doksinbearbeitung"
|
|
scmCmdToExecute.CommandType = CommandType.StoredProcedure
|
|
Dim dtToReturn As DataTable = New DataTable()
|
|
Dim sdaAdapter As SqlDataAdapter = New SqlDataAdapter(scmCmdToExecute)
|
|
scmCmdToExecute.Connection = conn.scoDBConnection
|
|
If typ = 2 Then conn.OpenConnection()
|
|
Try
|
|
Select Case typ
|
|
Case 1
|
|
scmCmdToExecute.Parameters.Add(New SqlParameter("@fnkt", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, 1))
|
|
scmCmdToExecute.Parameters.Add(New SqlParameter("@dokumentid", SqlDbType.VarChar, 22, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, ""))
|
|
Case 2
|
|
scmCmdToExecute.Parameters.Add(New SqlParameter("@fnkt", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, 2))
|
|
scmCmdToExecute.Parameters.Add(New SqlParameter("@dokumentid", SqlDbType.VarChar, 22, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, Me.DokList.Columns("dokumentid").Text))
|
|
End Select
|
|
If typ = 2 Then
|
|
scmCmdToExecute.ExecuteNonQuery()
|
|
conn.CloseConnection(True)
|
|
End If
|
|
If typ = 1 Then
|
|
sdaAdapter.Fill(dtToReturn)
|
|
Return dtToReturn
|
|
End If
|
|
Catch ex As Exception
|
|
Finally
|
|
scmCmdToExecute.Dispose()
|
|
sdaAdapter.Dispose()
|
|
End Try
|
|
End Function
|
|
|
|
Private Sub MenuItem1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MenuItem1.Click
|
|
Dim i As Integer
|
|
If MyMsg.Show_MessageYesNo(33) = MsgBoxResult.Yes Then
|
|
Generic_Select(2)
|
|
Me.DokList.Refresh()
|
|
DivFnkt.SpaltenTitel_Aktualisieren(Me.DokList, da, "dokumenteinbearbeitung")
|
|
For i = 0 To Me.DokList.Splits(0).DisplayColumns.Count - 1
|
|
Me.DokList.Splits(0).DisplayColumns(i).AutoSize()
|
|
Next
|
|
Me.MenuItem2_Click(sender, e)
|
|
End If
|
|
End Sub
|
|
|
|
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
|
|
Me.Close()
|
|
End Sub
|
|
|
|
Private Sub MenuItem2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MenuItem2.Click
|
|
Dim i As Integer
|
|
Me.DokList.DataSource = Nothing
|
|
da = Generic_Select(1)
|
|
Me.DokList.DataSource = da
|
|
Me.DokList.Refresh()
|
|
DivFnkt.SpaltenTitel_Aktualisieren(Me.DokList, da, "dokumenteinbearbeitung")
|
|
For i = 0 To Me.DokList.Splits(0).DisplayColumns.Count - 1
|
|
Me.DokList.Splits(0).DisplayColumns(i).AutoSize()
|
|
Next
|
|
End Sub
|
|
|
|
Private Sub ContextMenu1_Popup(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ContextMenu1.Popup
|
|
|
|
End Sub
|
|
|
|
Private Sub MenuItem3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MenuItem3.Click
|
|
Dim f As New frmSearchDoc()
|
|
f.txtbcknr.Text = Me.DokList.Columns(0).Text
|
|
f.Visible = False
|
|
f.Show()
|
|
f.MdiParent = Me.MdiParent
|
|
f.Show_Doc()
|
|
f.Hide()
|
|
End Sub
|
|
|
|
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 TextBox1_MouseDown(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles TextBox1.MouseDown
|
|
Me.TextBox1.SelectAll()
|
|
End Sub
|
|
|
|
Private Sub TextBox2_MouseDown(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles TextBox2.MouseDown
|
|
Me.TextBox2.SelectAll()
|
|
End Sub
|
|
|
|
Private Sub DokList_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles DokList.Click
|
|
|
|
End Sub
|
|
End Class
|