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.
1691 lines
71 KiB
1691 lines
71 KiB
Imports System.Data
|
|
Imports System.Data.SqlTypes
|
|
Imports System.Data.SqlClient
|
|
|
|
Public Class frmDokumentpaket
|
|
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 txtPartnerZusteller As System.Windows.Forms.TextBox
|
|
Friend WithEvents Button1 As System.Windows.Forms.Button
|
|
Friend WithEvents Label16 As System.Windows.Forms.Label
|
|
Friend WithEvents cbdokumentstatus As System.Windows.Forms.ComboBox
|
|
Friend WithEvents btnPartnerInhaber As System.Windows.Forms.Button
|
|
Friend WithEvents txtPartnerInhaber As System.Windows.Forms.TextBox
|
|
Friend WithEvents Label2 As System.Windows.Forms.Label
|
|
Friend WithEvents Label1 As System.Windows.Forms.Label
|
|
Friend WithEvents btnExit As System.Windows.Forms.ToolBarButton
|
|
Friend WithEvents BtnHelp As System.Windows.Forms.Button
|
|
Friend WithEvents btnAbbruch As System.Windows.Forms.Button
|
|
Friend WithEvents btnWeiter As System.Windows.Forms.Button
|
|
Friend WithEvents ImageList1 As System.Windows.Forms.ImageList
|
|
Friend WithEvents TreeVorlagen As System.Windows.Forms.TreeView
|
|
Friend WithEvents ImageList3 As System.Windows.Forms.ImageList
|
|
Friend WithEvents DokList As C1.Win.C1TrueDBGrid.C1TrueDBGrid
|
|
Friend WithEvents ImageList2 As System.Windows.Forms.ImageList
|
|
Friend WithEvents ContextMenuDokTyp As System.Windows.Forms.ContextMenu
|
|
Friend WithEvents ContextMenuDokument As System.Windows.Forms.ContextMenu
|
|
Friend WithEvents MenuItem5 As System.Windows.Forms.MenuItem
|
|
Friend WithEvents MnuMark As System.Windows.Forms.MenuItem
|
|
Friend WithEvents MnuUnmark As System.Windows.Forms.MenuItem
|
|
Friend WithEvents MnuAddDok As System.Windows.Forms.MenuItem
|
|
Friend WithEvents MnuShowDoc As System.Windows.Forms.MenuItem
|
|
Friend WithEvents MnuTrefferliste As System.Windows.Forms.MenuItem
|
|
Friend WithEvents PicHinweis As System.Windows.Forms.PictureBox
|
|
Friend WithEvents lblhinweis As System.Windows.Forms.Label
|
|
Friend WithEvents MenuItem1 As System.Windows.Forms.MenuItem
|
|
Friend WithEvents MenuItem2 As System.Windows.Forms.MenuItem
|
|
Friend WithEvents btnDPSave As System.Windows.Forms.ToolBarButton
|
|
Friend WithEvents btnDPCopy As System.Windows.Forms.ToolBarButton
|
|
Friend WithEvents btnDPInfo As System.Windows.Forms.ToolBarButton
|
|
Friend WithEvents Timer1 As System.Windows.Forms.Timer
|
|
Friend WithEvents ImageList4 As System.Windows.Forms.ImageList
|
|
Friend WithEvents mnuDPKopieren As System.Windows.Forms.MenuItem
|
|
Friend WithEvents MnuSaveAs As System.Windows.Forms.MenuItem
|
|
Friend WithEvents MnuVerwaltung As System.Windows.Forms.MenuItem
|
|
Friend WithEvents mnusaveStandard As System.Windows.Forms.MenuItem
|
|
Friend WithEvents lblabgeschlossen As System.Windows.Forms.Label
|
|
Friend WithEvents Timer2 As System.Windows.Forms.Timer
|
|
Friend WithEvents mnuDPMAKopieren As System.Windows.Forms.MenuItem
|
|
<System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()
|
|
Me.components = New System.ComponentModel.Container()
|
|
Dim resources As System.Resources.ResourceManager = New System.Resources.ResourceManager(GetType(frmDokumentpaket))
|
|
Dim GridLines1 As C1.Win.C1TrueDBGrid.Util.GridLines = New C1.Win.C1TrueDBGrid.Util.GridLines()
|
|
Me.ToolBar1 = New System.Windows.Forms.ToolBar()
|
|
Me.btnExit = New System.Windows.Forms.ToolBarButton()
|
|
Me.btnDPSave = New System.Windows.Forms.ToolBarButton()
|
|
Me.btnDPCopy = New System.Windows.Forms.ToolBarButton()
|
|
Me.btnDPInfo = New System.Windows.Forms.ToolBarButton()
|
|
Me.ImageList1 = New System.Windows.Forms.ImageList(Me.components)
|
|
Me.txtPartnerZusteller = New System.Windows.Forms.TextBox()
|
|
Me.Button1 = New System.Windows.Forms.Button()
|
|
Me.Label16 = New System.Windows.Forms.Label()
|
|
Me.cbdokumentstatus = New System.Windows.Forms.ComboBox()
|
|
Me.btnPartnerInhaber = New System.Windows.Forms.Button()
|
|
Me.txtPartnerInhaber = New System.Windows.Forms.TextBox()
|
|
Me.Label2 = New System.Windows.Forms.Label()
|
|
Me.Label1 = New System.Windows.Forms.Label()
|
|
Me.BtnHelp = New System.Windows.Forms.Button()
|
|
Me.TreeVorlagen = New System.Windows.Forms.TreeView()
|
|
Me.ImageList3 = New System.Windows.Forms.ImageList(Me.components)
|
|
Me.btnAbbruch = New System.Windows.Forms.Button()
|
|
Me.btnWeiter = New System.Windows.Forms.Button()
|
|
Me.DokList = New C1.Win.C1TrueDBGrid.C1TrueDBGrid()
|
|
Me.ImageList2 = New System.Windows.Forms.ImageList(Me.components)
|
|
Me.ContextMenuDokTyp = New System.Windows.Forms.ContextMenu()
|
|
Me.MenuItem1 = New System.Windows.Forms.MenuItem()
|
|
Me.MnuAddDok = New System.Windows.Forms.MenuItem()
|
|
Me.MenuItem2 = New System.Windows.Forms.MenuItem()
|
|
Me.MnuVerwaltung = New System.Windows.Forms.MenuItem()
|
|
Me.mnuDPKopieren = New System.Windows.Forms.MenuItem()
|
|
Me.MnuSaveAs = New System.Windows.Forms.MenuItem()
|
|
Me.mnuDPMAKopieren = New System.Windows.Forms.MenuItem()
|
|
Me.mnusaveStandard = New System.Windows.Forms.MenuItem()
|
|
Me.MenuItem5 = New System.Windows.Forms.MenuItem()
|
|
Me.MnuMark = New System.Windows.Forms.MenuItem()
|
|
Me.MnuUnmark = New System.Windows.Forms.MenuItem()
|
|
Me.ContextMenuDokument = New System.Windows.Forms.ContextMenu()
|
|
Me.MnuShowDoc = New System.Windows.Forms.MenuItem()
|
|
Me.MnuTrefferliste = New System.Windows.Forms.MenuItem()
|
|
Me.PicHinweis = New System.Windows.Forms.PictureBox()
|
|
Me.lblhinweis = New System.Windows.Forms.Label()
|
|
Me.Timer1 = New System.Windows.Forms.Timer(Me.components)
|
|
Me.ImageList4 = New System.Windows.Forms.ImageList(Me.components)
|
|
Me.lblabgeschlossen = New System.Windows.Forms.Label()
|
|
Me.Timer2 = New System.Windows.Forms.Timer(Me.components)
|
|
CType(Me.DokList, System.ComponentModel.ISupportInitialize).BeginInit()
|
|
Me.SuspendLayout()
|
|
'
|
|
'ToolBar1
|
|
'
|
|
Me.ToolBar1.Buttons.AddRange(New System.Windows.Forms.ToolBarButton() {Me.btnExit, Me.btnDPSave, Me.btnDPCopy, Me.btnDPInfo})
|
|
Me.ToolBar1.DropDownArrows = True
|
|
Me.ToolBar1.ImageList = Me.ImageList1
|
|
Me.ToolBar1.Name = "ToolBar1"
|
|
Me.ToolBar1.ShowToolTips = True
|
|
Me.ToolBar1.Size = New System.Drawing.Size(568, 25)
|
|
Me.ToolBar1.TabIndex = 0
|
|
'
|
|
'btnExit
|
|
'
|
|
Me.btnExit.ImageIndex = 0
|
|
'
|
|
'btnDPSave
|
|
'
|
|
Me.btnDPSave.ImageIndex = 1
|
|
Me.btnDPSave.Visible = False
|
|
'
|
|
'btnDPCopy
|
|
'
|
|
Me.btnDPCopy.ImageIndex = 3
|
|
Me.btnDPCopy.Visible = False
|
|
'
|
|
'btnDPInfo
|
|
'
|
|
Me.btnDPInfo.ImageIndex = 2
|
|
'
|
|
'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
|
|
'
|
|
'txtPartnerZusteller
|
|
'
|
|
Me.txtPartnerZusteller.Location = New System.Drawing.Point(112, 64)
|
|
Me.txtPartnerZusteller.Name = "txtPartnerZusteller"
|
|
Me.txtPartnerZusteller.ReadOnly = True
|
|
Me.txtPartnerZusteller.Size = New System.Drawing.Size(240, 20)
|
|
Me.txtPartnerZusteller.TabIndex = 45
|
|
Me.txtPartnerZusteller.Text = ""
|
|
'
|
|
'Button1
|
|
'
|
|
Me.Button1.Image = CType(resources.GetObject("Button1.Image"), System.Drawing.Bitmap)
|
|
Me.Button1.Location = New System.Drawing.Point(376, 40)
|
|
Me.Button1.Name = "Button1"
|
|
Me.Button1.Size = New System.Drawing.Size(24, 24)
|
|
Me.Button1.TabIndex = 47
|
|
'
|
|
'Label16
|
|
'
|
|
Me.Label16.Location = New System.Drawing.Point(8, 88)
|
|
Me.Label16.Name = "Label16"
|
|
Me.Label16.Size = New System.Drawing.Size(96, 23)
|
|
Me.Label16.TabIndex = 51
|
|
Me.Label16.Text = "Dokumentstatus"
|
|
'
|
|
'cbdokumentstatus
|
|
'
|
|
Me.cbdokumentstatus.ItemHeight = 13
|
|
Me.cbdokumentstatus.Items.AddRange(New Object() {"In Bearbeitung", "Zweiter Status der Sequenz"})
|
|
Me.cbdokumentstatus.Location = New System.Drawing.Point(112, 88)
|
|
Me.cbdokumentstatus.Name = "cbdokumentstatus"
|
|
Me.cbdokumentstatus.Size = New System.Drawing.Size(240, 21)
|
|
Me.cbdokumentstatus.TabIndex = 48
|
|
'
|
|
'btnPartnerInhaber
|
|
'
|
|
Me.btnPartnerInhaber.Image = CType(resources.GetObject("btnPartnerInhaber.Image"), System.Drawing.Bitmap)
|
|
Me.btnPartnerInhaber.Location = New System.Drawing.Point(352, 40)
|
|
Me.btnPartnerInhaber.Name = "btnPartnerInhaber"
|
|
Me.btnPartnerInhaber.Size = New System.Drawing.Size(24, 24)
|
|
Me.btnPartnerInhaber.TabIndex = 46
|
|
'
|
|
'txtPartnerInhaber
|
|
'
|
|
Me.txtPartnerInhaber.Location = New System.Drawing.Point(112, 40)
|
|
Me.txtPartnerInhaber.Name = "txtPartnerInhaber"
|
|
Me.txtPartnerInhaber.ReadOnly = True
|
|
Me.txtPartnerInhaber.Size = New System.Drawing.Size(240, 20)
|
|
Me.txtPartnerInhaber.TabIndex = 44
|
|
Me.txtPartnerInhaber.Text = ""
|
|
'
|
|
'Label2
|
|
'
|
|
Me.Label2.Location = New System.Drawing.Point(8, 64)
|
|
Me.Label2.Name = "Label2"
|
|
Me.Label2.TabIndex = 50
|
|
Me.Label2.Text = "Partner-Zusteller"
|
|
'
|
|
'Label1
|
|
'
|
|
Me.Label1.Location = New System.Drawing.Point(8, 40)
|
|
Me.Label1.Name = "Label1"
|
|
Me.Label1.TabIndex = 49
|
|
Me.Label1.Text = "Partner-Inhaber"
|
|
'
|
|
'BtnHelp
|
|
'
|
|
Me.BtnHelp.Anchor = (System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right)
|
|
Me.BtnHelp.Image = CType(resources.GetObject("BtnHelp.Image"), System.Drawing.Bitmap)
|
|
Me.BtnHelp.Location = New System.Drawing.Point(544, 6)
|
|
Me.BtnHelp.Name = "BtnHelp"
|
|
Me.BtnHelp.Size = New System.Drawing.Size(24, 23)
|
|
Me.BtnHelp.TabIndex = 61
|
|
'
|
|
'TreeVorlagen
|
|
'
|
|
Me.TreeVorlagen.CheckBoxes = True
|
|
Me.TreeVorlagen.ImageList = Me.ImageList3
|
|
Me.TreeVorlagen.Location = New System.Drawing.Point(8, 120)
|
|
Me.TreeVorlagen.Name = "TreeVorlagen"
|
|
Me.TreeVorlagen.Size = New System.Drawing.Size(520, 232)
|
|
Me.TreeVorlagen.TabIndex = 62
|
|
'
|
|
'ImageList3
|
|
'
|
|
Me.ImageList3.ColorDepth = System.Windows.Forms.ColorDepth.Depth8Bit
|
|
Me.ImageList3.ImageSize = New System.Drawing.Size(16, 16)
|
|
Me.ImageList3.ImageStream = CType(resources.GetObject("ImageList3.ImageStream"), System.Windows.Forms.ImageListStreamer)
|
|
Me.ImageList3.TransparentColor = System.Drawing.Color.Transparent
|
|
'
|
|
'btnAbbruch
|
|
'
|
|
Me.btnAbbruch.Location = New System.Drawing.Point(8, 360)
|
|
Me.btnAbbruch.Name = "btnAbbruch"
|
|
Me.btnAbbruch.TabIndex = 63
|
|
Me.btnAbbruch.Text = "Schliessen"
|
|
'
|
|
'btnWeiter
|
|
'
|
|
Me.btnWeiter.Location = New System.Drawing.Point(488, 360)
|
|
Me.btnWeiter.Name = "btnWeiter"
|
|
Me.btnWeiter.TabIndex = 64
|
|
Me.btnWeiter.Text = "Weiter >"
|
|
'
|
|
'DokList
|
|
'
|
|
Me.DokList.AllowArrows = False
|
|
Me.DokList.AllowColMove = False
|
|
Me.DokList.AllowColSelect = False
|
|
Me.DokList.AllowFilter = False
|
|
Me.DokList.AllowRowSelect = False
|
|
Me.DokList.AllowSort = False
|
|
Me.DokList.AllowUpdate = False
|
|
Me.DokList.AllowUpdateOnBlur = False
|
|
Me.DokList.AlternatingRows = True
|
|
Me.DokList.BackColor = System.Drawing.Color.White
|
|
Me.DokList.CaptionHeight = 17
|
|
Me.DokList.CollapseColor = System.Drawing.Color.Black
|
|
Me.DokList.ColumnHeaders = False
|
|
Me.DokList.Cursor = System.Windows.Forms.Cursors.Default
|
|
Me.DokList.DataChanged = False
|
|
Me.DokList.DeadAreaBackColor = System.Drawing.Color.Empty
|
|
Me.DokList.ExpandColor = System.Drawing.Color.Black
|
|
Me.DokList.ExposeCellMode = C1.Win.C1TrueDBGrid.ExposeCellModeEnum.ScrollNever
|
|
Me.DokList.FetchRowStyles = 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(8, 120)
|
|
Me.DokList.MarqueeStyle = C1.Win.C1TrueDBGrid.MarqueeEnum.NoMarquee
|
|
Me.DokList.MultiSelect = C1.Win.C1TrueDBGrid.MultiSelectEnum.None
|
|
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 = 20
|
|
GridLines1.Color = System.Drawing.Color.White
|
|
GridLines1.Style = C1.Win.C1TrueDBGrid.LineStyleEnum.None
|
|
Me.DokList.RowDivider = GridLines1
|
|
Me.DokList.RowHeight = 15
|
|
Me.DokList.RowSubDividerColor = System.Drawing.Color.Transparent
|
|
Me.DokList.ScrollTips = False
|
|
Me.DokList.Size = New System.Drawing.Size(552, 232)
|
|
Me.DokList.TabIndex = 65
|
|
Me.DokList.Text = "C1TrueDBGrid1"
|
|
Me.DokList.Visible = False
|
|
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:White;}Footer{}Caption{AlignHorz:" & _
|
|
"Center;Border:None,,0, 0, 0, 0;}Style27{}Normal{BackColor:White;}Style26{}Highli" & _
|
|
"ghtRow{ForeColor:HighlightText;BackColor:White;}Style10{AlignHorz:Near;}Editor{}" & _
|
|
"RecordSelector{AlignImage:Center;BackColor:ActiveCaptionText;}Style9{}Style8{}St" & _
|
|
"yle3{}Style2{}Group{BackColor:ControlDark;Border:None,,0, 0, 0, 0;AlignVert:Cent" & _
|
|
"er;}Style1{}</Data></Styles><Splits><C1.Win.C1TrueDBGrid.MergeView AllowColMove=" & _
|
|
"""False"" AllowColSelect=""False"" AllowRowSelect=""False"" Name="""" AllowRowSizing=""In" & _
|
|
"dividualRows"" AlternatingRowStyle=""True"" CaptionHeight=""17"" ColumnCaptionHeight=" & _
|
|
"""17"" ColumnFooterHeight=""17"" FetchRowStyles=""True"" MarqueeStyle=""NoMarquee"" Reco" & _
|
|
"rdSelectorWidth=""20"" DefRecSelWidth=""16"" VerticalScrollGroup=""1"" HorizontalScrol" & _
|
|
"lGroup=""1""><ClientRect>0, 0, 548, 228</ClientRect><BorderSide>0</BorderSide><Cap" & _
|
|
"tionStyle parent=""Heading"" me=""Style10"" /><EditorStyle parent=""Editor"" me=""Style" & _
|
|
"2"" /><EvenRowStyle parent=""EvenRow"" me=""Style8"" /><FilterBarStyle parent=""Filter" & _
|
|
"Bar"" me=""Style27"" /><FooterStyle parent=""Footer"" me=""Style4"" /><GroupStyle paren" & _
|
|
"t=""Group"" me=""Style12"" /><HeadingStyle parent=""Heading"" me=""Style3"" /><HighLight" & _
|
|
"RowStyle parent=""HighlightRow"" me=""Style7"" /><InactiveStyle parent=""Inactive"" me" & _
|
|
"=""Style6"" /><OddRowStyle parent=""OddRow"" me=""Style9"" /><RecordSelectorStyle pare" & _
|
|
"nt=""RecordSelector"" me=""Style11"" /><SelectedStyle parent=""Selected"" me=""Style5"" " & _
|
|
"/><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=""Caption"" /><" & _
|
|
"Style parent=""Heading"" me=""Inactive"" /><Style parent=""Normal"" me=""Selected"" /><S" & _
|
|
"tyle parent=""Normal"" me=""Editor"" /><Style parent=""Normal"" me=""HighlightRow"" /><S" & _
|
|
"tyle parent=""Normal"" me=""EvenRow"" /><Style parent=""Normal"" me=""OddRow"" /><Style " & _
|
|
"parent=""Heading"" me=""RecordSelector"" /><Style parent=""Normal"" me=""FilterBar"" /><" & _
|
|
"Style parent=""Caption"" me=""Group"" /></NamedStyles><vertSplits>1</vertSplits><hor" & _
|
|
"zSplits>1</horzSplits><Layout>Modified</Layout><DefaultRecSelWidth>16</DefaultRe" & _
|
|
"cSelWidth><ClientArea>0, 0, 548, 228</ClientArea></Blob>"
|
|
'
|
|
'ImageList2
|
|
'
|
|
Me.ImageList2.ColorDepth = System.Windows.Forms.ColorDepth.Depth8Bit
|
|
Me.ImageList2.ImageSize = New System.Drawing.Size(16, 16)
|
|
Me.ImageList2.ImageStream = CType(resources.GetObject("ImageList2.ImageStream"), System.Windows.Forms.ImageListStreamer)
|
|
Me.ImageList2.TransparentColor = System.Drawing.Color.Transparent
|
|
'
|
|
'ContextMenuDokTyp
|
|
'
|
|
Me.ContextMenuDokTyp.MenuItems.AddRange(New System.Windows.Forms.MenuItem() {Me.MenuItem1, Me.MnuAddDok, Me.MenuItem2, Me.MnuVerwaltung, Me.mnusaveStandard, Me.MenuItem5, Me.MnuMark, Me.MnuUnmark})
|
|
'
|
|
'MenuItem1
|
|
'
|
|
Me.MenuItem1.Index = 0
|
|
Me.MenuItem1.Text = "Informationen zur Dokument&vorlage"
|
|
'
|
|
'MnuAddDok
|
|
'
|
|
Me.MnuAddDok.Index = 1
|
|
Me.MnuAddDok.Text = "&Dokumentvorlage hinzufügen"
|
|
'
|
|
'MenuItem2
|
|
'
|
|
Me.MenuItem2.Index = 2
|
|
Me.MenuItem2.Text = "-"
|
|
'
|
|
'MnuVerwaltung
|
|
'
|
|
Me.MnuVerwaltung.Index = 3
|
|
Me.MnuVerwaltung.MenuItems.AddRange(New System.Windows.Forms.MenuItem() {Me.mnuDPKopieren, Me.MnuSaveAs, Me.mnuDPMAKopieren})
|
|
Me.MnuVerwaltung.Text = "Dokumentpakete verwalten"
|
|
'
|
|
'mnuDPKopieren
|
|
'
|
|
Me.mnuDPKopieren.Index = 0
|
|
Me.mnuDPKopieren.Text = "&Dokumentpaket kopieren"
|
|
'
|
|
'MnuSaveAs
|
|
'
|
|
Me.MnuSaveAs.Index = 1
|
|
Me.MnuSaveAs.Text = "Dokumentpaket speichern"
|
|
'
|
|
'mnuDPMAKopieren
|
|
'
|
|
Me.mnuDPMAKopieren.Index = 2
|
|
Me.mnuDPMAKopieren.Text = "Dokumentpaket für ... kopieren"
|
|
'
|
|
'mnusaveStandard
|
|
'
|
|
Me.mnusaveStandard.Index = 4
|
|
Me.mnusaveStandard.Text = "Als individuelles Dokumentpaket speichern"
|
|
'
|
|
'MenuItem5
|
|
'
|
|
Me.MenuItem5.Index = 5
|
|
Me.MenuItem5.Text = "-"
|
|
Me.MenuItem5.Visible = False
|
|
'
|
|
'MnuMark
|
|
'
|
|
Me.MnuMark.Index = 6
|
|
Me.MnuMark.Text = "&Zum Erstellen markieren"
|
|
Me.MnuMark.Visible = False
|
|
'
|
|
'MnuUnmark
|
|
'
|
|
Me.MnuUnmark.Index = 7
|
|
Me.MnuUnmark.Text = "&Markierung aufheben"
|
|
Me.MnuUnmark.Visible = False
|
|
'
|
|
'ContextMenuDokument
|
|
'
|
|
Me.ContextMenuDokument.MenuItems.AddRange(New System.Windows.Forms.MenuItem() {Me.MnuShowDoc, Me.MnuTrefferliste})
|
|
'
|
|
'MnuShowDoc
|
|
'
|
|
Me.MnuShowDoc.Index = 0
|
|
Me.MnuShowDoc.Text = "&Dokument anzeigen"
|
|
'
|
|
'MnuTrefferliste
|
|
'
|
|
Me.MnuTrefferliste.Index = 1
|
|
Me.MnuTrefferliste.Text = "&Partnerdossier anzeigen"
|
|
'
|
|
'PicHinweis
|
|
'
|
|
Me.PicHinweis.Image = CType(resources.GetObject("PicHinweis.Image"), System.Drawing.Bitmap)
|
|
Me.PicHinweis.Location = New System.Drawing.Point(456, 48)
|
|
Me.PicHinweis.Name = "PicHinweis"
|
|
Me.PicHinweis.Size = New System.Drawing.Size(40, 46)
|
|
Me.PicHinweis.TabIndex = 66
|
|
Me.PicHinweis.TabStop = False
|
|
Me.PicHinweis.Visible = False
|
|
'
|
|
'lblhinweis
|
|
'
|
|
Me.lblhinweis.Location = New System.Drawing.Point(424, 88)
|
|
Me.lblhinweis.Name = "lblhinweis"
|
|
Me.lblhinweis.Size = New System.Drawing.Size(104, 24)
|
|
Me.lblhinweis.TabIndex = 67
|
|
Me.lblhinweis.Text = "Wichtiger Hinweis vorhanden"
|
|
Me.lblhinweis.TextAlign = System.Drawing.ContentAlignment.MiddleCenter
|
|
'
|
|
'Timer1
|
|
'
|
|
Me.Timer1.Interval = 4000
|
|
'
|
|
'ImageList4
|
|
'
|
|
Me.ImageList4.ColorDepth = System.Windows.Forms.ColorDepth.Depth8Bit
|
|
Me.ImageList4.ImageSize = New System.Drawing.Size(16, 16)
|
|
Me.ImageList4.ImageStream = CType(resources.GetObject("ImageList4.ImageStream"), System.Windows.Forms.ImageListStreamer)
|
|
Me.ImageList4.TransparentColor = System.Drawing.Color.Transparent
|
|
'
|
|
'lblabgeschlossen
|
|
'
|
|
Me.lblabgeschlossen.Font = New System.Drawing.Font("Microsoft Sans Serif", 12.0!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
|
|
Me.lblabgeschlossen.ForeColor = System.Drawing.Color.Blue
|
|
Me.lblabgeschlossen.Location = New System.Drawing.Point(96, 360)
|
|
Me.lblabgeschlossen.Name = "lblabgeschlossen"
|
|
Me.lblabgeschlossen.Size = New System.Drawing.Size(392, 24)
|
|
Me.lblabgeschlossen.TabIndex = 68
|
|
Me.lblabgeschlossen.Text = "Das Dokumentpaket wurde abgeschlossen"
|
|
Me.lblabgeschlossen.TextAlign = System.Drawing.ContentAlignment.MiddleCenter
|
|
Me.lblabgeschlossen.Visible = False
|
|
'
|
|
'Timer2
|
|
'
|
|
Me.Timer2.Interval = 1000
|
|
'
|
|
'frmDokumentpaket
|
|
'
|
|
Me.AutoScaleBaseSize = New System.Drawing.Size(5, 13)
|
|
Me.ClientSize = New System.Drawing.Size(568, 389)
|
|
Me.Controls.AddRange(New System.Windows.Forms.Control() {Me.lblabgeschlossen, Me.lblhinweis, Me.PicHinweis, Me.DokList, Me.btnWeiter, Me.btnAbbruch, Me.TreeVorlagen, Me.BtnHelp, Me.txtPartnerZusteller, Me.Button1, Me.Label16, Me.cbdokumentstatus, Me.btnPartnerInhaber, Me.txtPartnerInhaber, Me.Label2, Me.Label1, Me.ToolBar1})
|
|
Me.Icon = CType(resources.GetObject("$this.Icon"), System.Drawing.Icon)
|
|
Me.Name = "frmDokumentpaket"
|
|
Me.Text = "Dokumentpaket"
|
|
CType(Me.DokList, System.ComponentModel.ISupportInitialize).EndInit()
|
|
Me.ResumeLayout(False)
|
|
|
|
End Sub
|
|
|
|
#End Region
|
|
|
|
#Region "Deklarationen"
|
|
Dim Dokumentpaketnr As Integer
|
|
Dim IndividuellesDP As Boolean
|
|
Dim NrPar00 As Integer
|
|
Dim DP_Instanz As Boolean = False
|
|
Dim dp_instanznr As Integer = 0
|
|
Dim dokumentid As String
|
|
Dim saveasidvDP As Boolean = False
|
|
Dim Dokumenttypnummern As String = ""
|
|
Dim Dokumenttyphacken As String = ""
|
|
Dim DokumenttypInBearbeitung As String
|
|
Dim ColDokumenttypNr As New Collection()
|
|
Dim savedata As DataTable
|
|
Dim Wichtigerhinweis As String = ""
|
|
Dim m_profile As DataTable
|
|
Dim CurrentRow As Integer = 0
|
|
Dim m_InBearbeitung As Boolean = False
|
|
Dim barcodeid As String
|
|
Property Profile() As DataTable
|
|
Get
|
|
Return m_profile
|
|
End Get
|
|
Set(ByVal Value As DataTable)
|
|
m_profile = Value
|
|
End Set
|
|
End Property
|
|
|
|
Dim m_profilnr As Integer
|
|
Property Profilnr() As Integer
|
|
Get
|
|
Return m_profilnr
|
|
End Get
|
|
Set(ByVal Value As Integer)
|
|
m_profilnr = Value
|
|
End Set
|
|
End Property
|
|
Property InBearbeitung() As Boolean
|
|
Get
|
|
Return m_InBearbeitung
|
|
End Get
|
|
Set(ByVal Value As Boolean)
|
|
m_InBearbeitung = Value
|
|
If Value = False Then
|
|
Me.DokList.Enabled = True
|
|
Me.btnAbbruch.Enabled = True
|
|
Me.btnWeiter.Enabled = True
|
|
Me.btnPartnerInhaber.Enabled = True
|
|
Me.ToolBar1.Enabled = True
|
|
Else
|
|
Me.DokList.Enabled = False
|
|
Me.btnAbbruch.Enabled = False
|
|
Me.btnWeiter.Enabled = False
|
|
Me.btnPartnerInhaber.Enabled = False
|
|
Me.ToolBar1.Enabled = False
|
|
End If
|
|
End Set
|
|
End Property
|
|
Dim MarkierteDT As New Collection()
|
|
Dim dd As DataTable
|
|
|
|
|
|
#End Region
|
|
|
|
#Region "Init_Load"
|
|
|
|
Public Sub New(ByVal dpvorlagenr As Integer, ByVal indivDP As Boolean, ByVal Partnernr As Integer)
|
|
MyBase.New()
|
|
|
|
' Dieser Aufruf ist für den Windows Form-Designer erforderlich.
|
|
InitializeComponent()
|
|
Me.Dokumentpaketnr = dpvorlagenr
|
|
Me.IndividuellesDP = indivDP
|
|
Me.NrPar00 = Partnernr
|
|
|
|
' Initialisierungen nach dem Aufruf InitializeComponent() hinzufügen
|
|
Me.cbdokumentstatus.SelectedIndex = 0
|
|
End Sub
|
|
Public Sub New(ByVal dpvorlagenr As Integer, ByVal Partnernr As Integer)
|
|
|
|
MyBase.New()
|
|
' Dieser Aufruf ist für den Windows Form-Designer erforderlich.
|
|
InitializeComponent()
|
|
Me.Dokumentpaketnr = dpvorlagenr
|
|
Me.NrPar00 = Partnernr
|
|
Try
|
|
'Dim dp As New edokadb.clsEdex_dpinstanz()
|
|
'dp.cpMainConnectionProvider = conn
|
|
'dp.iNreintrag = dpvorlagenr
|
|
'dp.SelectByDPNr(dpvorlagenr)
|
|
'Me.Dokumenttypnummern = dp.sDokumentpaketnummern.Value
|
|
'Me.Dokumenttyphacken = dp.sHacken.Value
|
|
'Me.NrPar00 = dp.iNrpar00.Value
|
|
'Me.Dokumentpaketnr = dpvorl
|
|
'Me.IndividuellesDP = dp.bIndividuellesDP.Value
|
|
'Me.Profilnr = dp.iProfilnr.Value
|
|
'Me.Profile = Generic_Select(5)
|
|
|
|
'Dim ProfilFound As Boolean = False
|
|
'Dim I1 As Integer = 0
|
|
'For I1 = 0 To Me.Profile.Rows.Count - 1
|
|
' If Me.Profile.Rows(I1).Item("profilnr") = Me.Profilnr Then
|
|
' ProfilFound = True
|
|
' End If
|
|
'Next
|
|
'If Not ProfilFound Then
|
|
' For I1 = 0 To Me.Profile.Rows.Count - 1
|
|
' If Me.Profile.Rows(I1).Item("Standard") = True Then
|
|
' Me.Profilnr = Me.Profile.Rows(I1).Item("profilnr")
|
|
' End If
|
|
' Next
|
|
'End If
|
|
'dp.Dispose()
|
|
|
|
Dim splitter
|
|
Dim i As Integer = 0
|
|
|
|
Try
|
|
splitter = Me.Dokumenttypnummern.Split(";")
|
|
Do Until splitter(i) Is Nothing
|
|
If splitter(i) <> "" Then
|
|
Me.ColDokumenttypNr.Add(splitter(i))
|
|
End If
|
|
i = i + 1
|
|
Loop
|
|
Catch
|
|
End Try
|
|
Catch ex As Exception
|
|
MsgBox("Das Dokumentpaket konnte nicht geladen werden.")
|
|
End Try
|
|
Me.cbdokumentstatus.SelectedIndex = 0
|
|
|
|
End Sub
|
|
Public Sub New(ByVal edex_dpinstanznr As Integer)
|
|
|
|
MyBase.New()
|
|
' Dieser Aufruf ist für den Windows Form-Designer erforderlich.
|
|
InitializeComponent()
|
|
Me.DP_Instanz = True
|
|
Me.dp_instanznr = edex_dpinstanznr
|
|
Try
|
|
Dim dp As New edokadb.clsEdex_dpinstanz()
|
|
dp.cpMainConnectionProvider = conn
|
|
dp.iNreintrag = New SqlInt32(CType(edex_dpinstanznr, Int32))
|
|
dp.SelectOne()
|
|
Me.Dokumenttypnummern = dp.sDokumentpaketnummern.Value
|
|
Me.Dokumenttyphacken = dp.sHacken.Value
|
|
Me.NrPar00 = dp.iNrpar00.Value
|
|
Me.Dokumentpaketnr = dp.iDokumentpaketnr.Value
|
|
Me.IndividuellesDP = dp.bIndividuellesDP.Value
|
|
Me.Profilnr = dp.iProfilnr.Value
|
|
Me.Profile = Generic_Select(5)
|
|
|
|
Dim ProfilFound As Boolean = False
|
|
Dim I1 As Integer = 0
|
|
For I1 = 0 To Me.Profile.Rows.Count - 1
|
|
If Me.Profile.Rows(I1).Item("profilnr") = Me.Profilnr Then
|
|
ProfilFound = True
|
|
End If
|
|
Next
|
|
If Not ProfilFound Then
|
|
For I1 = 0 To Me.Profile.Rows.Count - 1
|
|
If Me.Profile.Rows(I1).Item("Standard") = True Then
|
|
Me.Profilnr = Me.Profile.Rows(I1).Item("profilnr")
|
|
End If
|
|
Next
|
|
End If
|
|
dp.Dispose()
|
|
|
|
Dim splitter
|
|
Dim i As Integer = 0
|
|
|
|
Try
|
|
splitter = Me.Dokumenttypnummern.Split(";")
|
|
Do Until splitter(i) Is Nothing
|
|
If splitter(i) <> "" Then
|
|
Me.ColDokumenttypNr.Add(splitter(i))
|
|
End If
|
|
i = i + 1
|
|
Loop
|
|
Catch
|
|
End Try
|
|
Catch
|
|
MsgBox("Das Dokumentpaket konnte nicht geladen werden.")
|
|
End Try
|
|
Me.cbdokumentstatus.SelectedIndex = 0
|
|
|
|
End Sub
|
|
|
|
Private Sub frmDokumentpaket_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
|
|
Me.DokList.Visible = True
|
|
Load_Dokumentpaket()
|
|
If Me.NrPar00 <> 0 Then
|
|
Dim f As New FrmPartnersuche()
|
|
f.Partner_Suche(Me.NrPar00)
|
|
Me.txtPartnerInhaber.Text = Str(f.PartnerNr) + " " + f.PartnerKurzbezeichnnung
|
|
If Me.txtPartnerInhaber.Text = " 0 " Then Me.txtPartnerInhaber.Text = ""
|
|
Me.txtPartnerZusteller.Text = get_partnerzusteller(Me.NrPar00)
|
|
Me.Refresh_data()
|
|
Me.DokList.Enabled = True
|
|
Else
|
|
Me.txtPartnerInhaber.Text = ""
|
|
btnPartnerInhaber_Click(sender, e)
|
|
Me.Refresh_data()
|
|
If Me.NrPar00 = 0 Then Me.DokList.Enabled = False Else Me.DokList.Enabled = True
|
|
End If
|
|
If Me.IndividuellesDP = True Then
|
|
Dim bmp As New Bitmap(Me.ImageList4.Images(1))
|
|
Dim ico As Icon = Icon.FromHandle(bmp.GetHicon())
|
|
Me.Icon = ico
|
|
Else
|
|
Dim bmp As New Bitmap(Me.ImageList4.Images(0))
|
|
Dim ico As Icon = Icon.FromHandle(bmp.GetHicon())
|
|
Me.Icon = ico
|
|
End If
|
|
If Me.DP_Instanz = True Then
|
|
Dim splitter
|
|
Dim splitter1
|
|
|
|
Dim i As Integer = 0
|
|
Dim i1 As Integer
|
|
splitter = Me.Dokumenttyphacken.Split(";")
|
|
splitter1 = Me.Dokumenttypnummern.Split(";")
|
|
|
|
For i = 0 To Me.DokList.Splits(0).Rows.Count - 1
|
|
Me.DokList.Bookmark = i
|
|
If Me.DokList.Columns("Dokumentid").Value = "0" Then
|
|
Try
|
|
i1 = 0
|
|
Do Until splitter(i1) Is Nothing
|
|
If splitter1(i1) = Me.DokList.Columns("Dokumenttypnr").Value Then
|
|
If splitter(i1) = 2 Then
|
|
Me.DokList.Columns("Haken").Value = 2
|
|
Else
|
|
Me.DokList.Columns("Haken").Value = 1
|
|
End If
|
|
Exit Do
|
|
End If
|
|
i1 = i1 + 1
|
|
Loop
|
|
Catch
|
|
End Try
|
|
End If
|
|
Next
|
|
End If
|
|
End Sub
|
|
|
|
#End Region
|
|
|
|
#Region "Datenhandling"
|
|
|
|
Private Function Generic_Select(ByVal typ As Integer) As DataTable
|
|
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
|
|
Select Case typ
|
|
Case 1
|
|
scmCmdToExecute.CommandText = "edex_sp_dokumentpaketvorlagen_select"
|
|
Case 2, 3
|
|
scmCmdToExecute.CommandText = "edex_sp_dokumentpaket_dokumente_select"
|
|
Case 4
|
|
scmCmdToExecute.CommandText = "dbo.SP_message_getPartner_Profil"
|
|
Case 5
|
|
scmCmdToExecute.CommandText = "dbo.pv_profil_select"
|
|
Case Else
|
|
End Select
|
|
scmCmdToExecute.CommandType = CommandType.StoredProcedure
|
|
Dim dtToReturn As DataTable = New DataTable()
|
|
Dim sdaAdapter As SqlDataAdapter = New SqlDataAdapter(scmCmdToExecute)
|
|
|
|
Select Case typ
|
|
Case 1
|
|
scmCmdToExecute.Parameters.Add(New SqlParameter("@dokumentpaketnr", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, Me.Dokumentpaketnr))
|
|
Case 2
|
|
scmCmdToExecute.Parameters.Add(New SqlParameter("@doktypen", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, Me.DokumenttypInBearbeitung))
|
|
scmCmdToExecute.Parameters.Add(New SqlParameter("@nrpar00", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, Me.NrPar00))
|
|
scmCmdToExecute.Parameters.Add(New SqlParameter("@mitarbeiternr", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, Globals.MitarbeiterNr))
|
|
scmCmdToExecute.Parameters.Add(New SqlParameter("@typ", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, 0))
|
|
Case 3
|
|
scmCmdToExecute.Parameters.Add(New SqlParameter("@doktypen", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, Me.Dokumenttypnummern))
|
|
scmCmdToExecute.Parameters.Add(New SqlParameter("@nrpar00", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, Me.NrPar00))
|
|
scmCmdToExecute.Parameters.Add(New SqlParameter("@mitarbeiternr", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, Globals.MitarbeiterNr))
|
|
scmCmdToExecute.Parameters.Add(New SqlParameter("@dpnr", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, Me.Dokumentpaketnr))
|
|
Case 4
|
|
scmCmdToExecute.Parameters.Add(New SqlParameter("@dokumentid", SqlDbType.VarChar, 22, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, Me.DokList.Columns("dokumentid").Text))
|
|
scmCmdToExecute.Parameters.Add(New SqlParameter("@mitarbeiternr", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, Globals.MitarbeiterNr))
|
|
Case 5
|
|
scmCmdToExecute.Parameters.Add(New SqlParameter("@mitarbeiternr", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, Globals.MitarbeiterNr))
|
|
scmCmdToExecute.Parameters.Add(New SqlParameter("@mandantnr", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, Globals.MandantNr))
|
|
End Select
|
|
|
|
scmCmdToExecute.Connection = conn.scoDBConnection
|
|
Try
|
|
sdaAdapter.Fill(dtToReturn)
|
|
Return dtToReturn
|
|
Catch ex As Exception
|
|
Throw New Exception("Dokumentpaket::Generic_Select::" & scmCmdToExecute.CommandText & "::Error occured." & ex.Message, ex)
|
|
Finally
|
|
scmCmdToExecute.Dispose()
|
|
sdaAdapter.Dispose()
|
|
End Try
|
|
End Function
|
|
|
|
Private Sub Load_Dokumentpaket()
|
|
'Dokumentpaket
|
|
Dim dp As New edokadb.clsEdex_dokumentpaket()
|
|
dp.cpMainConnectionProvider = conn
|
|
dp.iDokumentpaketnr = New SqlInt32(CType(Me.Dokumentpaketnr, Int32))
|
|
dp.SelectOne()
|
|
Me.Text = "Dokumentpaket: " + dp.sBezeichnung.Value
|
|
If dp.sWichtigehinweise.Value <> "" Then
|
|
Me.lblhinweis.Visible = True
|
|
Me.PicHinweis.Visible = True
|
|
Me.Wichtigerhinweis = dp.sWichtigehinweise.Value
|
|
Else
|
|
Me.lblhinweis.Visible = False
|
|
Me.PicHinweis.Visible = False
|
|
Me.Wichtigerhinweis = ""
|
|
End If
|
|
dp.Dispose()
|
|
|
|
'Dokumentpaketvorlagen
|
|
Dim dpv As DataTable
|
|
dpv = Generic_Select(1)
|
|
|
|
Dim i As Integer
|
|
For i = 0 To dpv.Rows.Count - 1
|
|
If dpv.Rows(i).Item("dtaktiv") = True Or (Me.DP_Instanz = True Or Me.IndividuellesDP = True) Then
|
|
Me.ColDokumenttypNr.Add(dpv.Rows(i).Item("Dokumenttypnr"))
|
|
End If
|
|
Next
|
|
|
|
End Sub
|
|
|
|
#End Region
|
|
|
|
#Region "Partner"
|
|
|
|
Private Sub btnPartnerInhaber_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnPartnerInhaber.Click
|
|
Me.lblabgeschlossen.Visible = False
|
|
Dim f As New FrmPartnersuche()
|
|
f.NurAbfrage = False
|
|
f.ShowDialog()
|
|
If f.PartnerNr <> 0 Then
|
|
Me.txtPartnerInhaber.Text = Str(f.PartnerNr) + " " + f.PartnerKurzbezeichnnung
|
|
Me.txtPartnerZusteller.Text = Me.get_partnerzusteller(f.PartnerNr)
|
|
Me.NrPar00 = f.PartnerNr
|
|
Me.Refresh_data()
|
|
Me.DokList.Enabled = True
|
|
End If
|
|
End Sub
|
|
|
|
Private Function get_partnerzusteller(ByVal nrpar00 As Integer) As String
|
|
Dim p As New edokadb.clsPartner()
|
|
Dim p1 As New edokadb.clsPartner()
|
|
Dim s As String
|
|
s = ""
|
|
p.cpMainConnectionProvider = conn
|
|
p.iNRPAR00 = New SqlInt32(CType(nrpar00, Int32))
|
|
p.SelectOne()
|
|
If p.iNRPAR00.ToString <> p.sNRPARAD.ToString Then
|
|
Try
|
|
p1.cpMainConnectionProvider = conn
|
|
p1.iNRPAR00 = New SqlInt32(CType(p.sNRPARAD.Value, Int32))
|
|
p1.SelectOne()
|
|
s = p1.sNRPARAD.ToString + " " + p1.sBKPAR00.Value
|
|
Catch
|
|
s = ""
|
|
End Try
|
|
End If
|
|
p.Dispose()
|
|
p1.Dispose()
|
|
get_partnerzusteller = s
|
|
End Function
|
|
|
|
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
|
|
Try
|
|
If Me.NrPar00 > 91000000 Then
|
|
Dim f As New frmInteressent()
|
|
f.Partnernr = Me.NrPar00
|
|
f.Display = True
|
|
f.ShowDialog()
|
|
f.Dispose()
|
|
Else
|
|
Dim f As New frmPartnerDetails()
|
|
f.Partnernr = Me.NrPar00
|
|
f.ShowDialog()
|
|
f.Dispose()
|
|
End If
|
|
Catch
|
|
Finally
|
|
End Try
|
|
|
|
End Sub
|
|
|
|
#End Region
|
|
|
|
#Region "Dokumentliste"
|
|
|
|
Private Sub Refresh_data()
|
|
Dim vertraulich As Integer
|
|
Dim i As Integer
|
|
Dim ii As Integer
|
|
Me.Dokumenttypnummern = ""
|
|
For Each i In Me.ColDokumenttypNr
|
|
If Me.Dokumenttypnummern <> "" Then Me.Dokumenttypnummern = Me.Dokumenttypnummern + ";"
|
|
Me.Dokumenttypnummern = Me.Dokumenttypnummern + LTrim(Str(i))
|
|
Next
|
|
dd = Generic_Select(3)
|
|
|
|
Me.DokList.DataSource = Nothing
|
|
Me.DokList.DataMember = Nothing
|
|
Me.DokList.DataSource = dd
|
|
Me.DokList.DataMember = dd.TableName
|
|
Me.DokList.Splits(0).DisplayColumns(0).Width = 0
|
|
Me.DokList.Splits(0).DisplayColumns(1).Width = 0
|
|
Me.DokList.Splits(0).DisplayColumns(2).Width = 20
|
|
Me.DokList.Splits(0).DisplayColumns(3).Width = 20
|
|
Me.DokList.Splits(0).DisplayColumns(4).Width = Me.DokList.Width - 60
|
|
|
|
|
|
For i = 0 To dd.Rows.Count - 1
|
|
If dd.Rows(i).Item("dokumentid") <> "0" Then
|
|
dd.Rows(i - 1).Item("haken") = 1
|
|
End If
|
|
If dd.Rows(i).Item("dokumentid") = "0" Then
|
|
If dd.Rows(i).Item("erstellung") = -1 Then
|
|
dd.Rows(i).Item("erstellung") = 0
|
|
dd.Rows(i).Item("Haken") = 1
|
|
Else
|
|
|
|
If dd.Rows(i).Item("vertraulich") = 1 Then vertraulich = 1 Else vertraulich = 0
|
|
If DivFnkt.Ist_Berechtigt(dd.Rows(i).Item("Dokumenttypnr"), Globals.MitarbeiterNr, Me.NrPar00, "", 2, 0, 0, vertraulich) = True Then
|
|
dd.Rows(i).Item("erstellung") = 1
|
|
Else
|
|
dd.Rows(i).Item("erstellung") = 0
|
|
dd.Rows(i).Item("Haken") = 1
|
|
End If
|
|
End If
|
|
Dim set2 As Boolean = False
|
|
If Me.MarkierteDT.Count > 0 Then
|
|
Try
|
|
For ii = 1 To Me.MarkierteDT.Count
|
|
If Me.MarkierteDT.Item(ii) = dd.Rows(i).Item("dokumenttypnr") Then
|
|
set2 = True
|
|
End If
|
|
Next
|
|
If set2 = True And Me.lblabgeschlossen.Visible = False Then
|
|
dd.Rows(i).Item("Haken") = 2
|
|
Me.DokList.Bookmark = i
|
|
Me.DokList.Columns(2).Value = 2
|
|
Me.DokList.Columns("erstellung").Value = 1
|
|
dd.Rows(i).Item("erstellung") = 1
|
|
Else
|
|
dd.Rows(i).Item("Haken") = 1
|
|
End If
|
|
|
|
Catch ex As Exception
|
|
dd.Rows(i).Item("haken") = 1
|
|
End Try
|
|
End If
|
|
If dd.Rows(i).Item("Erstellung") = 0 Then dd.Rows(i).Item("haken") = 1
|
|
End If
|
|
Next
|
|
|
|
|
|
For i = 5 To Me.DokList.Columns.Count - 1
|
|
Me.DokList.Splits(0).DisplayColumns(i).Width = 0
|
|
Next
|
|
|
|
Dim xbmp As Integer
|
|
For i = 0 To dd.Rows.Count - 1
|
|
xbmp = dd.Rows(i).Item("imageindex")
|
|
|
|
Dim bm As New Bitmap(Me.ImageList3.Images(xbmp))
|
|
Dim v0 As New C1.Win.C1TrueDBGrid.ValueItem(xbmp, bm)
|
|
Me.DokList.Columns(3).ValueItems.Values.Add(v0)
|
|
Me.DokList.Columns(3).ValueItems.Translate = True
|
|
Next
|
|
|
|
Dim bmp1 As New Bitmap(Me.ImageList2.Images(0))
|
|
Dim bmp2 As New Bitmap(Me.ImageList2.Images(1))
|
|
Dim bmp3 As New Bitmap(Me.ImageList2.Images(2))
|
|
Dim bmp4 As New Bitmap(Me.ImageList2.Images(3))
|
|
|
|
Dim v1 As New C1.Win.C1TrueDBGrid.ValueItem()
|
|
Dim v2 As New C1.Win.C1TrueDBGrid.ValueItem()
|
|
Dim v3 As New C1.Win.C1TrueDBGrid.ValueItem()
|
|
Dim v4 As New C1.Win.C1TrueDBGrid.ValueItem()
|
|
|
|
v1.DisplayValue = bmp1
|
|
v1.Value = 0
|
|
|
|
v2.DisplayValue = bmp2
|
|
v2.Value = 1
|
|
|
|
v3.DisplayValue = bmp3
|
|
v3.Value = 2
|
|
|
|
v4.DisplayValue = bmp4
|
|
v4.Value = 3
|
|
|
|
Me.DokList.Columns(2).ValueItems.Values.Add(v1)
|
|
Me.DokList.Columns(2).ValueItems.Values.Add(v2)
|
|
Me.DokList.Columns(2).ValueItems.Values.Add(v3)
|
|
Me.DokList.Columns(2).ValueItems.Values.Add(v4)
|
|
|
|
Me.DokList.Columns(2).ValueItems.Translate = True
|
|
'Me.DokList.RowHeight = 20
|
|
|
|
Me.DokList.CollapseColor = Color.White
|
|
Me.DokList.AllowHorizontalSplit = False
|
|
Me.DokList.AllowColMove = False
|
|
|
|
|
|
For i = 0 To Me.DokList.Columns.Count - 1
|
|
Me.DokList.Splits(0).DisplayColumns(i).Style.Borders.BorderType = C1.Win.C1TrueDBGrid.BorderTypeEnum.None
|
|
Me.DokList.Splits(0).DisplayColumns(i).Style.Borders.Bottom = 0
|
|
Me.DokList.Splits(0).DisplayColumns(i).Style.Borders.Left = 0
|
|
Me.DokList.Splits(0).DisplayColumns(i).Style.Borders.Right = 0
|
|
Me.DokList.Splits(0).DisplayColumns(i).Style.Borders.Top = 0
|
|
Me.DokList.Splits(0).DisplayColumns(i).AllowSizing = False
|
|
Me.DokList.Splits(0).DisplayColumns(i).ColumnDivider.Color = System.Drawing.Color.White
|
|
Next
|
|
End Sub
|
|
|
|
Private Function TagArt(ByVal tag As String) As String
|
|
Dim Art As String
|
|
Art = tag
|
|
Return Art.Substring(0, 3)
|
|
End Function
|
|
|
|
Private Function TagValue(ByVal tag As String) As String
|
|
Dim Keyvalue As String
|
|
Keyvalue = tag
|
|
Return Keyvalue.Substring(3, Len(Keyvalue) - 3)
|
|
End Function
|
|
|
|
Private Sub DokList_FetchRowStyle(ByVal sender As Object, ByVal e As C1.Win.C1TrueDBGrid.FetchRowStyleEventArgs) Handles DokList.FetchRowStyle
|
|
If Me.DokList.Columns(2).CellValue(e.Row) <> 0 Then
|
|
Dim fnt As Font
|
|
Else
|
|
Dim fnt As Font
|
|
fnt = New Font("Courier New", 8)
|
|
e.CellStyle.Font = fnt
|
|
End If
|
|
If Me.DokList.Columns("aktiv").CellValue(e.Row) = 0 And Me.DokList.Columns("dokumentid").CellValue(e.Row) = "0" Then
|
|
Dim FNT As Font = e.CellStyle.Font
|
|
e.CellStyle.Font = New Font(FNT, FontStyle.Strikeout)
|
|
End If
|
|
If Me.DokList.Columns("dokumentid").CellValue(e.Row) = "0" And Me.DokList.Columns("Erstellung").CellValue(e.Row) = 0 Then
|
|
e.CellStyle.ForeColor = Color.Gray
|
|
End If
|
|
Me.DokList.RecordSelectorStyle.Borders.BorderType = C1.Win.C1TrueDBGrid.BorderTypeEnum.None
|
|
End Sub
|
|
|
|
Private Sub C1TrueDBGrid1_FetchCellStyle(ByVal sender As Object, ByVal e As C1.Win.C1TrueDBGrid.FetchCellStyleEventArgs) Handles DokList.FetchCellStyle
|
|
If Me.DokList.Columns(3).CellValue(e.Row) <> 59 Then
|
|
e.CellStyle.BackColor = Color.LightGray
|
|
End If
|
|
e.CellStyle.Borders.BorderType = C1.Win.C1TrueDBGrid.BorderTypeEnum.Flat
|
|
e.CellStyle.Borders.Color = System.Drawing.Color.White
|
|
End Sub
|
|
|
|
Private Sub DokList_MouseDown(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles DokList.MouseDown
|
|
Me.DokList.Bookmark = Me.DokList.RowContaining(e.Y)
|
|
Try
|
|
If Me.DokList.Columns("dOKUMENTID").Text = "0" Then
|
|
Me.DokList.ContextMenu = Me.ContextMenuDokTyp
|
|
Else
|
|
Me.DokList.ContextMenu = Me.ContextMenuDokument
|
|
End If
|
|
Catch
|
|
|
|
End Try
|
|
|
|
If Me.DokList.ColContaining(e.X) <> 2 Then Exit Sub
|
|
|
|
'Beim Klick der rechten Maustaste die Funktion verlassen
|
|
'sonst ändern des Wertes in der Spalte "Haken"
|
|
If e.Button = MouseButtons.Right Then Exit Sub
|
|
Try
|
|
If Me.DokList.Columns(2).Value = 0 Then Exit Sub
|
|
If Me.DokList.Columns(2).Value = 1 Then
|
|
If Me.DokList.Columns("Erstellung").Value = 1 And Me.DokList.Columns("aktiv").Value = 1 Then
|
|
Me.DokList.Columns(2).Value = 2
|
|
End If
|
|
Else
|
|
If Me.DokList.Columns("Erstellung").Value = 1 And Me.DokList.Columns("aktiv").Value = 1 Then
|
|
Me.DokList.Columns(2).Value = 1
|
|
End If
|
|
End If
|
|
Try
|
|
Me.DokList.Bookmark = Me.DokList.Bookmark - 1
|
|
Catch
|
|
End Try
|
|
Try
|
|
Me.DokList.Bookmark = Me.DokList.Bookmark + 1
|
|
Catch
|
|
End Try
|
|
Me.DokList.Bookmark = Me.DokList.RowContaining(e.Y)
|
|
Catch
|
|
End Try
|
|
|
|
Me.lblabgeschlossen.Visible = False
|
|
|
|
End Sub
|
|
|
|
#End Region
|
|
|
|
#Region "Formular"
|
|
|
|
Private Sub PicHinweis_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles PicHinweis.Click, lblhinweis.Click
|
|
MsgBox(Me.Wichtigerhinweis, MsgBoxStyle.Exclamation)
|
|
End Sub
|
|
|
|
Private Sub btnAbbruch_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnAbbruch.Click
|
|
Me.Close()
|
|
End Sub
|
|
|
|
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
|
|
Me.Close()
|
|
Case 1
|
|
Case 2
|
|
Case 3
|
|
Dim f As New frmDokumentpaketInfo()
|
|
f.Key = Me.Dokumentpaketnr
|
|
f.ShowDialog()
|
|
f.Dispose()
|
|
End Select
|
|
End Sub
|
|
|
|
Private Sub btnWeiter_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnWeiter.Click
|
|
Dim i As Integer
|
|
Try
|
|
While Me.MarkierteDT.Count > 0
|
|
Me.MarkierteDT.Remove(1)
|
|
End While
|
|
Catch
|
|
|
|
End Try
|
|
For i = 0 To Me.DokList.Splits(0).Rows.Count - 1
|
|
If Me.DokList.Columns(2).CellValue(i) = 2 Then
|
|
Me.MarkierteDT.Add(Me.DokList.Columns("dokumenttypnr").CellValue(i))
|
|
End If
|
|
Next
|
|
Me.CurrentRow = 0
|
|
|
|
Dokumente_Abarbeiten(False)
|
|
End Sub
|
|
|
|
Private Sub frmDokumentpaket_Closing(ByVal sender As Object, ByVal e As System.ComponentModel.CancelEventArgs) Handles MyBase.Closing
|
|
If Me.DokList.Enabled = False Then Exit Sub
|
|
Dim dp_unfertig As Boolean = False
|
|
Dim i As Integer
|
|
Dim shaken As String = ""
|
|
For i = 0 To Me.DokList.Splits(0).Rows.Count - 1
|
|
Me.DokList.Bookmark = i
|
|
If Me.DokList.Columns("Haken").Value > 1 Then dp_unfertig = True
|
|
If Me.DokList.Columns("Haken").Value > 0 Then
|
|
If shaken <> "" Then shaken = shaken + ";"
|
|
shaken = shaken + LTrim(Str(Me.DokList.Columns("Haken").Value))
|
|
End If
|
|
Next
|
|
If dp_unfertig Then
|
|
Dim msgresult As Integer
|
|
msgresult = MyMsg.Show_MessageYesNoCancel(411)
|
|
Select Case msgresult
|
|
Case MsgBoxResult.No
|
|
Exit Sub
|
|
Case MsgBoxResult.Cancel
|
|
e.Cancel = True
|
|
Exit Sub
|
|
Case MsgBoxResult.Yes
|
|
Me.Dokumenttypnummern = ""
|
|
For Each i In Me.ColDokumenttypNr
|
|
If Me.Dokumenttypnummern <> "" Then Me.Dokumenttypnummern = Me.Dokumenttypnummern + ";"
|
|
Me.Dokumenttypnummern = Me.Dokumenttypnummern + LTrim(Str(i))
|
|
Next
|
|
Dim dpi As New edokadb.clsEdex_dpinstanz()
|
|
dpi.cpMainConnectionProvider = conn
|
|
If Me.dp_instanznr <> 0 Then
|
|
Try
|
|
dpi.iNreintrag = New SqlInt32(CType(Me.dp_instanznr, Int32))
|
|
dpi.SelectOne()
|
|
dpi.sDokumentpaketnummern = New SqlString(CType(Me.Dokumenttypnummern, String))
|
|
dpi.sHacken = New SqlString(CType(shaken, String))
|
|
dpi.iProfilnr = New SqlInt32(CType(Me.Profilnr, Int32))
|
|
conn.OpenConnection()
|
|
dpi.Update()
|
|
conn.CloseConnection(True)
|
|
Catch
|
|
MsgBox("Beim Speichern der Dokumentpaketinstanz ist ein Fehler aufgetreten.")
|
|
End Try
|
|
Else
|
|
Try
|
|
dpi.sDokumentpaketnummern = New SqlString(CType(Me.Dokumenttypnummern, String))
|
|
dpi.sHacken = New SqlString(CType(shaken, String))
|
|
dpi.bIndividuellesDP = New SqlBoolean(CType(Me.IndividuellesDP, Boolean))
|
|
dpi.daErstellt_am = New SqlDateTime(CType(Now(), DateTime))
|
|
dpi.iDokumentpaketnr = New SqlInt32(CType(Me.Dokumentpaketnr, Int32))
|
|
dpi.iMitarbeiternr = New SqlInt32(CType(Globals.MitarbeiterNr, Int32))
|
|
dpi.iNrpar00 = New SqlInt32(CType(Me.NrPar00, Int32))
|
|
dpi.iProfilnr = New SqlInt32(CType(Me.Profilnr, Int32))
|
|
conn.OpenConnection()
|
|
dpi.Insert()
|
|
conn.CloseConnection(True)
|
|
Catch ex As Exception
|
|
MsgBox(ex.Message)
|
|
MsgBox("Beim Speichern der Dokumentpaketinstanz ist ein Fehler aufgetreten.")
|
|
End Try
|
|
End If
|
|
End Select
|
|
End If
|
|
End Sub
|
|
|
|
#End Region
|
|
|
|
#Region "Contextmenu"
|
|
Private Sub MnuMark_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MnuMark.Click
|
|
If Me.DokList.Columns("Erstellung").Value = 1 And Me.DokList.Columns("Aktiv").Value = 1 Then
|
|
Dim i
|
|
i = Me.DokList.Bookmark
|
|
Me.DokList.Columns("Haken").Value = 2
|
|
Try
|
|
Me.DokList.Bookmark = Me.DokList.Bookmark - 1
|
|
Catch
|
|
End Try
|
|
Try
|
|
Me.DokList.Bookmark = Me.DokList.Bookmark + 1
|
|
Catch
|
|
End Try
|
|
Me.DokList.Bookmark = i
|
|
End If
|
|
End Sub
|
|
|
|
Private Sub MnuUnmark_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MnuUnmark.Click
|
|
If Me.DokList.Columns("Erstellung").Value = 1 And Me.DokList.Columns("Aktiv").Value = 1 Then
|
|
Dim i
|
|
i = Me.DokList.Bookmark
|
|
Me.DokList.Columns("Haken").Value = 1
|
|
Try
|
|
Me.DokList.Bookmark = Me.DokList.Bookmark - 1
|
|
Catch
|
|
End Try
|
|
Try
|
|
Me.DokList.Bookmark = Me.DokList.Bookmark + 1
|
|
Catch
|
|
End Try
|
|
Me.DokList.Bookmark = i
|
|
End If
|
|
End Sub
|
|
|
|
Private Sub MnuShowDoc_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MnuShowDoc.Click
|
|
If Microsoft.VisualBasic.Left(Me.DokList.Columns("Dokumentid").Value, 3) = "OFF" Then
|
|
Dim t As DataTable
|
|
t = DivFnkt.Berechtigte_Mitarbeiter(0, Globals.MitarbeiterNr, 0, Me.DokList.Columns("dokumentid").Value, 1, 0, 0, 0, "")
|
|
If t.Rows.Count = 0 Then
|
|
MyMsg.show_standardmessage(43, MsgBoxStyle.Critical)
|
|
Exit Sub
|
|
End If
|
|
DivFnkt.ShowDoc(Me.DokList.Columns("dokumentid").Value, Me)
|
|
Else
|
|
Dim dt As DataTable
|
|
Dim t As DataTable
|
|
dt = get_uvmdaten()
|
|
t = DivFnkt.Berechtigte_Mitarbeiter(0, Globals.MitarbeiterNr, 0, Me.DokList.Columns("dokumentid").Value, 1, 0, 0, 0, "")
|
|
If t.Rows.Count = 0 Then
|
|
MyMsg.show_standardmessage(43, MsgBoxStyle.Critical)
|
|
Exit Sub
|
|
End If
|
|
DivFnkt.Erstellungsdatum = dt.Rows(0).Item("dmers00")
|
|
DivFnkt.Belegart = "UVM"
|
|
DivFnkt.UVMZVDokumenttyp = dt.Rows(0).Item("nrdot00")
|
|
DivFnkt.ShowColdDocHost(dt.Rows(0).Item("nrdoc00"), Me.ParentForm, dt.Rows(0).Item("nrdoc00"), _
|
|
dt.Rows(0).Item("nrpar00"), "", dt.Rows(0).Item("doktyp"))
|
|
End If
|
|
|
|
End Sub
|
|
|
|
Public Function get_uvmdaten() As DataTable
|
|
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
|
|
Dim dtToReturn As DataTable = New DataTable()
|
|
Dim sdaAdapter As SqlDataAdapter = New SqlDataAdapter(scmCmdToExecute)
|
|
scmCmdToExecute.CommandText = "dbo.edex_sp_get_uvmdata"
|
|
scmCmdToExecute.CommandType = CommandType.StoredProcedure
|
|
scmCmdToExecute.Connection = conn.scoDBConnection
|
|
Try
|
|
scmCmdToExecute.Parameters.Add(New SqlParameter("@dokumenttypnr", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, Me.DokList.Columns("dokumenttypnr").Value))
|
|
scmCmdToExecute.Parameters.Add(New SqlParameter("@dokumentit", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, Me.DokList.Columns("dokumentid").Value))
|
|
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 MnuTrefferliste_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MnuTrefferliste.Click
|
|
Try
|
|
Me.Cursor = System.Windows.Forms.Cursors.WaitCursor
|
|
Dim t As DataTable
|
|
t = Generic_Select(4)
|
|
If t.Rows.Count > 0 Then
|
|
Globals.profilnr = 0
|
|
Dim f As New frmTrefferliste()
|
|
f.MdiParent = Me.MdiParent
|
|
f.Show()
|
|
f.Partner_Eingegeben = True
|
|
f.txtnrpar00.Text = LTrim(t.Rows(0).Item("NRPAR00"))
|
|
f.refresh_list()
|
|
f.PosDok(Me.DokList.Columns("Dokumentid").Text, t.Rows(0).Item("dokumentart"))
|
|
Me.Cursor = System.Windows.Forms.Cursors.Default
|
|
End If
|
|
Catch
|
|
End Try
|
|
|
|
End Sub
|
|
|
|
Private Sub MnuAddDok_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MnuAddDok.Click
|
|
Dim f As New frmVorlagenauswahl()
|
|
f.ToolBar1.Buttons(2).Pushed = True
|
|
'Me.savedata = Me.DokList.DataSource
|
|
f.TVStruktur.ImageList = Me.ImageList3
|
|
f.edex_vorlagenauswahl = True
|
|
f.ShowDialog()
|
|
If f.Dokumentvorlage = 0 Then Exit Sub
|
|
|
|
Dim d As DataTable
|
|
Dim i As Integer
|
|
d = Me.DokList.DataSource
|
|
For i = 0 To d.Rows.Count - 1
|
|
If d.Rows(i).Item("dokumenttypnr") = f.Dokumentvorlage Then
|
|
MsgBox("Diese Dokumentvorlage ist im Paket bereits vorhanden.", MsgBoxStyle.Information)
|
|
Exit Sub
|
|
End If
|
|
Next
|
|
Me.ColDokumenttypNr.Add(f.Dokumentvorlage)
|
|
|
|
Dim rowvals(4) As Object
|
|
rowvals(0) = "0"
|
|
rowvals(1) = Str(f.Dokumentvorlage)
|
|
rowvals(2) = 1
|
|
rowvals(3) = f.TVStruktur.SelectedNode.ImageIndex
|
|
rowvals(4) = f.TVStruktur.SelectedNode.Text
|
|
|
|
If Me.IndividuellesDP = False Then Me.saveasidvDP = True
|
|
d.Rows.Add(rowvals)
|
|
Me.DokList.DataSource = Nothing
|
|
Me.DokList.DataMember = Nothing
|
|
Me.DokList.DataSource = d
|
|
Me.DokList.DataMember = d.TableName
|
|
|
|
Me.Refresh_data()
|
|
End Sub
|
|
|
|
Private Sub MenuItem1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MenuItem1.Click
|
|
Dim f As New frmDokumenttypInfo()
|
|
Try
|
|
f.Key = Me.DokList.Columns("Dokumenttypnr").Text
|
|
f.Text = f.Text + " " + Me.DokList.Columns("stext").Text
|
|
f.ShowDialog()
|
|
Catch
|
|
Finally
|
|
f.Dispose()
|
|
End Try
|
|
|
|
End Sub
|
|
|
|
Private Sub mnuDPKopieren_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles mnuDPKopieren.Click
|
|
Dim f As frmDokumentpaketdefinition
|
|
If Me.IndividuellesDP Then
|
|
f = New frmDokumentpaketdefinition(False, Me.Dokumentpaketnr, True)
|
|
Else
|
|
f = New frmDokumentpaketdefinition(False, Me.Dokumentpaketnr, True)
|
|
End If
|
|
f.Kopie = True
|
|
f.ShowDialog()
|
|
f.Dispose()
|
|
End Sub
|
|
|
|
Private Sub ContextMenuDokTyp_Popup(ByVal sender As Object, ByVal e As System.EventArgs) Handles ContextMenuDokTyp.Popup
|
|
If Me.IndividuellesDP = True Then
|
|
Me.MnuVerwaltung.Visible = True
|
|
Me.mnusaveStandard.Visible = False
|
|
Else
|
|
Me.mnusaveStandard.Visible = True
|
|
Me.MnuVerwaltung.Visible = False
|
|
End If
|
|
If Me.DokList.Columns("Erstellung").Value = 1 Then
|
|
Me.MnuMark.Enabled = True
|
|
Me.MnuUnmark.Enabled = True
|
|
Else
|
|
Me.MnuMark.Enabled = False
|
|
Me.MnuUnmark.Enabled = False
|
|
End If
|
|
End Sub
|
|
|
|
Private Sub MnuSaveAs_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MnuSaveAs.Click, mnusaveStandard.Click
|
|
Dim i As Integer
|
|
Me.Dokumenttypnummern = ""
|
|
For Each i In Me.ColDokumenttypNr
|
|
If Me.Dokumenttypnummern <> "" Then Me.Dokumenttypnummern = Me.Dokumenttypnummern + ";"
|
|
Me.Dokumenttypnummern = Me.Dokumenttypnummern + LTrim(Str(i))
|
|
Next
|
|
If Me.IndividuellesDP = False Then
|
|
Dim f As New frmDokumentpaketdefinition(True, Me.Dokumentpaketnr, True, Me.Dokumenttypnummern)
|
|
Cursor = Cursors.WaitCursor
|
|
f.ShowDialog()
|
|
Cursor = Cursors.Default
|
|
Else
|
|
Cursor = Cursors.WaitCursor
|
|
Application.DoEvents()
|
|
Dim f As New frmDokumentpaketdefinition(False, Me.Dokumentpaketnr, True, Me.Dokumenttypnummern)
|
|
f.Visible = False
|
|
f.Width = 1
|
|
f.Height = 1
|
|
Cursor = Cursors.WaitCursor
|
|
Application.DoEvents()
|
|
f.Show()
|
|
Cursor = Cursors.WaitCursor
|
|
Application.DoEvents()
|
|
f.Hide()
|
|
Cursor = Cursors.WaitCursor
|
|
Application.DoEvents()
|
|
If f.FormValidator(False) = False Then
|
|
Cursor = Cursors.Default
|
|
f.Visible = True
|
|
|
|
f.Refresh()
|
|
Exit Sub
|
|
Else
|
|
Cursor = Cursors.WaitCursor
|
|
Application.DoEvents()
|
|
f.Save_Dokumentpaket()
|
|
Cursor = Cursors.Default
|
|
MyMsg.show_standardmessage(412, MsgBoxStyle.Information)
|
|
f.Dispose()
|
|
End If
|
|
End If
|
|
|
|
End Sub
|
|
|
|
#End Region
|
|
|
|
#Region "Dokumentbearbeitung"
|
|
|
|
Private Sub Timer1_Tick(ByVal sender As Object, ByVal e As System.EventArgs) Handles Timer1.Tick, Timer2.Tick
|
|
Me.Timer2.Enabled = False
|
|
Dim s As String
|
|
Try
|
|
Dim i2 As Integer
|
|
For i2 = 1 To Globals.DP_Collection.Count
|
|
If Globals.DP_Collection.Item(i2) = Me.dokumentid Then Exit Sub
|
|
Next
|
|
Catch
|
|
s = ""
|
|
End Try
|
|
If Me.dokumentid = "" Then Exit Sub
|
|
Me.Timer1.Enabled = False
|
|
Dim EndeBearbeitung As Boolean = False
|
|
If Me.dokumentid = "Timer2HandleED" Then EndeBearbeitung = True
|
|
Me.dokumentid = ""
|
|
Me.InBearbeitung = False
|
|
Dim i As Integer
|
|
Dim i1 As Integer
|
|
Dim bm As Boolean
|
|
bm = Me.DokList.Bookmark
|
|
|
|
For i = 1 To Me.MarkierteDT.Count
|
|
Try
|
|
If Me.MarkierteDT.Item(i) = Me.DokumenttypInBearbeitung Then
|
|
Me.MarkierteDT.Remove(i)
|
|
If Me.MarkierteDT.Count < 1 Then Me.MarkierteDT.Add("999999")
|
|
i = i - 1
|
|
End If
|
|
Catch
|
|
End Try
|
|
Next
|
|
|
|
Me.Refresh_data()
|
|
|
|
|
|
Me.DokList.Bookmark = bm
|
|
|
|
Dim gg As DataTable = Me.DokList.DataSource
|
|
For Each i In Me.MarkierteDT
|
|
For i1 = 0 To gg.Rows.Count - 1
|
|
If gg.Rows(i1).Item("Dokumentid") = "0" And gg.Rows(i1).Item("dokumenttypnr") = i Then
|
|
gg.Rows(i1).Item("haken") = 2
|
|
End If
|
|
Next
|
|
Next
|
|
Me.DokList.DataSource = gg
|
|
If EndeBearbeitung = True Then
|
|
If Me.MarkierteDT.Count = 1 And Me.MarkierteDT.Item(1) = 999999 Then
|
|
Me.lblabgeschlossen.Visible = True
|
|
If Me.DP_Instanz = True Then
|
|
delete_gespeicherte_dpinstanz(Me.dp_instanznr)
|
|
End If
|
|
End If
|
|
Exit Sub
|
|
End If
|
|
Me.Dokumente_Abarbeiten(True)
|
|
End Sub
|
|
|
|
Public Function delete_gespeicherte_dpinstanz(ByVal dp_instanznr As Integer)
|
|
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
|
|
scmCmdToExecute.CommandText = "edex_sp_dpinstanz"
|
|
scmCmdToExecute.CommandType = CommandType.StoredProcedure
|
|
Dim dtToReturn As DataTable = New DataTable()
|
|
Dim sdaAdapter As SqlDataAdapter = New SqlDataAdapter(scmCmdToExecute)
|
|
scmCmdToExecute.Parameters.Add(New SqlParameter("@mitarbeiternr", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, Globals.MitarbeiterNr))
|
|
scmCmdToExecute.Parameters.Add(New SqlParameter("@dpinstanznr", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, dp_instanznr))
|
|
scmCmdToExecute.Parameters.Add(New SqlParameter("@fnkt", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, 2))
|
|
|
|
scmCmdToExecute.Connection = conn.scoDBConnection
|
|
Try
|
|
|
|
sdaAdapter.Fill(dtToReturn)
|
|
Return dtToReturn
|
|
Catch ex As Exception
|
|
Throw New Exception("Dokumentpaket::Generic_Select::" & scmCmdToExecute.CommandText & "::Error occured." & ex.Message, ex)
|
|
Finally
|
|
scmCmdToExecute.Dispose()
|
|
sdaAdapter.Dispose()
|
|
End Try
|
|
End Function
|
|
|
|
|
|
|
|
|
|
Private Sub Dokumente_Abarbeiten(ByVal check_bearbeitungsende As Boolean)
|
|
Dim i As Integer
|
|
Dim showbc As Boolean
|
|
' Me.savedata = Me.DokList.DataSource
|
|
|
|
Dim dt As New edokadb.clsDokumenttyp()
|
|
dt.cpMainConnectionProvider = conn
|
|
Globals.bckdokument = False
|
|
For i = 0 To Me.DokList.Splits(0).Rows.Count - 1
|
|
If Me.DokList.Columns(2).CellValue(i) = 2 Then
|
|
dt.iDokumenttypnr = New SqlInt32(CType(Me.DokList.Columns("dokumenttypnr").CellValue(i), Int32))
|
|
dt.cpMainConnectionProvider = conn
|
|
dt.SelectOne()
|
|
If dt.bAktiv.Value = True Then
|
|
If dt.bDokument_wird_retourniert.Value = True And dt.bDokument_wird_erstellt.Value = False Then showbc = True
|
|
If dt.bDokument_wird_retourniert.Value = True And dt.bDokument_wird_erstellt.Value = True Then
|
|
Dim f As New frmbcquestion()
|
|
f.ShowDialog()
|
|
If f.DialogResult = DialogResult.Abort Then showbc = True
|
|
If f.DialogResult = DialogResult.OK Then showbc = False
|
|
f.Dispose()
|
|
End If
|
|
If showbc Then
|
|
Dim f As New frmBarcodeKleber()
|
|
f.TopMost = True
|
|
f.ShowDialog()
|
|
If f.DialogResult = DialogResult.Abort Then
|
|
Exit Sub
|
|
Else
|
|
If f.DialogResult = DialogResult.OK Then
|
|
Me.barcodeid = f.BarcodeID
|
|
Globals.bckdokument = True
|
|
Else
|
|
End If
|
|
End If
|
|
End If
|
|
Me.DokList.Bookmark = i
|
|
Me.DokumenttypInBearbeitung = dt.iDokumenttypnr.Value
|
|
dt.SelectOne()
|
|
If Globals.bckdokument = True Then
|
|
If barcodedokument_erstellen(Me.barcodeid) = True Then
|
|
Me.DokList.Bookmark = i
|
|
Me.DokList.Columns(2).Value = 1
|
|
Me.InBearbeitung = False
|
|
showbc = False
|
|
Globals.bckdokument = False
|
|
Me.dokumentid = "Timer2HandleBC"
|
|
Me.Timer2.Enabled = True
|
|
Exit Sub
|
|
End If
|
|
Else
|
|
If dt.bNurnative.Value = True Then
|
|
If einzeldokument_erstellen() = True Then
|
|
Me.DokList.Bookmark = i
|
|
Me.DokList.Columns(2).Value = 1
|
|
Me.InBearbeitung = False
|
|
MyMsg.show_standardmessage(413, MsgBoxStyle.Information)
|
|
Me.dokumentid = "Timer2HandleED"
|
|
Me.Timer2.Enabled = True
|
|
Exit Sub
|
|
End If
|
|
Else
|
|
If normaldokument_erstellen(i) = True Then
|
|
Me.DokList.Bookmark = i
|
|
Me.DokList.Columns(2).Value = 3
|
|
Me.InBearbeitung = True
|
|
Me.Timer1.Enabled = True
|
|
End If
|
|
End If
|
|
Exit For
|
|
End If
|
|
Else
|
|
MsgBox("Der ausgewählte Dokumenttyp '" + dt.sBezeichnung.Value + "' ist nicht mehr aktiv.", MsgBoxStyle.Information)
|
|
End If
|
|
End If
|
|
Next
|
|
dt.Dispose()
|
|
Me.CurrentRow = i
|
|
Try
|
|
If Me.MarkierteDT.Count = 1 And Me.MarkierteDT.Item(1) = 999999 And Me.InBearbeitung = False Then
|
|
Me.lblabgeschlossen.Visible = True
|
|
If Me.DP_Instanz = True Then
|
|
delete_gespeicherte_dpinstanz(Me.dp_instanznr)
|
|
End If
|
|
Else
|
|
Me.lblabgeschlossen.Visible = False
|
|
End If
|
|
Catch
|
|
Me.lblabgeschlossen.Visible = False
|
|
End Try
|
|
End Sub
|
|
|
|
Private Function barcodedokument_erstellen(ByVal barcodeid As String) As Boolean
|
|
Cursor = Cursors.WaitCursor
|
|
Dim fI As New frmDokumentbearbeitungBC()
|
|
fI.Edex_Folgestatus = Me.cbdokumentstatus.SelectedIndex
|
|
fI.Profile = Me.Profile
|
|
fI.Profilnr = Me.Profilnr
|
|
fI.Partnernr = Me.NrPar00
|
|
fI.BarcodeID = barcodeid
|
|
fI.Dokumenttypnr = Me.DokList.Columns("dokumenttypnr").Text
|
|
fI.CreateDocument = True
|
|
Me.Cursor = Cursors.Default
|
|
fI.ShowDialog()
|
|
fI.Dispose()
|
|
Return True
|
|
End Function
|
|
|
|
Private Function einzeldokument_erstellen() As Boolean
|
|
Cursor = Cursors.WaitCursor
|
|
Dim fI As New frmDokumentbearbeitungED()
|
|
fI.Profile = Me.Profile
|
|
fI.Profilnr = Me.Profilnr
|
|
fI.Partnernr = Me.NrPar00
|
|
fI.Dokumenttypnr = Me.DokList.Columns("dokumenttypnr").Text
|
|
fI.CreateDocument = True
|
|
Me.Cursor = Cursors.Default
|
|
fI.ShowDialog()
|
|
fI.Dispose()
|
|
Return True
|
|
End Function
|
|
|
|
Private Function normaldokument_erstellen(ByVal colrow As Integer) As Boolean
|
|
Cursor = Cursors.WaitCursor()
|
|
Dim fI As New frmDokumentbearbeitung()
|
|
fI.Edex_Folgestatus = Me.cbdokumentstatus.SelectedIndex
|
|
fI.Profile = Me.Profile
|
|
fI.Profilnr = Me.Profilnr
|
|
fI.Partnernr = Me.NrPar00
|
|
fI.Dokumenttypnr = Me.DokList.Columns("dokumenttypnr").CellValue(colrow)
|
|
fI.CreateDocument = True
|
|
Me.Cursor = Cursors.Default
|
|
fI.ShowDialog()
|
|
If fI.w.DokumentID <> "" Then
|
|
Me.dokumentid = fI.w.DokumentID
|
|
Globals.DP_Collection.Add(Me.dokumentid)
|
|
fI.Dispose()
|
|
Return True
|
|
Else
|
|
fI.Dispose()
|
|
Return False
|
|
End If
|
|
End Function
|
|
|
|
|
|
#End Region
|
|
|
|
|
|
|
|
Private Sub mnuDPMAKopieren_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles mnuDPMAKopieren.Click
|
|
Dim ma As New frmMitarbeiterSelektion()
|
|
Dim i As Integer
|
|
i = ma.ShowDialog()
|
|
If Not i = DialogResult.OK Then
|
|
Exit Sub
|
|
End If
|
|
i = ma.Mitarbeiternr
|
|
ma.Dispose()
|
|
Dim f As frmDokumentpaketdefinition
|
|
f = New frmDokumentpaketdefinition(Me.Dokumentpaketnr, i)
|
|
f.Show()
|
|
f.Dispose()
|
|
MyMsg.show_standardmessage(415, MsgBoxStyle.Information)
|
|
End Sub
|
|
|
|
Private Sub BtnHelp_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BtnHelp.Click
|
|
Globals.HTMLHelp.ShowHelpToc("dokumentpaketdialog")
|
|
End Sub
|
|
End Class
|