Sendungsdetails, AVISOTV
This commit is contained in:
@@ -8,6 +8,7 @@ Public Class frmEintragTV
|
||||
Dim myAvisoTV As New cAvisoTV
|
||||
Dim hÄnderung As Boolean = False
|
||||
Dim Neuanlage As Boolean = False
|
||||
Dim list As New List(Of cAvisoTV)
|
||||
|
||||
|
||||
Public Sub New()
|
||||
@@ -25,32 +26,17 @@ Public Class frmEintragTV
|
||||
Private Sub frmEintragTV_Load(sender As System.Object, e As System.EventArgs) Handles MyBase.Load
|
||||
Me.CenterToParent()
|
||||
|
||||
'cGlobal.Aktive_ID = 1 'standardmäßig ist der Wert 1
|
||||
list.Clear()
|
||||
cbxStandort.Items.Clear()
|
||||
myAvisoTV = AvisoTVDAL.LesenAvisoTV(0, "", "", "", list)
|
||||
|
||||
'If cGlobal.Aktive_ID = 0 Then
|
||||
' 'es erfolgt eine Neuanlage
|
||||
'
|
||||
'
|
||||
'Else
|
||||
' Me.Text = "Änderung Text für TV-Anzeige"
|
||||
'ausgewählter Datensatz wird geladen
|
||||
myAvisoTV = AvisoTVDAL.LesenAvisoTV(0, "", VERAG_PROG_ALLGEMEIN.cAllgemein.NIEDERLASSUNG, "")
|
||||
If myAvisoTV IsNot Nothing Then
|
||||
'Werte(zuweisen)
|
||||
txtZeile1.Text = myAvisoTV.FixeZeile1
|
||||
txtZeile2.Text = myAvisoTV.FixeZeile2
|
||||
Me.Text = "Änderung Text für TV-Anzeige"
|
||||
Else
|
||||
myAvisoTV = New cAvisoTV
|
||||
myAvisoTV.Standort = VERAG_PROG_ALLGEMEIN.cAllgemein.NIEDERLASSUNG
|
||||
myAvisoTV.Art = "INFO"
|
||||
'Werte(zuweisen)
|
||||
Neuanlage = True
|
||||
txtZeile1.Text = ""
|
||||
txtZeile2.Text = ""
|
||||
Me.Text = "Neuanlage TV-Text"
|
||||
End If
|
||||
If list.Count < 1 Then Exit Sub
|
||||
|
||||
For Each s In list.Where(Function(x) x.Standort <> "").Select(Function(x) x.Standort).Distinct.ToList
|
||||
cbxStandort.Items.Add(s)
|
||||
Next
|
||||
|
||||
initdgv(cbxStandort._value)
|
||||
|
||||
End Sub
|
||||
|
||||
@@ -115,4 +101,53 @@ Public Class frmEintragTV
|
||||
Me.Close()
|
||||
End Sub
|
||||
|
||||
Private Sub cbxStandort_SelectedValueChanged(sender As Object, e As EventArgs) Handles cbxStandort.SelectedValueChanged
|
||||
initdgv(cbxStandort._value)
|
||||
End Sub
|
||||
|
||||
Private Sub initdgv(standort As String)
|
||||
Try
|
||||
|
||||
|
||||
myAvisoTV = AvisoTVDAL.LesenAvisoTV(0, "", "", standort, list)
|
||||
|
||||
If list Is Nothing Or list.Count = 0 Then
|
||||
dgvAVISOTV.Rows.Clear()
|
||||
Exit Sub
|
||||
|
||||
Else
|
||||
dgvAVISOTV.DataSource = list
|
||||
|
||||
End If
|
||||
|
||||
|
||||
|
||||
'For Each row As DataGridViewRow In dgvAVISOTV.Rows
|
||||
|
||||
' If row.Cells("Special").Value IsNot DBNull.Value AndAlso (row.Cells("Special").Value.ToString.ToLower.Contains("xx")) Then row.DefaultCellStyle.ForeColor = Color.Gray
|
||||
|
||||
'Next
|
||||
|
||||
|
||||
If myAvisoTV IsNot Nothing Then
|
||||
'Werte(zuweisen)
|
||||
txtZeile1.Text = myAvisoTV.FixeZeile1
|
||||
txtZeile2.Text = myAvisoTV.FixeZeile2
|
||||
Me.Text = "Änderung Text für TV-Anzeige"
|
||||
Else
|
||||
myAvisoTV = New cAvisoTV
|
||||
myAvisoTV.Standort = VERAG_PROG_ALLGEMEIN.cAllgemein.NIEDERLASSUNG
|
||||
myAvisoTV.Art = "INFO"
|
||||
'Werte(zuweisen)
|
||||
Neuanlage = True
|
||||
txtZeile1.Text = ""
|
||||
txtZeile2.Text = ""
|
||||
Me.Text = "Neuanlage TV-Text"
|
||||
End If
|
||||
|
||||
Catch ex As Exception
|
||||
VERAG_PROG_ALLGEMEIN.cErrorHandler.ERR(ex.Message, ex.StackTrace, System.Reflection.MethodInfo.GetCurrentMethod.Name)
|
||||
End Try
|
||||
|
||||
End Sub
|
||||
End Class
|
||||
|
||||
Reference in New Issue
Block a user