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.

540 lines
23 KiB

Imports System.Data
Imports System.Data.SqlTypes
Imports System.Data.SqlClient
Imports System.ComponentModel
Imports System.Drawing
Imports System.Drawing.Color
Public Class frmStatusSetzen
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 TextBox1 As System.Windows.Forms.TextBox
Friend WithEvents Label1 As System.Windows.Forms.Label
Friend WithEvents TabControl1 As System.Windows.Forms.TabControl
Friend WithEvents TabPage1 As System.Windows.Forms.TabPage
Friend WithEvents TabPage2 As System.Windows.Forms.TabPage
Friend WithEvents Button1 As System.Windows.Forms.Button
Friend WithEvents Label5 As System.Windows.Forms.Label
Friend WithEvents cbVerantwortlich As System.Windows.Forms.ComboBox
Friend WithEvents TextBox2 As System.Windows.Forms.TextBox
Friend WithEvents Label2 As System.Windows.Forms.Label
Friend WithEvents GroupBox1 As System.Windows.Forms.GroupBox
Friend WithEvents Statuslist As C1.Win.C1TrueDBGrid.C1TrueDBGrid
Friend WithEvents Label3 As System.Windows.Forms.Label
Friend WithEvents ComboBox1 As System.Windows.Forms.ComboBox
Friend WithEvents txtLoeschgrund As System.Windows.Forms.TextBox
Friend WithEvents Label4 As System.Windows.Forms.Label
Friend WithEvents Button2 As System.Windows.Forms.Button
Friend WithEvents Label6 As System.Windows.Forms.Label
Friend WithEvents CheckBox1 As System.Windows.Forms.CheckBox
Friend WithEvents CheckBox2 As System.Windows.Forms.CheckBox
Friend WithEvents Button3 As System.Windows.Forms.Button
<System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()
Me.components = New System.ComponentModel.Container
Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(frmStatusSetzen))
Me.ToolBar1 = New System.Windows.Forms.ToolBar
Me.ToolBarButton1 = New System.Windows.Forms.ToolBarButton
Me.ImageList1 = New System.Windows.Forms.ImageList(Me.components)
Me.TextBox1 = New System.Windows.Forms.TextBox
Me.Label1 = New System.Windows.Forms.Label
Me.TabControl1 = New System.Windows.Forms.TabControl
Me.TabPage1 = New System.Windows.Forms.TabPage
Me.Button3 = New System.Windows.Forms.Button
Me.Button1 = New System.Windows.Forms.Button
Me.Label5 = New System.Windows.Forms.Label
Me.cbVerantwortlich = New System.Windows.Forms.ComboBox
Me.TextBox2 = New System.Windows.Forms.TextBox
Me.Label2 = New System.Windows.Forms.Label
Me.GroupBox1 = New System.Windows.Forms.GroupBox
Me.Statuslist = New C1.Win.C1TrueDBGrid.C1TrueDBGrid
Me.TabPage2 = New System.Windows.Forms.TabPage
Me.CheckBox2 = New System.Windows.Forms.CheckBox
Me.CheckBox1 = New System.Windows.Forms.CheckBox
Me.Label6 = New System.Windows.Forms.Label
Me.Button2 = New System.Windows.Forms.Button
Me.Label3 = New System.Windows.Forms.Label
Me.ComboBox1 = New System.Windows.Forms.ComboBox
Me.txtLoeschgrund = New System.Windows.Forms.TextBox
Me.Label4 = New System.Windows.Forms.Label
Me.TabControl1.SuspendLayout()
Me.TabPage1.SuspendLayout()
Me.GroupBox1.SuspendLayout()
CType(Me.Statuslist, System.ComponentModel.ISupportInitialize).BeginInit()
Me.TabPage2.SuspendLayout()
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.Location = New System.Drawing.Point(0, 0)
Me.ToolBar1.Name = "ToolBar1"
Me.ToolBar1.ShowToolTips = True
Me.ToolBar1.Size = New System.Drawing.Size(610, 28)
Me.ToolBar1.TabIndex = 0
'
'ToolBarButton1
'
Me.ToolBarButton1.ImageIndex = 0
Me.ToolBarButton1.Name = "ToolBarButton1"
'
'ImageList1
'
Me.ImageList1.ImageStream = CType(resources.GetObject("ImageList1.ImageStream"), System.Windows.Forms.ImageListStreamer)
Me.ImageList1.TransparentColor = System.Drawing.Color.Transparent
Me.ImageList1.Images.SetKeyName(0, "")
'
'TextBox1
'
Me.TextBox1.Location = New System.Drawing.Point(88, 40)
Me.TextBox1.Name = "TextBox1"
Me.TextBox1.ReadOnly = True
Me.TextBox1.Size = New System.Drawing.Size(160, 20)
Me.TextBox1.TabIndex = 1
Me.TextBox1.Text = "TextBox1"
'
'Label1
'
Me.Label1.Location = New System.Drawing.Point(8, 40)
Me.Label1.Name = "Label1"
Me.Label1.Size = New System.Drawing.Size(72, 23)
Me.Label1.TabIndex = 2
Me.Label1.Text = "Dokument-ID"
'
'TabControl1
'
Me.TabControl1.Controls.Add(Me.TabPage1)
Me.TabControl1.Controls.Add(Me.TabPage2)
Me.TabControl1.Location = New System.Drawing.Point(8, 72)
Me.TabControl1.Name = "TabControl1"
Me.TabControl1.SelectedIndex = 0
Me.TabControl1.Size = New System.Drawing.Size(592, 272)
Me.TabControl1.TabIndex = 3
'
'TabPage1
'
Me.TabPage1.Controls.Add(Me.Button3)
Me.TabPage1.Controls.Add(Me.Button1)
Me.TabPage1.Controls.Add(Me.Label5)
Me.TabPage1.Controls.Add(Me.cbVerantwortlich)
Me.TabPage1.Controls.Add(Me.TextBox2)
Me.TabPage1.Controls.Add(Me.Label2)
Me.TabPage1.Controls.Add(Me.GroupBox1)
Me.TabPage1.Location = New System.Drawing.Point(4, 22)
Me.TabPage1.Name = "TabPage1"
Me.TabPage1.Size = New System.Drawing.Size(584, 246)
Me.TabPage1.TabIndex = 0
Me.TabPage1.Text = "Status setzen"
'
'Button3
'
Me.Button3.Location = New System.Drawing.Point(424, 208)
Me.Button3.Name = "Button3"
Me.Button3.Size = New System.Drawing.Size(136, 23)
Me.Button3.TabIndex = 20
Me.Button3.Text = "Dokument positionieren"
'
'Button1
'
Me.Button1.Location = New System.Drawing.Point(472, 184)
Me.Button1.Name = "Button1"
Me.Button1.Size = New System.Drawing.Size(88, 23)
Me.Button1.TabIndex = 19
Me.Button1.Text = "Status setzen"
'
'Label5
'
Me.Label5.Location = New System.Drawing.Point(8, 208)
Me.Label5.Name = "Label5"
Me.Label5.Size = New System.Drawing.Size(100, 23)
Me.Label5.TabIndex = 18
Me.Label5.Text = "Verantwortlicher"
'
'cbVerantwortlich
'
Me.cbVerantwortlich.ItemHeight = 13
Me.cbVerantwortlich.Location = New System.Drawing.Point(112, 208)
Me.cbVerantwortlich.Name = "cbVerantwortlich"
Me.cbVerantwortlich.Size = New System.Drawing.Size(248, 21)
Me.cbVerantwortlich.TabIndex = 17
'
'TextBox2
'
Me.TextBox2.Location = New System.Drawing.Point(112, 184)
Me.TextBox2.Name = "TextBox2"
Me.TextBox2.ReadOnly = True
Me.TextBox2.Size = New System.Drawing.Size(248, 20)
Me.TextBox2.TabIndex = 16
'
'Label2
'
Me.Label2.Location = New System.Drawing.Point(8, 184)
Me.Label2.Name = "Label2"
Me.Label2.Size = New System.Drawing.Size(104, 16)
Me.Label2.TabIndex = 15
Me.Label2.Text = "Status zum Setzen:"
'
'GroupBox1
'
Me.GroupBox1.Controls.Add(Me.Statuslist)
Me.GroupBox1.Location = New System.Drawing.Point(8, 16)
Me.GroupBox1.Name = "GroupBox1"
Me.GroupBox1.Size = New System.Drawing.Size(560, 160)
Me.GroupBox1.TabIndex = 14
Me.GroupBox1.TabStop = False
Me.GroupBox1.Text = "Aktuelle Dokumentstatus"
'
'Statuslist
'
Me.Statuslist.AllowArrows = False
Me.Statuslist.BorderStyle = System.Windows.Forms.BorderStyle.None
Me.Statuslist.CollapseColor = System.Drawing.Color.Transparent
Me.Statuslist.Dock = System.Windows.Forms.DockStyle.Fill
Me.Statuslist.ExpandColor = System.Drawing.Color.Transparent
Me.Statuslist.GroupByCaption = "Drag a column header here to group by that column"
Me.Statuslist.Images.Add(CType(resources.GetObject("Statuslist.Images"), System.Drawing.Image))
Me.Statuslist.Location = New System.Drawing.Point(3, 16)
Me.Statuslist.Name = "Statuslist"
Me.Statuslist.PreviewInfo.Location = New System.Drawing.Point(0, 0)
Me.Statuslist.PreviewInfo.Size = New System.Drawing.Size(0, 0)
Me.Statuslist.PreviewInfo.ZoomFactor = 75
Me.Statuslist.PrintInfo.PageSettings = CType(resources.GetObject("Statuslist.PrintInfo.PageSettings"), System.Drawing.Printing.PageSettings)
Me.Statuslist.RowSubDividerColor = System.Drawing.Color.Transparent
Me.Statuslist.Size = New System.Drawing.Size(554, 141)
Me.Statuslist.TabIndex = 4
Me.Statuslist.Text = "C1TrueDBGrid1"
Me.Statuslist.PropBag = resources.GetString("Statuslist.PropBag")
'
'TabPage2
'
Me.TabPage2.Controls.Add(Me.CheckBox2)
Me.TabPage2.Controls.Add(Me.CheckBox1)
Me.TabPage2.Controls.Add(Me.Label6)
Me.TabPage2.Controls.Add(Me.Button2)
Me.TabPage2.Controls.Add(Me.Label3)
Me.TabPage2.Controls.Add(Me.ComboBox1)
Me.TabPage2.Controls.Add(Me.txtLoeschgrund)
Me.TabPage2.Controls.Add(Me.Label4)
Me.TabPage2.Location = New System.Drawing.Point(4, 22)
Me.TabPage2.Name = "TabPage2"
Me.TabPage2.Size = New System.Drawing.Size(584, 246)
Me.TabPage2.TabIndex = 1
Me.TabPage2.Text = "Status zurücksetzen"
'
'CheckBox2
'
Me.CheckBox2.Location = New System.Drawing.Point(8, 160)
Me.CheckBox2.Name = "CheckBox2"
Me.CheckBox2.Size = New System.Drawing.Size(192, 24)
Me.CheckBox2.TabIndex = 14
Me.CheckBox2.Text = "Dokument eingangsarchiviert"
'
'CheckBox1
'
Me.CheckBox1.Location = New System.Drawing.Point(8, 144)
Me.CheckBox1.Name = "CheckBox1"
Me.CheckBox1.Size = New System.Drawing.Size(184, 16)
Me.CheckBox1.TabIndex = 13
Me.CheckBox1.Text = "Dokument ausgangsarchiviert"
'
'Label6
'
Me.Label6.Location = New System.Drawing.Point(8, 200)
Me.Label6.Name = "Label6"
Me.Label6.Size = New System.Drawing.Size(536, 32)
Me.Label6.TabIndex = 12
Me.Label6.Text = "Nach dem Zurücksetzen sind auf der Trefferliste im Register Dokumentwerte allfäll" & _
"ige Status zu ändern und ggf. Coldbilder zu aktualisieren"
'
'Button2
'
Me.Button2.Location = New System.Drawing.Point(416, 144)
Me.Button2.Name = "Button2"
Me.Button2.Size = New System.Drawing.Size(96, 23)
Me.Button2.TabIndex = 11
Me.Button2.Text = "Status zurücksetzen"
'
'Label3
'
Me.Label3.Location = New System.Drawing.Point(8, 16)
Me.Label3.Name = "Label3"
Me.Label3.Size = New System.Drawing.Size(100, 16)
Me.Label3.TabIndex = 10
Me.Label3.Text = "Auswahl Löschgrund"
'
'ComboBox1
'
Me.ComboBox1.Location = New System.Drawing.Point(8, 40)
Me.ComboBox1.Name = "ComboBox1"
Me.ComboBox1.Size = New System.Drawing.Size(504, 21)
Me.ComboBox1.TabIndex = 9
Me.ComboBox1.Text = "ComboBox1"
'
'txtLoeschgrund
'
Me.txtLoeschgrund.Location = New System.Drawing.Point(8, 88)
Me.txtLoeschgrund.Multiline = True
Me.txtLoeschgrund.Name = "txtLoeschgrund"
Me.txtLoeschgrund.Size = New System.Drawing.Size(504, 48)
Me.txtLoeschgrund.TabIndex = 8
'
'Label4
'
Me.Label4.Location = New System.Drawing.Point(8, 72)
Me.Label4.Name = "Label4"
Me.Label4.Size = New System.Drawing.Size(128, 16)
Me.Label4.TabIndex = 7
Me.Label4.Text = "Grund"
'
'frmStatusSetzen
'
Me.AutoScaleBaseSize = New System.Drawing.Size(5, 13)
Me.ClientSize = New System.Drawing.Size(610, 359)
Me.Controls.Add(Me.TabControl1)
Me.Controls.Add(Me.Label1)
Me.Controls.Add(Me.TextBox1)
Me.Controls.Add(Me.ToolBar1)
Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle
Me.Icon = CType(resources.GetObject("$this.Icon"), System.Drawing.Icon)
Me.Name = "frmStatusSetzen"
Me.ShowInTaskbar = False
Me.Text = "Status setzen"
Me.TabControl1.ResumeLayout(False)
Me.TabPage1.ResumeLayout(False)
Me.TabPage1.PerformLayout()
Me.GroupBox1.ResumeLayout(False)
CType(Me.Statuslist, System.ComponentModel.ISupportInitialize).EndInit()
Me.TabPage2.ResumeLayout(False)
Me.TabPage2.PerformLayout()
Me.ResumeLayout(False)
Me.PerformLayout()
End Sub
#End Region
Dim WithEvents mcbverantwortlich As MultiComboBox
Dim WithEvents mcbloeschgrund As MultiComboBox
Dim On_Load As Boolean = True
Dim st As DataTable
Private Sub ToolBar1_ButtonClick(ByVal sender As System.Object, ByVal e As System.Windows.Forms.ToolBarButtonClickEventArgs) Handles ToolBar1.ButtonClick
Me.Close()
End Sub
Public Function Status_lesen() As DataTable
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
Dim dtToReturn As DataTable = New DataTable()
Dim sdaAdapter As SqlDataAdapter = New SqlDataAdapter(scmCmdToExecute)
scmCmdToExecute.CommandText = "dbo.SP_Trefferliste_Select_Status"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
scmCmdToExecute.Connection = conn.scoDBConnection
Try
scmCmdToExecute.Parameters.Add(New SqlParameter("@dokumentid", SqlDbType.VarChar, 22, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, Me.TextBox1.Text))
scmCmdToExecute.Parameters.Add(New SqlParameter("@fnkt", SqlDbType.VarChar, 22, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, 0))
sdaAdapter.Fill(dtToReturn)
Return dtToReturn
Catch ex As Exception
' // some error occured. Bubble it to caller and encapsulate Exception object
Throw New Exception("Dokument_Information_Wert::" & scmCmdToExecute.CommandText & "::Error occured." & ex.Message, ex)
Finally
scmCmdToExecute.Dispose()
sdaAdapter.Dispose()
End Try
End Function
Private Sub frmStatusSetzen_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
refresh_status()
Me.mcbverantwortlich = New MultiComboBox(cbVerantwortlich)
Me.mcbverantwortlich.DisplayColumnName = "mitarbeiter"
Me.mcbverantwortlich.ValueColumnName = "mitarbeiternr"
Dim dd As New DataTable()
dd = Mitarbeiter_lesen()
Me.mcbverantwortlich.Fill_Data(dd, False)
Me.mcbloeschgrund = New MultiComboBox(Me.ComboBox1)
Me.mcbloeschgrund.CheckNullValue = False
Me.mcbloeschgrund.DisplayColumnName = "Grund"
Me.mcbloeschgrund.ValueColumnName = "grundnr"
Me.mcbloeschgrund.Fill_Data(Generic_Select, False)
On_Load = False
Me.txtLoeschgrund.Focus()
Me.txtLoeschgrund.Text = ""
End Sub
Private Sub refresh_status()
st = Status_lesen()
Me.Statuslist.FetchRowStyles = True
Me.Statuslist.DataSource = Nothing
Me.Statuslist.DataSource = st
DivFnkt.SpaltenTitel_Aktualisieren(Me.Statuslist, st, "statushistory")
End Sub
Public Function Mitarbeiter_lesen() As DataTable
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
Dim dtToReturn As DataTable = New DataTable()
Dim sdaAdapter As SqlDataAdapter = New SqlDataAdapter(scmCmdToExecute)
scmCmdToExecute.CommandText = "dbo.sp_mitarbeiter_select"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
scmCmdToExecute.Connection = conn.scoDBConnection
Try
scmCmdToExecute.Parameters.Add(New SqlParameter("@mandantnr", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, Globals.MandantNr))
sdaAdapter.Fill(dtToReturn)
Return dtToReturn
Catch ex As Exception
' // some error occured. Bubble it to caller and encapsulate Exception object
Throw New Exception("Dokument_Information_Wert::" & scmCmdToExecute.CommandText & "::Error occured." & ex.Message, ex)
Finally
scmCmdToExecute.Dispose()
sdaAdapter.Dispose()
End Try
End Function
Private Sub Statuslist_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Statuslist.Click
Try
Me.TextBox2.Text = Me.Statuslist.Columns(1).Text
Catch
End Try
End Sub
Private Sub Statuslist_RowColChange(ByVal sender As System.Object, ByVal e As C1.Win.C1TrueDBGrid.RowColChangeEventArgs) Handles Statuslist.RowColChange
Try
Me.TextBox2.Text = Me.Statuslist.Columns(1).Text
Catch
End Try
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim st As New Statushandling()
st.insert_history_status(Me.Statuslist.Columns(0).Text, Me.TextBox1.Text, Me.mcbverantwortlich.SelectedValue)
If Me.TextBox2.Text = "Abgeschlossen" Then
st.Dokument_Abschliessen(Me.TextBox1.Text, Me.Statuslist.Columns(0).Value)
End If
refresh_status()
End Sub
Private Function Generic_Select() 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_get_grund"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
scmCmdToExecute.Connection = conn.scoDBConnection
Try
scmCmdToExecute.Parameters.Add(New SqlParameter("@grundtyp", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, 3))
sdaAdapter.Fill(dtToReturn)
Return dtToReturn
Catch ex As Exception
Throw New Exception("Dokument_Information_Wert::" & scmCmdToExecute.CommandText & "::Error occured." & ex.Message, ex)
Finally
scmCmdToExecute.Dispose()
sdaAdapter.Dispose()
End Try
End Function
Private Sub mcbloeschgrund_SelectedIndexChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles mcbloeschgrund.SelectedIndexChanged
If On_Load Then Exit Sub
If Microsoft.VisualBasic.Left(Me.mcbloeschgrund.Text, 1) = "(" Then
Me.txtLoeschgrund.Focus()
Me.txtLoeschgrund.SelectAll()
Me.txtLoeschgrund.Text = ""
Me.txtLoeschgrund.Enabled = True
Else
Me.txtLoeschgrund.Text = Me.mcbloeschgrund.Text
Me.txtLoeschgrund.Enabled = False
End If
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
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_korrektur_dokument_status_zuruecksetzen"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
scmCmdToExecute.Connection = conn.scoDBConnection
Try
scmCmdToExecute.Parameters.Add(New SqlParameter("@dokumentid", SqlDbType.VarChar, 22, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, Me.TextBox1.Text))
scmCmdToExecute.Parameters.Add(New SqlParameter("@grund", SqlDbType.VarChar, 1024, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, Me.txtLoeschgrund.Text))
scmCmdToExecute.Parameters.Add(New SqlParameter("@mitarbeiternr", SqlDbType.VarChar, 1024, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, Globals.MitarbeiterNr))
If Me.CheckBox1.Checked Then
scmCmdToExecute.Parameters.Add(New SqlParameter("@ausgangsarchiviert", SqlDbType.VarChar, 1024, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, 1))
Else
scmCmdToExecute.Parameters.Add(New SqlParameter("@ausgangsarchiviert", SqlDbType.VarChar, 1024, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, 0))
End If
If Me.CheckBox2.Checked Then
scmCmdToExecute.Parameters.Add(New SqlParameter("@eingangsarchiviert", SqlDbType.VarChar, 1024, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, Globals.MitarbeiterNr))
Else
scmCmdToExecute.Parameters.Add(New SqlParameter("@eingangsarchiviert", SqlDbType.VarChar, 1024, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, Globals.MitarbeiterNr))
End If
sdaAdapter.Fill(dtToReturn)
Catch ex As Exception
Throw New Exception("Dokument_Status_Zurücksetzen::" & scmCmdToExecute.CommandText & "::Error occured." & ex.Message, ex)
Finally
scmCmdToExecute.Dispose()
sdaAdapter.Dispose()
dtToReturn.Dispose()
MsgBox("Der Dokumentstatus wurde zurückgesetzt.", MsgBoxStyle.Information)
End Try
End Sub
Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
Dim d As New edokadb.clsDokument()
d.cpMainConnectionProvider = Globals.conn
d.sDokumentid = New SqlString(CType(Me.TextBox1.Text, String))
d.SelectOne()
d.iStatusnr = New SqlInt32(CType(Me.Statuslist.Columns(0).Text, Int32))
conn.OpenConnection()
d.Update()
conn.CloseConnection(True)
d.Dispose()
End Sub
Private Sub Statuslist_MouseDown(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles Statuslist.MouseDown
Try
Catch
Me.TextBox2.Text = Me.Statuslist.Columns(1).Text
End Try
End Sub
End Class