Option Strict Off

Public Class Form1

	Dim giZeitbas As Integer = 1
	Dim sprJahre_Sheet1 As Object = Nothing

	Private Sub sprTage_SelectionChanged(ByVal sender As System.Object, ByVal e As FarPoint.Win.Spread.SelectionChangedEventArgs) Handles sprTage.SelectionChanged

		Dim n As Integer

		For n = 0 To sprTage_Sheet1.ColumnCount - 1
			miAuffuellen(n) = -1
		Next

		For n = e.Range.Column To e.Range.Column + e.Range.ColumnCount - 1
			If miAuffuellen(n) = -1 Then
				miAuffuellen(n) = n
			End If
		Next n

	End Sub

	'''' <summary>
	'''' Dynamisches setzen der Datumswerte in den Spaltenköpfen.
	'''' </summary>
	'''' <param name="pDatumVon">Von-Datum</param>
	'''' <param name="pDatumBis">Bis-Datum</param>
	'''' <param name="pRow">Zeile</param>
	'''' <param name="pColumn">Spalte</param>
	'''' <remarks></remarks>
	'Private Sub setDatumUeberschrift(ByRef pDatumVon As Date, ByRef pDatumBis As Date, ByVal pRow As Integer, ByVal pColumn As Integer)

	'	If giZeitbas = 1 Then
	'		sprJahre_Sheet1.Cells(pRow, pColumn).Value = pDatumVon.ToString("yyyy")
	'	ElseIf giZeitbas = -1 Then
	'		sprJahre_Sheet1.Cells(pRow, pColumn).Value = pDatumVon.ToString("yyyy") & "/" & pDatumBis.ToString("yyyy")
	'	ElseIf giZeitbas <> 1 Then
	'		pDatumVon = pDatumVon.AddDays(-1)
	'		pDatumBis = pDatumBis.AddDays(-2)
	'		sprJahre_Sheet1.Cells(pRow, pColumn).Value = pDatumVon.ToString("yyyy") & "/" & pDatumBis.ToString("yyyy")
	'	End If

	'End Sub


	Private Sub AW70M09_Liefergruppe_FormClosing(ByVal eventSender As System.Object, ByVal eventArgs As System.Windows.Forms.FormClosingEventArgs) Handles Me.FormClosing
		Dim Cancel As Boolean = eventArgs.Cancel
		'Dim UnloadMode As System.Windows.Forms.CloseReason = eventArgs.CloseReason
		' Der Editmode des Spread wird beim Drücken auf Schließen bzw. Ctrl.F4 nicht korrekt beendet!
		If mSpreadZeitreiheMonat.EditMode = 1 Or mSpreadZeitreiheTag.EditMode = 1 Or mSpreadZeitreiheAktMengen.EditMode = 1 Then
			If MsgBox("Möchten Sie den " & msFormName & " verlassen ?", MsgBoxStyle.YesNo + MsgBoxStyle.Question + MsgBoxStyle.DefaultButton2) <> MsgBoxResult.Yes Then
				Cancel = 1
			End If
		Else
			'       If UnloadMode <= vbFormControlMenu Then
			'            If mCLieferant.msLfrVertragsArt = "S" Then
			'                sMsgText = "Möchten Sie den Spoteinkauf verlassen ?"
			'            Else
			'                sMsgText = "Möchten Sie den Lieferanten verlassen ?"
			'            End If
			'            If MsgBox(sMsgText, vbYesNo + vbQuestion + vbDefaultButton2) <> vbYes Then
			'                Cancel = 1
			'            End If
			'       End If
		End If
		eventArgs.Cancel = Cancel
	End Sub

End Class
