NEU
This commit is contained in:
6
DienstplanTV/App.config
Normal file
6
DienstplanTV/App.config
Normal file
@@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<configuration>
|
||||
<startup>
|
||||
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5"/>
|
||||
</startup>
|
||||
</configuration>
|
||||
306
DienstplanTV/DienstplanTV.Designer.vb
generated
Normal file
306
DienstplanTV/DienstplanTV.Designer.vb
generated
Normal file
@@ -0,0 +1,306 @@
|
||||
<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _
|
||||
Partial Class DienstplanTV
|
||||
Inherits System.Windows.Forms.Form
|
||||
|
||||
'Das Formular überschreibt den Löschvorgang, um die Komponentenliste zu bereinigen.
|
||||
<System.Diagnostics.DebuggerNonUserCode()> _
|
||||
Protected Overrides Sub Dispose(ByVal disposing As Boolean)
|
||||
Try
|
||||
If disposing AndAlso components IsNot Nothing Then
|
||||
components.Dispose()
|
||||
End If
|
||||
Finally
|
||||
MyBase.Dispose(disposing)
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
'Wird vom Windows Form-Designer benötigt.
|
||||
Private components As System.ComponentModel.IContainer
|
||||
|
||||
'Hinweis: Die folgende Prozedur ist für den Windows Form-Designer erforderlich.
|
||||
'Das Bearbeiten ist mit dem Windows Form-Designer möglich.
|
||||
'Das Bearbeiten mit dem Code-Editor ist nicht möglich.
|
||||
<System.Diagnostics.DebuggerStepThrough()> _
|
||||
Private Sub InitializeComponent()
|
||||
Me.components = New System.ComponentModel.Container()
|
||||
Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(DienstplanTV))
|
||||
Me.Panel1 = New System.Windows.Forms.Panel()
|
||||
Me.tbcntr = New System.Windows.Forms.TabControl()
|
||||
Me.tbSUB = New System.Windows.Forms.TabPage()
|
||||
Me.tbATILLA = New System.Windows.Forms.TabPage()
|
||||
Me.tbWAI = New System.Windows.Forms.TabPage()
|
||||
Me.tbSBG = New System.Windows.Forms.TabPage()
|
||||
Me.tbVerr = New System.Windows.Forms.TabPage()
|
||||
Me.tbNKD = New System.Windows.Forms.TabPage()
|
||||
Me.Panel2 = New System.Windows.Forms.Panel()
|
||||
Me.PictureBox2 = New System.Windows.Forms.PictureBox()
|
||||
Me.Button2 = New System.Windows.Forms.Button()
|
||||
Me.lblKw = New System.Windows.Forms.Label()
|
||||
Me.Button1 = New System.Windows.Forms.Button()
|
||||
Me.lblROTBLAU = New System.Windows.Forms.Label()
|
||||
Me.Label1 = New System.Windows.Forms.Label()
|
||||
Me.PictureBox1 = New System.Windows.Forms.PictureBox()
|
||||
Me.pnlMain = New System.Windows.Forms.Panel()
|
||||
Me.Panel3 = New System.Windows.Forms.Panel()
|
||||
Me.Timer1 = New System.Windows.Forms.Timer(Me.components)
|
||||
Me.Panel4 = New System.Windows.Forms.Panel()
|
||||
Me.Panel1.SuspendLayout()
|
||||
Me.tbcntr.SuspendLayout()
|
||||
Me.Panel2.SuspendLayout()
|
||||
CType(Me.PictureBox2, System.ComponentModel.ISupportInitialize).BeginInit()
|
||||
CType(Me.PictureBox1, System.ComponentModel.ISupportInitialize).BeginInit()
|
||||
Me.Panel4.SuspendLayout()
|
||||
Me.SuspendLayout()
|
||||
'
|
||||
'Panel1
|
||||
'
|
||||
Me.Panel1.BackColor = System.Drawing.Color.White
|
||||
Me.Panel1.Controls.Add(Me.tbcntr)
|
||||
Me.Panel1.Controls.Add(Me.Panel2)
|
||||
Me.Panel1.Controls.Add(Me.lblROTBLAU)
|
||||
Me.Panel1.Controls.Add(Me.Label1)
|
||||
Me.Panel1.Controls.Add(Me.PictureBox1)
|
||||
Me.Panel1.Dock = System.Windows.Forms.DockStyle.Top
|
||||
Me.Panel1.Location = New System.Drawing.Point(0, 0)
|
||||
Me.Panel1.Name = "Panel1"
|
||||
Me.Panel1.Size = New System.Drawing.Size(1118, 71)
|
||||
Me.Panel1.TabIndex = 0
|
||||
'
|
||||
'tbcntr
|
||||
'
|
||||
Me.tbcntr.Anchor = CType(((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Left) _
|
||||
Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
|
||||
Me.tbcntr.Controls.Add(Me.tbSUB)
|
||||
Me.tbcntr.Controls.Add(Me.tbATILLA)
|
||||
Me.tbcntr.Controls.Add(Me.tbWAI)
|
||||
Me.tbcntr.Controls.Add(Me.tbSBG)
|
||||
Me.tbcntr.Controls.Add(Me.tbVerr)
|
||||
Me.tbcntr.Controls.Add(Me.tbNKD)
|
||||
Me.tbcntr.Font = New System.Drawing.Font("Microsoft Sans Serif", 14.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
|
||||
Me.tbcntr.Location = New System.Drawing.Point(303, 38)
|
||||
Me.tbcntr.Name = "tbcntr"
|
||||
Me.tbcntr.SelectedIndex = 0
|
||||
Me.tbcntr.Size = New System.Drawing.Size(621, 33)
|
||||
Me.tbcntr.TabIndex = 6
|
||||
'
|
||||
'tbSUB
|
||||
'
|
||||
Me.tbSUB.Location = New System.Drawing.Point(4, 33)
|
||||
Me.tbSUB.Name = "tbSUB"
|
||||
Me.tbSUB.Padding = New System.Windows.Forms.Padding(3)
|
||||
Me.tbSUB.Size = New System.Drawing.Size(613, 0)
|
||||
Me.tbSUB.TabIndex = 0
|
||||
Me.tbSUB.Text = "SUBEN"
|
||||
Me.tbSUB.UseVisualStyleBackColor = True
|
||||
'
|
||||
'tbATILLA
|
||||
'
|
||||
Me.tbATILLA.Location = New System.Drawing.Point(4, 33)
|
||||
Me.tbATILLA.Name = "tbATILLA"
|
||||
Me.tbATILLA.Padding = New System.Windows.Forms.Padding(3)
|
||||
Me.tbATILLA.Size = New System.Drawing.Size(613, 0)
|
||||
Me.tbATILLA.TabIndex = 1
|
||||
Me.tbATILLA.Text = "ATILLA"
|
||||
Me.tbATILLA.UseVisualStyleBackColor = True
|
||||
'
|
||||
'tbWAI
|
||||
'
|
||||
Me.tbWAI.Location = New System.Drawing.Point(4, 33)
|
||||
Me.tbWAI.Name = "tbWAI"
|
||||
Me.tbWAI.Padding = New System.Windows.Forms.Padding(3)
|
||||
Me.tbWAI.Size = New System.Drawing.Size(613, 0)
|
||||
Me.tbWAI.TabIndex = 2
|
||||
Me.tbWAI.Text = "WAIDHAUS"
|
||||
Me.tbWAI.UseVisualStyleBackColor = True
|
||||
'
|
||||
'tbSBG
|
||||
'
|
||||
Me.tbSBG.Location = New System.Drawing.Point(4, 33)
|
||||
Me.tbSBG.Name = "tbSBG"
|
||||
Me.tbSBG.Padding = New System.Windows.Forms.Padding(3)
|
||||
Me.tbSBG.Size = New System.Drawing.Size(613, 0)
|
||||
Me.tbSBG.TabIndex = 3
|
||||
Me.tbSBG.Text = "BAD REICHENHALL"
|
||||
Me.tbSBG.UseVisualStyleBackColor = True
|
||||
'
|
||||
'tbVerr
|
||||
'
|
||||
Me.tbVerr.Location = New System.Drawing.Point(4, 33)
|
||||
Me.tbVerr.Name = "tbVerr"
|
||||
Me.tbVerr.Padding = New System.Windows.Forms.Padding(3)
|
||||
Me.tbVerr.Size = New System.Drawing.Size(613, 0)
|
||||
Me.tbVerr.TabIndex = 5
|
||||
Me.tbVerr.Text = "Verrechnung"
|
||||
Me.tbVerr.UseVisualStyleBackColor = True
|
||||
'
|
||||
'tbNKD
|
||||
'
|
||||
Me.tbNKD.Location = New System.Drawing.Point(4, 33)
|
||||
Me.tbNKD.Name = "tbNKD"
|
||||
Me.tbNKD.Size = New System.Drawing.Size(613, 0)
|
||||
Me.tbNKD.TabIndex = 4
|
||||
Me.tbNKD.UseVisualStyleBackColor = True
|
||||
'
|
||||
'Panel2
|
||||
'
|
||||
Me.Panel2.Controls.Add(Me.PictureBox2)
|
||||
Me.Panel2.Controls.Add(Me.Button2)
|
||||
Me.Panel2.Controls.Add(Me.lblKw)
|
||||
Me.Panel2.Controls.Add(Me.Button1)
|
||||
Me.Panel2.Dock = System.Windows.Forms.DockStyle.Right
|
||||
Me.Panel2.Location = New System.Drawing.Point(918, 0)
|
||||
Me.Panel2.Name = "Panel2"
|
||||
Me.Panel2.Size = New System.Drawing.Size(200, 71)
|
||||
Me.Panel2.TabIndex = 5
|
||||
'
|
||||
'PictureBox2
|
||||
'
|
||||
Me.PictureBox2.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle
|
||||
Me.PictureBox2.Cursor = System.Windows.Forms.Cursors.Hand
|
||||
Me.PictureBox2.Image = CType(resources.GetObject("PictureBox2.Image"), System.Drawing.Image)
|
||||
Me.PictureBox2.Location = New System.Drawing.Point(165, 3)
|
||||
Me.PictureBox2.Name = "PictureBox2"
|
||||
Me.PictureBox2.Size = New System.Drawing.Size(32, 29)
|
||||
Me.PictureBox2.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom
|
||||
Me.PictureBox2.TabIndex = 2
|
||||
Me.PictureBox2.TabStop = False
|
||||
'
|
||||
'Button2
|
||||
'
|
||||
Me.Button2.FlatStyle = System.Windows.Forms.FlatStyle.Flat
|
||||
Me.Button2.Location = New System.Drawing.Point(29, 41)
|
||||
Me.Button2.Name = "Button2"
|
||||
Me.Button2.Size = New System.Drawing.Size(81, 26)
|
||||
Me.Button2.TabIndex = 4
|
||||
Me.Button2.Text = "<<"
|
||||
Me.Button2.UseVisualStyleBackColor = True
|
||||
'
|
||||
'lblKw
|
||||
'
|
||||
Me.lblKw.AutoSize = True
|
||||
Me.lblKw.Font = New System.Drawing.Font("Microsoft Sans Serif", 16.0!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
|
||||
Me.lblKw.Location = New System.Drawing.Point(24, 6)
|
||||
Me.lblKw.Name = "lblKw"
|
||||
Me.lblKw.Size = New System.Drawing.Size(83, 26)
|
||||
Me.lblKw.TabIndex = 1
|
||||
Me.lblKw.Text = "KW 00"
|
||||
'
|
||||
'Button1
|
||||
'
|
||||
Me.Button1.FlatStyle = System.Windows.Forms.FlatStyle.Flat
|
||||
Me.Button1.Location = New System.Drawing.Point(116, 41)
|
||||
Me.Button1.Name = "Button1"
|
||||
Me.Button1.Size = New System.Drawing.Size(81, 26)
|
||||
Me.Button1.TabIndex = 3
|
||||
Me.Button1.Text = ">>"
|
||||
Me.Button1.UseVisualStyleBackColor = True
|
||||
'
|
||||
'lblROTBLAU
|
||||
'
|
||||
Me.lblROTBLAU.AutoSize = True
|
||||
Me.lblROTBLAU.Font = New System.Drawing.Font("Microsoft Sans Serif", 16.0!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
|
||||
Me.lblROTBLAU.Location = New System.Drawing.Point(659, 9)
|
||||
Me.lblROTBLAU.Name = "lblROTBLAU"
|
||||
Me.lblROTBLAU.Size = New System.Drawing.Size(122, 26)
|
||||
Me.lblROTBLAU.TabIndex = 1
|
||||
Me.lblROTBLAU.Text = "ROTBLAU"
|
||||
'
|
||||
'Label1
|
||||
'
|
||||
Me.Label1.AutoSize = True
|
||||
Me.Label1.Font = New System.Drawing.Font("Microsoft Sans Serif", 16.0!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
|
||||
Me.Label1.Location = New System.Drawing.Point(333, 9)
|
||||
Me.Label1.Name = "Label1"
|
||||
Me.Label1.Size = New System.Drawing.Size(240, 26)
|
||||
Me.Label1.TabIndex = 1
|
||||
Me.Label1.Text = "DIENSTPLAN - ZOLL"
|
||||
'
|
||||
'PictureBox1
|
||||
'
|
||||
Me.PictureBox1.Image = CType(resources.GetObject("PictureBox1.Image"), System.Drawing.Image)
|
||||
Me.PictureBox1.Location = New System.Drawing.Point(0, 0)
|
||||
Me.PictureBox1.Name = "PictureBox1"
|
||||
Me.PictureBox1.Size = New System.Drawing.Size(309, 71)
|
||||
Me.PictureBox1.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom
|
||||
Me.PictureBox1.TabIndex = 0
|
||||
Me.PictureBox1.TabStop = False
|
||||
'
|
||||
'pnlMain
|
||||
'
|
||||
Me.pnlMain.Dock = System.Windows.Forms.DockStyle.Fill
|
||||
Me.pnlMain.Location = New System.Drawing.Point(0, 71)
|
||||
Me.pnlMain.Name = "pnlMain"
|
||||
Me.pnlMain.Size = New System.Drawing.Size(1118, 439)
|
||||
Me.pnlMain.TabIndex = 1
|
||||
'
|
||||
'Panel3
|
||||
'
|
||||
Me.Panel3.BackColor = System.Drawing.Color.White
|
||||
Me.Panel3.Dock = System.Windows.Forms.DockStyle.Bottom
|
||||
Me.Panel3.Location = New System.Drawing.Point(0, 510)
|
||||
Me.Panel3.Name = "Panel3"
|
||||
Me.Panel3.Size = New System.Drawing.Size(1118, 100)
|
||||
Me.Panel3.TabIndex = 2
|
||||
'
|
||||
'Timer1
|
||||
'
|
||||
Me.Timer1.Interval = 10000
|
||||
'
|
||||
'Panel4
|
||||
'
|
||||
Me.Panel4.Controls.Add(Me.pnlMain)
|
||||
Me.Panel4.Controls.Add(Me.Panel3)
|
||||
Me.Panel4.Controls.Add(Me.Panel1)
|
||||
Me.Panel4.Dock = System.Windows.Forms.DockStyle.Fill
|
||||
Me.Panel4.Location = New System.Drawing.Point(0, 0)
|
||||
Me.Panel4.Name = "Panel4"
|
||||
Me.Panel4.Size = New System.Drawing.Size(1118, 610)
|
||||
Me.Panel4.TabIndex = 0
|
||||
'
|
||||
'DienstplanTV
|
||||
'
|
||||
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
|
||||
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
|
||||
Me.BackColor = System.Drawing.Color.White
|
||||
Me.ClientSize = New System.Drawing.Size(1118, 610)
|
||||
Me.Controls.Add(Me.Panel4)
|
||||
Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None
|
||||
Me.Icon = CType(resources.GetObject("$this.Icon"), System.Drawing.Icon)
|
||||
Me.ImeMode = System.Windows.Forms.ImeMode.KatakanaHalf
|
||||
Me.Name = "DienstplanTV"
|
||||
Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen
|
||||
Me.Text = "Form1"
|
||||
Me.WindowState = System.Windows.Forms.FormWindowState.Maximized
|
||||
Me.Panel1.ResumeLayout(False)
|
||||
Me.Panel1.PerformLayout()
|
||||
Me.tbcntr.ResumeLayout(False)
|
||||
Me.Panel2.ResumeLayout(False)
|
||||
Me.Panel2.PerformLayout()
|
||||
CType(Me.PictureBox2, System.ComponentModel.ISupportInitialize).EndInit()
|
||||
CType(Me.PictureBox1, System.ComponentModel.ISupportInitialize).EndInit()
|
||||
Me.Panel4.ResumeLayout(False)
|
||||
Me.ResumeLayout(False)
|
||||
|
||||
End Sub
|
||||
Friend WithEvents Panel1 As System.Windows.Forms.Panel
|
||||
Friend WithEvents pnlMain As System.Windows.Forms.Panel
|
||||
Friend WithEvents Panel3 As System.Windows.Forms.Panel
|
||||
Friend WithEvents PictureBox1 As System.Windows.Forms.PictureBox
|
||||
Friend WithEvents lblKw As System.Windows.Forms.Label
|
||||
Friend WithEvents lblROTBLAU As System.Windows.Forms.Label
|
||||
Friend WithEvents Label1 As System.Windows.Forms.Label
|
||||
Friend WithEvents PictureBox2 As System.Windows.Forms.PictureBox
|
||||
Friend WithEvents Button1 As System.Windows.Forms.Button
|
||||
Friend WithEvents Button2 As System.Windows.Forms.Button
|
||||
Friend WithEvents Panel2 As System.Windows.Forms.Panel
|
||||
Friend WithEvents Timer1 As System.Windows.Forms.Timer
|
||||
Friend WithEvents Panel4 As System.Windows.Forms.Panel
|
||||
Friend WithEvents tbcntr As System.Windows.Forms.TabControl
|
||||
Friend WithEvents tbSUB As System.Windows.Forms.TabPage
|
||||
Friend WithEvents tbATILLA As System.Windows.Forms.TabPage
|
||||
Friend WithEvents tbWAI As System.Windows.Forms.TabPage
|
||||
Friend WithEvents tbSBG As System.Windows.Forms.TabPage
|
||||
Friend WithEvents tbVerr As System.Windows.Forms.TabPage
|
||||
Friend WithEvents tbNKD As System.Windows.Forms.TabPage
|
||||
|
||||
End Class
|
||||
1902
DienstplanTV/DienstplanTV.resx
Normal file
1902
DienstplanTV/DienstplanTV.resx
Normal file
File diff suppressed because it is too large
Load Diff
588
DienstplanTV/DienstplanTV.vb
Normal file
588
DienstplanTV/DienstplanTV.vb
Normal file
@@ -0,0 +1,588 @@
|
||||
Imports System.Data.SqlClient
|
||||
|
||||
Public Class DienstplanTV
|
||||
Public SQL As New sqlConn
|
||||
Dim aktWoche = DateToWeek(Now).Substring(4, 2)
|
||||
Dim aktJahr = DateToWeek(Now).Substring(0, 4)
|
||||
Dim aktDate = Now
|
||||
Dim aktpnl = ""
|
||||
Dim SCHICHT As String = "ROT"
|
||||
Dim cptmp As Point
|
||||
Dim woTagWidthProz = 0.136
|
||||
Dim HeaderLeftWidthProz = 0.048
|
||||
Dim mousepos
|
||||
Dim art As String = "ZOLL"
|
||||
Dim niederlassung As String = "SUB"
|
||||
|
||||
Dim SCHICHTEN_ARTEN As New List(Of ADMIN.cDienstplanSchicht)
|
||||
Dim SETTINGS As ADMIN.cDienstSettings
|
||||
|
||||
|
||||
Dim TVAnzeige = False 'True
|
||||
Private Sub Form1_Load(sender As Object, e As EventArgs) Handles Me.Load
|
||||
|
||||
tbcntr.TabPages.Clear()
|
||||
Dim s As New VERAG_PROG_ALLGEMEIN.SQL
|
||||
Dim dt As DataTable = s.loadDgvBySql("SELECT [dpset_id],[dpset_niederlassung] FROM [tblDienstSettings] order by dpset_reihenfolge", "ADMIN")
|
||||
For Each r As DataRow In dt.Rows
|
||||
Dim d As New TabPage()
|
||||
d.Text = r("dpset_niederlassung")
|
||||
d.Name = "tb" & r("dpset_niederlassung")
|
||||
tbcntr.TabPages.Add(d)
|
||||
Next
|
||||
tbcntr.SelectedIndex = 0
|
||||
getNiederlassung()
|
||||
|
||||
|
||||
If TVAnzeige Then
|
||||
Timer1.Start()
|
||||
Cursor.Position = Me.PointToScreen(New Point(Me.Width, Me.Height))
|
||||
Else
|
||||
' Me.WindowState = FormWindowState.Normal
|
||||
Me.FormBorderStyle = Windows.Forms.FormBorderStyle.Sizable
|
||||
End If
|
||||
If EvenNumber(aktWoche) = False Then
|
||||
lblROTBLAU.ForeColor = Color.Red
|
||||
lblROTBLAU.Text = "( ROT )"
|
||||
SCHICHT = "ROT"
|
||||
Else
|
||||
lblROTBLAU.ForeColor = System.Drawing.Color.FromArgb(0, 54, 128)
|
||||
lblROTBLAU.Text = "( BLAU )"
|
||||
SCHICHT = "BLAU"
|
||||
End If
|
||||
initDienstplan()
|
||||
End Sub
|
||||
Sub getNiederlassung()
|
||||
If tbcntr.TabPages.Count = 0 Then Exit Sub
|
||||
niederlassung = tbcntr.SelectedTab.Name.Replace("tb", "")
|
||||
MsgBox(niederlassung)
|
||||
If niederlassung = "QS" Then art = "QS" Else art = "ZOLL"
|
||||
End Sub
|
||||
Sub initDienstplan()
|
||||
GC.Collect()
|
||||
lblKw.Text = "KW " & aktWoche
|
||||
margin_left = 0
|
||||
If TVAnzeige Then mousepos = MousePosition
|
||||
initGrundgeruest()
|
||||
For Each o In pnlMain.Controls
|
||||
If o.GetType.ToString = "System.Windows.Forms.Panel" And Not o.Name = aktpnl Then
|
||||
o.Dispose() 'schließt das Panel und gibt den Arbeitsspeicher frei; vorher wurde der AS immer erhöht!
|
||||
End If
|
||||
Next
|
||||
End Sub
|
||||
|
||||
Sub DoToAllControls(ByVal m_Control As Control)
|
||||
SQL = New sqlConn
|
||||
For Each ctrl As Control In m_Control.Controls
|
||||
If ctrl.Controls.Count > 0 Then
|
||||
DoToAllControls(ctrl)
|
||||
End If
|
||||
|
||||
If ctrl.GetType.Name.Contains("DataGridView") Then
|
||||
DirectCast(ctrl, DataGridView).Columns.Clear()
|
||||
DirectCast(ctrl, DataGridView).DataSource = Nothing
|
||||
|
||||
RemoveHandler DirectCast(ctrl, DataGridView).SelectionChanged, AddressOf dgv_SelectionChanged
|
||||
End If
|
||||
|
||||
Next
|
||||
End Sub
|
||||
|
||||
Private Sub pnlMain_MouseHover(sender As Object, e As EventArgs)
|
||||
' MsgBox("m")
|
||||
Cursor.Show()
|
||||
End Sub
|
||||
|
||||
Private Sub Panel4_MouseMove(sender As Object, e As MouseEventArgs) Handles pnlMain.MouseMove
|
||||
|
||||
End Sub
|
||||
Public Function EvenNumber(ByVal n As Long) As Boolean
|
||||
EvenNumber = (n And 1&) = 0&
|
||||
End Function
|
||||
|
||||
Dim margin_left As Integer = 0
|
||||
|
||||
Function getWochentagPanelZOLL(pnlMain As Panel, d As Date) As Panel
|
||||
Dim p As New Panel
|
||||
p.Width = pnlMain.Width * woTagWidthProz
|
||||
p.Height = pnlMain.Height
|
||||
p.Top = 0
|
||||
p.BorderStyle = BorderStyle.FixedSingle
|
||||
p.Left = margin_left
|
||||
p.HorizontalScroll.Visible = False
|
||||
p.VerticalScroll.Visible = False
|
||||
pnlMain.Controls.Add(p)
|
||||
|
||||
p.Controls.Add(getPnlHeader(pnlMain, d))
|
||||
|
||||
|
||||
|
||||
Dim pVM As New Panel
|
||||
pVM.Width = p.Width
|
||||
pVM.Top = 30
|
||||
pVM.Height = CInt((p.Height - 30) * 0.4)
|
||||
p.Controls.Add(pVM)
|
||||
|
||||
|
||||
Dim pNM As New Panel
|
||||
pNM.Width = p.Width
|
||||
pNM.Height = CInt((p.Height - 30) * 0.4)
|
||||
pNM.Top = pVM.Height + 30
|
||||
|
||||
p.Controls.Add(pNM)
|
||||
|
||||
Dim pTAG As New Panel
|
||||
pTAG.Width = p.Width
|
||||
pTAG.Height = CInt((p.Height - 30) * 0.2)
|
||||
pTAG.Top = pVM.Height + pNM.Height + 30
|
||||
|
||||
p.Controls.Add(pTAG)
|
||||
|
||||
margin_left += p.Width
|
||||
|
||||
Dim SCHICHTEN_ARTEN As New List(Of ADMIN.cDienstplanSchicht)
|
||||
Dim SETTINGS As ADMIN.cDienstSettings
|
||||
'SCHICHTEN_ARTEN
|
||||
|
||||
Dim Top_tmp = 0
|
||||
For Each s In SCHICHTEN_ARTEN
|
||||
|
||||
Dim pTmp As New Panel
|
||||
pTmp.Width = p.Width
|
||||
pTmp.Top = Top_tmp
|
||||
MsgBox(s.dedet_ProzentGrafik)
|
||||
pTmp.Height = CInt((p.Height - 30) * s.dedet_ProzentGrafik)
|
||||
p.Controls.Add(pTmp)
|
||||
|
||||
' p.BackColor = System.Drawing.Color.FromArgb(200, 200, 200)
|
||||
addDGVtoPnl(pTmp, d, s.dedet_bezeichnungDP, "dgv_" & s.dedet_abt & d.ToString("ddd"))
|
||||
' pNM.Height = CInt((p.Height - 30) * 0.2)
|
||||
' pNM.Top = CInt((p.Height - 30) * 0.6) + 30
|
||||
Top_tmp += pTmp.Height
|
||||
Next
|
||||
If False Then
|
||||
|
||||
|
||||
If d.DayOfWeek = 0 Then
|
||||
p.BackColor = System.Drawing.Color.FromArgb(200, 200, 200)
|
||||
addDGVtoPnl(pNM, d, "'ZOLL_NM', 'DBL'", "dgv_NM" & d.ToString("ddd"))
|
||||
pNM.Height = CInt((p.Height - 30) * 0.2)
|
||||
pNM.Top = CInt((p.Height - 30) * 0.6) + 30
|
||||
ElseIf d.DayOfWeek = 6 Then
|
||||
p.BackColor = System.Drawing.Color.FromArgb(200, 200, 200)
|
||||
addDGVtoPnl(pVM, d, "'ZOLL_VM','DBL'", "dgv_VM" & d.ToString("ddd"))
|
||||
pVM.Height = CInt((p.Height - 30) * 0.5)
|
||||
Else
|
||||
addDGVtoPnl(pVM, d, "'ZOLL_VM','DBL'", "dgv_VM" & d.ToString("ddd"))
|
||||
addDGVtoPnl(pNM, d, "'ZOLL_NM','DBL'", "dgv_NM" & d.ToString("ddd"))
|
||||
addDGVtoPnl(pTAG, d, "'ZOLL_TAG'", "dgv_TAG" & d.ToString("ddd"))
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
|
||||
|
||||
Return p
|
||||
End Function
|
||||
|
||||
|
||||
Function getWochentagPanelQS(pnlMain As Panel, d As Date) As Panel
|
||||
Dim p As New Panel
|
||||
p.Width = pnlMain.Width * woTagWidthProz
|
||||
p.Height = pnlMain.Height
|
||||
p.Top = 0
|
||||
p.BorderStyle = BorderStyle.FixedSingle
|
||||
p.Left = margin_left
|
||||
p.HorizontalScroll.Visible = False
|
||||
p.VerticalScroll.Visible = False
|
||||
pnlMain.Controls.Add(p)
|
||||
|
||||
p.Controls.Add(getPnlHeader(pnlMain, d))
|
||||
|
||||
Dim pVM As New Panel
|
||||
pVM.Width = p.Width
|
||||
pVM.Top = 30
|
||||
pVM.Height = CInt((p.Height - 30) * 1) '*1=100%
|
||||
p.Controls.Add(pVM)
|
||||
|
||||
|
||||
' Dim pNM As New Panel
|
||||
' pNM.Width = p.Width
|
||||
' pNM.Height = CInt((p.Height - 30) * 0.4)
|
||||
' pNM.Top = pVM.Height + 30
|
||||
|
||||
' p.Controls.Add(pNM)
|
||||
|
||||
' Dim pTAG As New Panel
|
||||
' pTAG.Width = p.Width
|
||||
' pTAG.Height = CInt((p.Height - 30) * 0.2)
|
||||
' pTAG.Top = pVM.Height + pNM.Height + 30
|
||||
|
||||
' p.Controls.Add(pTAG)
|
||||
|
||||
margin_left += p.Width
|
||||
|
||||
|
||||
If d.DayOfWeek = 0 Then
|
||||
p.BackColor = System.Drawing.Color.FromArgb(200, 200, 200)
|
||||
' addDGVtoPnl(pNM, d, "'ZOLL_NM','DBL'", "dgv_NM" & d.ToString("ddd"))
|
||||
' pNM.Height = CInt((p.Height - 30) * 0.2)
|
||||
' pNM.Top = CInt((p.Height - 30) * 0.6) + 30
|
||||
ElseIf d.DayOfWeek = 6 Then
|
||||
p.BackColor = System.Drawing.Color.FromArgb(200, 200, 200)
|
||||
addDGVtoPnl(pVM, d, "'QS'", "dgv_QS" & d.ToString("ddd"))
|
||||
pVM.Height = CInt((p.Height - 30) * 0.5)
|
||||
Else
|
||||
addDGVtoPnl(pVM, d, "'QS'", "dgv_QS" & d.ToString("ddd"))
|
||||
' addDGVtoPnl(pNM, d, "'ZOLL_NM','DBL'", "dgv_NM" & d.ToString("ddd"))
|
||||
' addDGVtoPnl(pTAG, d, "'ZOLL_TAG'", "dgv_TAG" & d.ToString("ddd"))
|
||||
End If
|
||||
|
||||
|
||||
|
||||
|
||||
Return p
|
||||
End Function
|
||||
|
||||
|
||||
Function getPnlHeader(pnlMain As Panel, d As Date) As Panel
|
||||
Dim p As New Panel
|
||||
p.Width = pnlMain.Width * woTagWidthProz
|
||||
p.Height = 30
|
||||
p.Top = 0
|
||||
|
||||
' p.Dock = DockStyle.Top
|
||||
p.BorderStyle = BorderStyle.FixedSingle
|
||||
|
||||
Dim l As New Label
|
||||
l.Font = New Font(l.Font.FontFamily, 12, FontStyle.Bold)
|
||||
l.Top = 5 : l.Left = 5
|
||||
l.Text = d.ToString("ddd, dd.MMM")
|
||||
p.Controls.Add(l)
|
||||
|
||||
p.BackColor = System.Drawing.Color.FromArgb(240, 245, 255)
|
||||
If d.ToShortDateString = Now.ToShortDateString Then
|
||||
l.Font = New Font(l.Font, FontStyle.Bold Or FontStyle.Underline)
|
||||
p.BackColor = System.Drawing.Color.FromArgb(255, 255, 255)
|
||||
End If
|
||||
|
||||
|
||||
|
||||
If d.DayOfWeek = 0 Then
|
||||
Dim l_so As New Label
|
||||
l_so.Font = New Font(l.Font.FontFamily, 9, FontStyle.Bold)
|
||||
l_so.Top = 5 : l_so.Left = p.Width - 100
|
||||
If art = "ZOLL" Then l_so.Text = "(18-22 Uhr)"
|
||||
If art = "QS" Then l_so.Text = ""
|
||||
l_so.ForeColor = Color.White
|
||||
p.Controls.Add(l_so)
|
||||
|
||||
p.BackColor = System.Drawing.Color.FromArgb(255, 130, 130)
|
||||
l.ForeColor = Color.White
|
||||
ElseIf d.DayOfWeek = 6 Then
|
||||
Dim l_sa As New Label
|
||||
l_sa.Font = New Font(l.Font.FontFamily, 9, FontStyle.Bold)
|
||||
l_sa.Top = 5 : l_sa.Left = p.Width - 100
|
||||
If art = "ZOLL" Then l_sa.Text = "(6-14 Uhr)"
|
||||
If art = "QS" Then l_sa.Text = "(8-12 Uhr)"
|
||||
p.Controls.Add(l_sa)
|
||||
|
||||
End If
|
||||
Return p
|
||||
End Function
|
||||
|
||||
Sub getLeftPanel(pnlMain As Panel)
|
||||
Dim p As New Panel
|
||||
p.Width = pnlMain.Width * HeaderLeftWidthProz
|
||||
p.Height = pnlMain.Height
|
||||
p.BackColor = System.Drawing.Color.FromArgb(240, 245, 255)
|
||||
p.BorderStyle = BorderStyle.FixedSingle
|
||||
p.Left = margin_left
|
||||
pnlMain.Controls.Add(p)
|
||||
margin_left += p.Width
|
||||
|
||||
|
||||
|
||||
'!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||
For Each s In SCHICHTEN_ARTEN
|
||||
Dim pnl As New Panel
|
||||
pnl.Width = p.Width
|
||||
pnl.Top = 30
|
||||
pnl.BorderStyle = BorderStyle.FixedSingle
|
||||
pnl.Height = CInt((p.Height - 30) * s.dedet_ProzentGrafik) 'CInt((p.Height - 30) * 0.4)
|
||||
pnl.Controls.Add(getLabel("VORM." & vbNewLine & "6-13 Uhr", pnl))
|
||||
p.Controls.Add(pnl)
|
||||
|
||||
Next
|
||||
|
||||
Exit Sub
|
||||
'p.Controls.Add(getPnlHeader(d))
|
||||
|
||||
Dim pVM As New Panel
|
||||
pVM.Width = p.Width
|
||||
pVM.Top = 30
|
||||
pVM.BorderStyle = BorderStyle.FixedSingle
|
||||
pVM.Height = CInt((p.Height - 30) * 0.4)
|
||||
pVM.Controls.Add(getLabel("VORM." & vbNewLine & "6-13 Uhr", pVM))
|
||||
p.Controls.Add(pVM)
|
||||
|
||||
Dim pNM As New Panel
|
||||
pNM.Width = p.Width
|
||||
pNM.Height = CInt((p.Height - 30) * 0.4)
|
||||
pNM.BorderStyle = BorderStyle.FixedSingle
|
||||
pNM.Controls.Add(getLabel("NACHM." & vbNewLine & "13-22 Uhr", pVM))
|
||||
pNM.Top = pVM.Height + 30
|
||||
|
||||
p.Controls.Add(pNM)
|
||||
|
||||
Dim pTAG As New Panel
|
||||
pTAG.Width = p.Width
|
||||
pTAG.Height = CInt((p.Height - 30) * 0.2)
|
||||
pTAG.BorderStyle = BorderStyle.FixedSingle
|
||||
pTAG.Controls.Add(getLabel("TAG" & vbNewLine & "8-17 Uhr", pTAG))
|
||||
pTAG.Top = pVM.Height + pNM.Height + 30
|
||||
|
||||
p.Controls.Add(pTAG)
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
Sub getLeftPanelQS(pnlMain As Panel)
|
||||
Dim p As New Panel
|
||||
p.Width = pnlMain.Width * HeaderLeftWidthProz
|
||||
p.Height = pnlMain.Height
|
||||
p.BackColor = System.Drawing.Color.FromArgb(240, 245, 255)
|
||||
p.BorderStyle = BorderStyle.FixedSingle
|
||||
p.Left = margin_left
|
||||
pnlMain.Controls.Add(p)
|
||||
margin_left += p.Width
|
||||
|
||||
|
||||
'p.Controls.Add(getPnlHeader(d))
|
||||
|
||||
Dim pVM As New Panel
|
||||
pVM.Width = p.Width
|
||||
pVM.Top = 30
|
||||
pVM.BorderStyle = BorderStyle.FixedSingle
|
||||
pVM.Height = CInt((p.Height - 30) * 1)
|
||||
pVM.Controls.Add(getLabel("QS" & vbNewLine & "8-12 Uhr", pVM))
|
||||
p.Controls.Add(pVM)
|
||||
|
||||
End Sub
|
||||
Function getLabel(t, p) As Label
|
||||
Dim l As New Label
|
||||
l.Font = New Font(l.Font.FontFamily, 10, FontStyle.Bold)
|
||||
' l.Top = 5 : l.Left = 5
|
||||
l.Text = t
|
||||
l.TextAlign = ContentAlignment.MiddleCenter
|
||||
l.AutoSize = True
|
||||
l.Top = p.height / 2 - l.PreferredHeight / 2
|
||||
l.Left = p.width / 2 - l.PreferredWidth / 2
|
||||
Return l
|
||||
End Function
|
||||
Sub initGrundgeruest()
|
||||
|
||||
Dim pnlMainNew = New Panel
|
||||
pnlMainNew.Dock = DockStyle.Fill
|
||||
pnlMainNew.Name = "pnlMain_" & Now.ToString("ddMMHHmmss")
|
||||
aktpnl = pnlMainNew.Name
|
||||
pnlMain.Controls.Add(pnlMainNew)
|
||||
|
||||
Dim montag As Date = CalendarWeek(aktWoche, aktJahr)
|
||||
|
||||
If art = "ZOLL" Then getLeftPanel(pnlMainNew)
|
||||
If art = "QS" Then getLeftPanelQS(pnlMainNew)
|
||||
|
||||
For i = 0 To 6
|
||||
Dim d As Date = montag.AddDays(i)
|
||||
'Wochentag
|
||||
If art = "ZOLL" Then getWochentagPanelZOLL(pnlMainNew, d)
|
||||
If art = "QS" Then getWochentagPanelQS(pnlMainNew, d)
|
||||
Next
|
||||
pnlMainNew.BringToFront()
|
||||
|
||||
End Sub
|
||||
|
||||
Sub addDGVtoPnl(p As Panel, d As Date, art As String, name As String)
|
||||
Dim dgv As New DataGridView
|
||||
With dgv
|
||||
.AllowUserToAddRows = False
|
||||
.AllowUserToDeleteRows = False
|
||||
.ReadOnly = False
|
||||
.AllowUserToResizeColumns = False
|
||||
.AllowUserToResizeRows = False
|
||||
.Name = name
|
||||
AddHandler dgv.SelectionChanged, AddressOf dgv_SelectionChanged
|
||||
.Dock = DockStyle.Fill
|
||||
.RowHeadersVisible = False
|
||||
.ColumnHeadersVisible = False
|
||||
|
||||
If d.ToShortDateString = Now.ToShortDateString Then
|
||||
.BackgroundColor = System.Drawing.Color.FromArgb(255, 255, 230)
|
||||
.GridColor = System.Drawing.Color.FromArgb(255, 255, 230)
|
||||
.DefaultCellStyle.BackColor = System.Drawing.Color.FromArgb(255, 255, 230)
|
||||
Else
|
||||
.BackgroundColor = Color.White
|
||||
.GridColor = Color.White
|
||||
.DefaultCellStyle.BackColor = Color.White
|
||||
End If
|
||||
|
||||
|
||||
.Dock = DockStyle.Fill
|
||||
|
||||
p.Controls.Add(dgv)
|
||||
|
||||
initMABinding(dgv, art, d)
|
||||
'AddHandler dgv.Paint, AddressOf
|
||||
initDgv(dgv, d)
|
||||
End With
|
||||
End Sub
|
||||
Private Sub PictureBox2_Click(sender As Object, e As EventArgs) Handles PictureBox2.Click
|
||||
Me.Close()
|
||||
End Sub
|
||||
|
||||
|
||||
Public Sub initMABinding(dgv As DataGridView, art As String, d As Date)
|
||||
|
||||
dgv.DataSource = SQL.getDatatableBySql("SELECT dstma_kuerzel + ' '+ dstetr_info,dstma_reihenfolge, dstma_farbe,[dstetr_von],[dstetr_bis],[dstetr_pause] FROM tblDienstplanEintraege,tblDienstMitarb,tblMitarbeiter WHERE dstetr_dstmaId=dstma_id AND mit_id=dstma_mitId AND dstetr_datum='" & d.ToShortDateString & "' AND dstetr_art IN(" & art & ") AND dstetr_niederlassung = '" & niederlassung & "' ORDER BY dstma_reihenfolge ASC")
|
||||
|
||||
|
||||
End Sub
|
||||
Public Function DateToWeek(ByVal dDate As Date) As String
|
||||
' Startdatum der ersten Kalenderwoche des Jahres und Folgejahres berechnen
|
||||
Dim dThisYear As Date = CalendarWeek(1, dDate.Year)
|
||||
Dim dNextYear As Date = CalendarWeek(1, dDate.Year + 1)
|
||||
|
||||
' Prüfen, ob Datum zur ersten Woche des Folgejahres gehört
|
||||
If dDate >= dNextYear Then
|
||||
' Rückgabe: KW 1 des Folgejahres
|
||||
Return dDate.Year + 1 & "01"
|
||||
ElseIf dDate < dThisYear Then
|
||||
' Falls das Datum noch zu einer KW aus dem letzten Jahr zählt
|
||||
Return dDate.Year - 1 & DatePart(DateInterval.WeekOfYear, _
|
||||
New Date(dDate.Year - 1, 12, 28), FirstDayOfWeek.Monday, _
|
||||
FirstWeekOfYear.FirstFourDays)
|
||||
Else
|
||||
' KW = Differenz zum ersten Tag der ersten Woche
|
||||
Return dDate.Year & Format$(dDate.Subtract(dThisYear).Days \ 7 + 1, "00")
|
||||
End If
|
||||
End Function
|
||||
|
||||
Public Function CalendarWeek(ByVal nWeek As Integer, _
|
||||
ByVal nYear As Integer) As Date
|
||||
|
||||
' Wochentag des 4. Januar des Jahres ermitteln
|
||||
Dim dStart As New Date(nYear, 1, 4)
|
||||
Dim nDay As Integer = (dStart.DayOfWeek + 6) Mod 7 + 1
|
||||
|
||||
' Beginn der 1. KW des Jahres
|
||||
Dim dFirst As Date = dStart.AddDays(1 - nDay)
|
||||
|
||||
' Gesuchte KW ermitteln
|
||||
Return dFirst.AddDays((nWeek - 1) * 7)
|
||||
End Function
|
||||
|
||||
Private Sub dgv_SelectionChanged(sender As Object, e As EventArgs)
|
||||
sender.ClearSelection()
|
||||
End Sub
|
||||
Private Sub initDgv(dgv As DataGridView, d As Date)
|
||||
dgv.DefaultCellStyle.Font = New Font(dgv.Font.FontFamily, 12)
|
||||
If TVAnzeige Then
|
||||
If art = "ZOLL" Then dgv.DefaultCellStyle.Font = New Font(dgv.Font.FontFamily, 12)
|
||||
If art = "QS" Then dgv.DefaultCellStyle.Font = New Font(dgv.Font.FontFamily, 16)
|
||||
End If
|
||||
|
||||
' Dim dgv As DataGridView = DirectCast(sender, DataGridView)
|
||||
' dgv.Columns(0).ReadOnly = False
|
||||
If dgv.Rows.Count > 0 Then
|
||||
dgv.Columns(0).Width = dgv.Parent.Width - 10
|
||||
For Each r As DataGridViewRow In dgv.Rows
|
||||
Try : r.Cells(0).Style.ForeColor = ColorTranslator.FromHtml(r.Cells(2).Value) : Catch : End Try
|
||||
Next
|
||||
' MsgBox(dgv.Rows(0).Cells(0).Value)
|
||||
dgv.Columns("dstetr_von").Visible = False
|
||||
dgv.Columns("dstetr_bis").Visible = False
|
||||
dgv.Columns("dstetr_pause").Visible = False
|
||||
If TVAnzeige Then
|
||||
|
||||
If Not d.DayOfWeek = DayOfWeek.Sunday And (dgv.Name.ToString.Contains("dgv_VM") Or dgv.Name.ToString.Contains("dgv_NM")) Then
|
||||
|
||||
dgv.Rows(0).Cells(0).Value = dgv.Rows(0).Cells(0).Value & " (SL)"
|
||||
' dgv.Rows(0).Cells(0).Style.ForeColor = Color.Red
|
||||
dgv.Rows(0).Cells(0).Style.Font = New Font(dgv.Font.FontFamily, 12, FontStyle.Bold)
|
||||
End If
|
||||
|
||||
Else
|
||||
dgv.Columns(0).AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill ' = dgv.Parent.Width - 10
|
||||
' dgv.Rows(0).Cells(0).Value = dgv.Rows(0).Cells(0).Value & " " & dgv.Rows(0).Cells("dstetr_von").Value & "-" & dgv.Rows(0).Cells("dstetr_bis").Value
|
||||
dgv.Columns("dstetr_von").Width = 50
|
||||
dgv.Columns("dstetr_bis").Width = 50
|
||||
dgv.Columns("dstetr_von").Visible = True
|
||||
dgv.Columns("dstetr_bis").Visible = True
|
||||
'dgv.Columns("dstetr_pause").Visible = False
|
||||
End If
|
||||
dgv.Columns(1).Visible = False
|
||||
dgv.Columns(2).Visible = False
|
||||
|
||||
'dgv.Rows(0).Cells(0).Style.Font.Bold = True
|
||||
|
||||
dgv.ScrollBars = ScrollBars.None
|
||||
Else
|
||||
dgv.Columns.Clear()
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
|
||||
Me.Cursor = Cursors.WaitCursor
|
||||
aktDate = aktDate.AddDays(7)
|
||||
aktWoche = DateToWeek(aktDate).Substring(4, 2)
|
||||
aktJahr = DateToWeek(aktDate).Substring(0, 4)
|
||||
initDienstplan()
|
||||
Me.Cursor = Cursors.Default
|
||||
End Sub
|
||||
|
||||
Private Sub Button2_Click(sender As Object, e As EventArgs) Handles Button2.Click
|
||||
Me.Cursor = Cursors.WaitCursor
|
||||
aktDate = aktDate.AddDays(-7)
|
||||
aktWoche = DateToWeek(aktDate).Substring(4, 2)
|
||||
aktJahr = DateToWeek(aktDate).Substring(0, 4)
|
||||
initDienstplan()
|
||||
Me.Cursor = Cursors.Default
|
||||
End Sub
|
||||
|
||||
Private Sub Timer1_Tick(sender As Object, e As EventArgs) Handles Timer1.Tick
|
||||
If Cursor.Position = cptmp Then
|
||||
Cursor.Position = Me.PointToScreen(New Point(0, Me.Height))
|
||||
End If
|
||||
cptmp = Cursor.Position
|
||||
|
||||
initDienstplan()
|
||||
End Sub
|
||||
|
||||
Private Sub pnlMain_Paint(sender As Object, e As PaintEventArgs) Handles pnlMain.Paint
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub Label1_Click(sender As Object, e As EventArgs) Handles Label1.Click
|
||||
Exit Sub
|
||||
If Label1.Text = "DIENSTPLAN - ATILLA" Then
|
||||
art = "QS"
|
||||
niederlassung = "SUB"
|
||||
Label1.Text = "DIENSTPLAN - QS"
|
||||
ElseIf Label1.Text = "DIENSTPLAN - QS" Then
|
||||
art = "ZOLL"
|
||||
niederlassung = "SUB"
|
||||
Label1.Text = "DIENSTPLAN - ZOLL"
|
||||
ElseIf Label1.Text = "DIENSTPLAN - ZOLL" Then
|
||||
art = "ZOLL"
|
||||
niederlassung = "ATILLA"
|
||||
Label1.Text = "DIENSTPLAN - ATILLA"
|
||||
End If
|
||||
initDienstplan()
|
||||
End Sub
|
||||
|
||||
Private Sub tbcntr_SelectedIndexChanged(sender As Object, e As EventArgs) Handles tbcntr.SelectedIndexChanged
|
||||
getNiederlassung()
|
||||
initDienstplan()
|
||||
End Sub
|
||||
End Class
|
||||
147
DienstplanTV/DienstplanTV.vbproj
Normal file
147
DienstplanTV/DienstplanTV.vbproj
Normal file
@@ -0,0 +1,147 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProjectGuid>{1F008363-5FCF-49A2-A953-18DEFED4D3BE}</ProjectGuid>
|
||||
<OutputType>WinExe</OutputType>
|
||||
<StartupObject>DienstplanTV.My.MyApplication</StartupObject>
|
||||
<RootNamespace>DienstplanTV</RootNamespace>
|
||||
<AssemblyName>DienstplanTV</AssemblyName>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<MyType>WindowsForms</MyType>
|
||||
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
|
||||
<TargetFrameworkProfile />
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<DefineDebug>true</DefineDebug>
|
||||
<DefineTrace>true</DefineTrace>
|
||||
<OutputPath>bin\Debug\</OutputPath>
|
||||
<DocumentationFile>DienstplanTV.xml</DocumentationFile>
|
||||
<NoWarn>42016,41999,42017,42018,42019,42032,42036,42020,42021,42022</NoWarn>
|
||||
<Prefer32Bit>false</Prefer32Bit>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<DefineDebug>false</DefineDebug>
|
||||
<DefineTrace>true</DefineTrace>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
<DocumentationFile>DienstplanTV.xml</DocumentationFile>
|
||||
<NoWarn>42016,41999,42017,42018,42019,42032,42036,42020,42021,42022</NoWarn>
|
||||
<Prefer32Bit>false</Prefer32Bit>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<OptionExplicit>On</OptionExplicit>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<OptionCompare>Binary</OptionCompare>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<OptionStrict>Off</OptionStrict>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<OptionInfer>On</OptionInfer>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<ApplicationIcon>dp_tv.ico</ApplicationIcon>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Deployment" />
|
||||
<Reference Include="System.Drawing" />
|
||||
<Reference Include="System.Windows.Forms" />
|
||||
<Reference Include="System.Xml" />
|
||||
<Reference Include="System.Core" />
|
||||
<Reference Include="System.Xml.Linq" />
|
||||
<Reference Include="System.Data.DataSetExtensions" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Import Include="Microsoft.VisualBasic" />
|
||||
<Import Include="System" />
|
||||
<Import Include="System.Collections" />
|
||||
<Import Include="System.Collections.Generic" />
|
||||
<Import Include="System.Data" />
|
||||
<Import Include="System.Drawing" />
|
||||
<Import Include="System.Diagnostics" />
|
||||
<Import Include="System.Windows.Forms" />
|
||||
<Import Include="System.Linq" />
|
||||
<Import Include="System.Xml.Linq" />
|
||||
<Import Include="System.Threading.Tasks" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="cSqlDb.vb" />
|
||||
<Compile Include="DienstplanTV.vb">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="DienstplanTV.Designer.vb">
|
||||
<DependentUpon>DienstplanTV.vb</DependentUpon>
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="My Project\AssemblyInfo.vb" />
|
||||
<Compile Include="My Project\Application.Designer.vb">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DependentUpon>Application.myapp</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="My Project\Resources.Designer.vb">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DesignTime>True</DesignTime>
|
||||
<DependentUpon>Resources.resx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="My Project\Settings.Designer.vb">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DependentUpon>Settings.settings</DependentUpon>
|
||||
<DesignTimeSharedInput>True</DesignTimeSharedInput>
|
||||
</Compile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<EmbeddedResource Include="DienstplanTV.resx">
|
||||
<DependentUpon>DienstplanTV.vb</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="My Project\Resources.resx">
|
||||
<Generator>VbMyResourcesResXFileCodeGenerator</Generator>
|
||||
<LastGenOutput>Resources.Designer.vb</LastGenOutput>
|
||||
<CustomToolNamespace>My.Resources</CustomToolNamespace>
|
||||
<SubType>Designer</SubType>
|
||||
</EmbeddedResource>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="My Project\Application.myapp">
|
||||
<Generator>MyApplicationCodeGenerator</Generator>
|
||||
<LastGenOutput>Application.Designer.vb</LastGenOutput>
|
||||
</None>
|
||||
<None Include="My Project\Settings.settings">
|
||||
<Generator>SettingsSingleFileGenerator</Generator>
|
||||
<CustomToolNamespace>My</CustomToolNamespace>
|
||||
<LastGenOutput>Settings.Designer.vb</LastGenOutput>
|
||||
</None>
|
||||
<None Include="App.config" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="dp_tv.ico" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\..\SDL\SDL\VERAG_PROG_ALLGEMEIN\VERAG_PROG_ALLGEMEIN.vbproj">
|
||||
<Project>{a3b497bd-842c-4a2b-b398-ed1976849df1}</Project>
|
||||
<Name>VERAG_PROG_ALLGEMEIN</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\UID\ADMIN.vbproj">
|
||||
<Project>{6eb4d3a4-3cf2-4651-9af9-ad5f727df403}</Project>
|
||||
<Name>ADMIN</Name>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.VisualBasic.targets" />
|
||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||
Other similar extension points exist, see Microsoft.Common.targets.
|
||||
<Target Name="BeforeBuild">
|
||||
</Target>
|
||||
<Target Name="AfterBuild">
|
||||
</Target>
|
||||
-->
|
||||
</Project>
|
||||
38
DienstplanTV/My Project/Application.Designer.vb
generated
Normal file
38
DienstplanTV/My Project/Application.Designer.vb
generated
Normal file
@@ -0,0 +1,38 @@
|
||||
'------------------------------------------------------------------------------
|
||||
' <auto-generated>
|
||||
' Dieser Code wurde von einem Tool generiert.
|
||||
' Laufzeitversion:4.0.30319.42000
|
||||
'
|
||||
' Änderungen an dieser Datei können falsches Verhalten verursachen und gehen verloren, wenn
|
||||
' der Code erneut generiert wird.
|
||||
' </auto-generated>
|
||||
'------------------------------------------------------------------------------
|
||||
|
||||
Option Strict On
|
||||
Option Explicit On
|
||||
|
||||
|
||||
Namespace My
|
||||
|
||||
'HINWEIS: Diese Datei wird automatisch generiert. Ändern Sie sie nicht direkt. Zum Ändern
|
||||
' oder bei in dieser Datei auftretenden Buildfehlern wechseln Sie zum Projekt-Designer.
|
||||
' (Wechseln Sie dazu zu den Projekteigenschaften, oder doppelklicken Sie auf den Knoten "Mein Projekt" im
|
||||
' Projektmappen-Explorer). Nehmen Sie auf der Registerkarte "Anwendung" entsprechende Änderungen vor.
|
||||
'
|
||||
Partial Friend Class MyApplication
|
||||
|
||||
<Global.System.Diagnostics.DebuggerStepThroughAttribute()> _
|
||||
Public Sub New()
|
||||
MyBase.New(Global.Microsoft.VisualBasic.ApplicationServices.AuthenticationMode.Windows)
|
||||
Me.IsSingleInstance = false
|
||||
Me.EnableVisualStyles = true
|
||||
Me.SaveMySettingsOnExit = true
|
||||
Me.ShutDownStyle = Global.Microsoft.VisualBasic.ApplicationServices.ShutdownMode.AfterMainFormCloses
|
||||
End Sub
|
||||
|
||||
<Global.System.Diagnostics.DebuggerStepThroughAttribute()> _
|
||||
Protected Overrides Sub OnCreateMainForm()
|
||||
Me.MainForm = Global.DienstplanTV.DienstplanTV
|
||||
End Sub
|
||||
End Class
|
||||
End Namespace
|
||||
10
DienstplanTV/My Project/Application.myapp
Normal file
10
DienstplanTV/My Project/Application.myapp
Normal file
@@ -0,0 +1,10 @@
|
||||
<?xml version="1.0" encoding="utf-16"?>
|
||||
<MyApplicationData xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
|
||||
<MySubMain>true</MySubMain>
|
||||
<MainForm>DienstplanTV</MainForm>
|
||||
<SingleInstance>false</SingleInstance>
|
||||
<ShutdownMode>0</ShutdownMode>
|
||||
<EnableVisualStyles>true</EnableVisualStyles>
|
||||
<AuthenticationMode>0</AuthenticationMode>
|
||||
<SaveMySettingsOnExit>true</SaveMySettingsOnExit>
|
||||
</MyApplicationData>
|
||||
35
DienstplanTV/My Project/AssemblyInfo.vb
Normal file
35
DienstplanTV/My Project/AssemblyInfo.vb
Normal file
@@ -0,0 +1,35 @@
|
||||
Imports System
|
||||
Imports System.Reflection
|
||||
Imports System.Runtime.InteropServices
|
||||
|
||||
' Allgemeine Informationen über eine Assembly werden über die folgenden
|
||||
' Attribute gesteuert. Ändern Sie diese Attributwerte, um die Informationen zu ändern,
|
||||
' die mit einer Assembly verknüpft sind.
|
||||
|
||||
' Die Werte der Assemblyattribute überprüfen
|
||||
|
||||
<Assembly: AssemblyTitle("DienstplanTV")>
|
||||
<Assembly: AssemblyDescription("")>
|
||||
<Assembly: AssemblyCompany("")>
|
||||
<Assembly: AssemblyProduct("DienstplanTV")>
|
||||
<Assembly: AssemblyCopyright("Copyright © 2015")>
|
||||
<Assembly: AssemblyTrademark("")>
|
||||
|
||||
<Assembly: ComVisible(False)>
|
||||
|
||||
'Die folgende GUID bestimmt die ID der Typbibliothek, wenn dieses Projekt für COM verfügbar gemacht wird
|
||||
<Assembly: Guid("00d2a253-5741-439e-98b1-78653265d9f0")>
|
||||
|
||||
' Versionsinformationen für eine Assembly bestehen aus den folgenden vier Werten:
|
||||
'
|
||||
' Hauptversion
|
||||
' Nebenversion
|
||||
' Buildnummer
|
||||
' Revision
|
||||
'
|
||||
' Sie können alle Werte angeben oder die standardmäßigen Build- und Revisionsnummern
|
||||
' übernehmen, indem Sie "*" eingeben:
|
||||
' <Assembly: AssemblyVersion("1.0.*")>
|
||||
|
||||
<Assembly: AssemblyVersion("1.0.0.0")>
|
||||
<Assembly: AssemblyFileVersion("1.0.0.0")>
|
||||
72
DienstplanTV/My Project/Resources.Designer.vb
generated
Normal file
72
DienstplanTV/My Project/Resources.Designer.vb
generated
Normal file
@@ -0,0 +1,72 @@
|
||||
'------------------------------------------------------------------------------
|
||||
' <auto-generated>
|
||||
' Dieser Code wurde von einem Tool generiert.
|
||||
' Laufzeitversion:4.0.30319.42000
|
||||
'
|
||||
' Änderungen an dieser Datei können falsches Verhalten verursachen und gehen verloren, wenn
|
||||
' der Code erneut generiert wird.
|
||||
' </auto-generated>
|
||||
'------------------------------------------------------------------------------
|
||||
|
||||
Option Strict On
|
||||
Option Explicit On
|
||||
|
||||
Imports System
|
||||
|
||||
Namespace My.Resources
|
||||
|
||||
'Diese Klasse wurde von der StronglyTypedResourceBuilder automatisch generiert
|
||||
'-Klasse über ein Tool wie ResGen oder Visual Studio automatisch generiert.
|
||||
'Um einen Member hinzuzufügen oder zu entfernen, bearbeiten Sie die .ResX-Datei und führen dann ResGen
|
||||
'mit der /str-Option erneut aus, oder Sie erstellen Ihr VS-Projekt neu.
|
||||
'''<summary>
|
||||
''' Eine stark typisierte Ressourcenklasse zum Suchen von lokalisierten Zeichenfolgen usw.
|
||||
'''</summary>
|
||||
<Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0"), _
|
||||
Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
|
||||
Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute(), _
|
||||
Global.Microsoft.VisualBasic.HideModuleNameAttribute()> _
|
||||
Friend Module Resources
|
||||
|
||||
Private resourceMan As Global.System.Resources.ResourceManager
|
||||
|
||||
Private resourceCulture As Global.System.Globalization.CultureInfo
|
||||
|
||||
'''<summary>
|
||||
''' Gibt die zwischengespeicherte ResourceManager-Instanz zurück, die von dieser Klasse verwendet wird.
|
||||
'''</summary>
|
||||
<Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _
|
||||
Friend ReadOnly Property ResourceManager() As Global.System.Resources.ResourceManager
|
||||
Get
|
||||
If Object.ReferenceEquals(resourceMan, Nothing) Then
|
||||
Dim temp As Global.System.Resources.ResourceManager = New Global.System.Resources.ResourceManager("DienstplanTV.Resources", GetType(Resources).Assembly)
|
||||
resourceMan = temp
|
||||
End If
|
||||
Return resourceMan
|
||||
End Get
|
||||
End Property
|
||||
|
||||
'''<summary>
|
||||
''' Überschreibt die CurrentUICulture-Eigenschaft des aktuellen Threads für alle
|
||||
''' Ressourcenzuordnungen, die diese stark typisierte Ressourcenklasse verwenden.
|
||||
'''</summary>
|
||||
<Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _
|
||||
Friend Property Culture() As Global.System.Globalization.CultureInfo
|
||||
Get
|
||||
Return resourceCulture
|
||||
End Get
|
||||
Set
|
||||
resourceCulture = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
'''<summary>
|
||||
''' Sucht eine lokalisierte Zeichenfolge, die Data Source=BUCHHALTUNG\SQLEXPRESS;Initial Catalog=ADMIN;Integrated Security=false;User ID=sa;Password=BmWr501956; ähnelt.
|
||||
'''</summary>
|
||||
Friend ReadOnly Property connStringAdmin() As String
|
||||
Get
|
||||
Return ResourceManager.GetString("connStringAdmin", resourceCulture)
|
||||
End Get
|
||||
End Property
|
||||
End Module
|
||||
End Namespace
|
||||
123
DienstplanTV/My Project/Resources.resx
Normal file
123
DienstplanTV/My Project/Resources.resx
Normal file
@@ -0,0 +1,123 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<data name="connStringAdmin" xml:space="preserve">
|
||||
<value>Data Source=BUCHHALTUNG\SQLEXPRESS;Initial Catalog=ADMIN;Integrated Security=false;User ID=sa;Password=BmWr501956;</value>
|
||||
</data>
|
||||
</root>
|
||||
73
DienstplanTV/My Project/Settings.Designer.vb
generated
Normal file
73
DienstplanTV/My Project/Settings.Designer.vb
generated
Normal file
@@ -0,0 +1,73 @@
|
||||
'------------------------------------------------------------------------------
|
||||
' <auto-generated>
|
||||
' Dieser Code wurde von einem Tool generiert.
|
||||
' Laufzeitversion:4.0.30319.42000
|
||||
'
|
||||
' Änderungen an dieser Datei können falsches Verhalten verursachen und gehen verloren, wenn
|
||||
' der Code erneut generiert wird.
|
||||
' </auto-generated>
|
||||
'------------------------------------------------------------------------------
|
||||
|
||||
Option Strict On
|
||||
Option Explicit On
|
||||
|
||||
|
||||
Namespace My
|
||||
|
||||
<Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute(), _
|
||||
Global.System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "12.0.0.0"), _
|
||||
Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _
|
||||
Partial Friend NotInheritable Class MySettings
|
||||
Inherits Global.System.Configuration.ApplicationSettingsBase
|
||||
|
||||
Private Shared defaultInstance As MySettings = CType(Global.System.Configuration.ApplicationSettingsBase.Synchronized(New MySettings()),MySettings)
|
||||
|
||||
#Region "Funktion zum automatischen Speichern von My.Settings"
|
||||
#If _MyType = "WindowsForms" Then
|
||||
Private Shared addedHandler As Boolean
|
||||
|
||||
Private Shared addedHandlerLockObject As New Object
|
||||
|
||||
<Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _
|
||||
Private Shared Sub AutoSaveSettings(ByVal sender As Global.System.Object, ByVal e As Global.System.EventArgs)
|
||||
If My.Application.SaveMySettingsOnExit Then
|
||||
My.Settings.Save()
|
||||
End If
|
||||
End Sub
|
||||
#End If
|
||||
#End Region
|
||||
|
||||
Public Shared ReadOnly Property [Default]() As MySettings
|
||||
Get
|
||||
|
||||
#If _MyType = "WindowsForms" Then
|
||||
If Not addedHandler Then
|
||||
SyncLock addedHandlerLockObject
|
||||
If Not addedHandler Then
|
||||
AddHandler My.Application.Shutdown, AddressOf AutoSaveSettings
|
||||
addedHandler = True
|
||||
End If
|
||||
End SyncLock
|
||||
End If
|
||||
#End If
|
||||
Return defaultInstance
|
||||
End Get
|
||||
End Property
|
||||
End Class
|
||||
End Namespace
|
||||
|
||||
Namespace My
|
||||
|
||||
<Global.Microsoft.VisualBasic.HideModuleNameAttribute(), _
|
||||
Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
|
||||
Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute()> _
|
||||
Friend Module MySettingsProperty
|
||||
|
||||
<Global.System.ComponentModel.Design.HelpKeywordAttribute("My.Settings")> _
|
||||
Friend ReadOnly Property Settings() As Global.DienstplanTV.My.MySettings
|
||||
Get
|
||||
Return Global.DienstplanTV.My.MySettings.Default
|
||||
End Get
|
||||
End Property
|
||||
End Module
|
||||
End Namespace
|
||||
7
DienstplanTV/My Project/Settings.settings
Normal file
7
DienstplanTV/My Project/Settings.settings
Normal file
@@ -0,0 +1,7 @@
|
||||
<?xml version='1.0' encoding='utf-8'?>
|
||||
<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)" UseMySettingsClassName="true">
|
||||
<Profiles>
|
||||
<Profile Name="(Default)" />
|
||||
</Profiles>
|
||||
<Settings />
|
||||
</SettingsFile>
|
||||
68
DienstplanTV/cSqlDb.vb
Normal file
68
DienstplanTV/cSqlDb.vb
Normal file
@@ -0,0 +1,68 @@
|
||||
|
||||
Imports System.Data
|
||||
Imports System.IO
|
||||
Imports System.Data.SqlClient
|
||||
Imports System.Globalization
|
||||
|
||||
|
||||
Public Class cSqlDb
|
||||
Public Shared Function GetNewOpenConnection() As SqlConnection
|
||||
Dim cn As New SqlConnection()
|
||||
cn.ConnectionString = My.Resources.connStringAdmin
|
||||
cn.Open()
|
||||
Return cn
|
||||
End Function
|
||||
End Class
|
||||
Public Class sqlConn
|
||||
Public Function getDataSQL(ByVal selectCommand As String) As SqlDataAdapter
|
||||
|
||||
Dim d As New SqlDataAdapter()
|
||||
|
||||
Try
|
||||
' Specify a connection string. Replace the given value with a
|
||||
' valid connection string for a Northwind SQL Server sample
|
||||
' database accessible to your system.
|
||||
' Dim connectionString As String = "Data Source=DEVELOPER\DEVSQL;Initial Catalog=ADMIN;Integrated Security=false;User ID=sa;Password=BmWr501956;"
|
||||
|
||||
' Create a new data adapter based on the specified query.
|
||||
d = New SqlDataAdapter(selectCommand, My.Resources.connStringAdmin)
|
||||
Return d
|
||||
' Resize the DataGridView columns to fit the newly loaded content.
|
||||
|
||||
Catch ex As SqlException
|
||||
MessageBox.Show("Der Connection-String kann nicht verarbeitet werden. Wenden Sie sich an den Programmbetreuer.")
|
||||
End Try
|
||||
Return Nothing
|
||||
End Function
|
||||
|
||||
|
||||
|
||||
Public Function getDatatableBySql(hSQL As String) As DataTable
|
||||
|
||||
Try
|
||||
Dim myTable = New DataTable()
|
||||
Using conn As SqlConnection = cSqlDb.GetNewOpenConnection()
|
||||
Using cmd As New SqlCommand(hSQL, conn)
|
||||
Dim dr = cmd.ExecuteReader()
|
||||
myTable.Load(dr)
|
||||
myTable.Columns(0).ReadOnly = False
|
||||
dr.Close()
|
||||
End Using
|
||||
conn.Close()
|
||||
End Using
|
||||
|
||||
Return myTable 'While Schleife wird hier verlassen
|
||||
Catch ex As Exception
|
||||
Dim antwort As MsgBoxResult = MsgBox(ex.Message, CType(MsgBoxStyle.RetryCancel + MsgBoxStyle.Exclamation, MsgBoxStyle),
|
||||
"Problem in Function 'AnzeigeTabelle'")
|
||||
If antwort <> MsgBoxResult.Retry Then
|
||||
'Programm wird beendet
|
||||
MsgBox(System.Reflection.MethodInfo.GetCurrentMethod.Name & ": Programm wird aufgrund eines kritischen Problems beendet.", vbInformation)
|
||||
Environment.Exit(0)
|
||||
End If
|
||||
End Try
|
||||
|
||||
Return Nothing
|
||||
|
||||
End Function
|
||||
End Class
|
||||
BIN
DienstplanTV/dp_tv.ico
Normal file
BIN
DienstplanTV/dp_tv.ico
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 66 KiB |
Reference in New Issue
Block a user