This commit is contained in:
2024-12-12 10:44:14 +01:00
parent 43b091c40f
commit 9adffd7397
4 changed files with 102 additions and 47 deletions

View File

@@ -646,7 +646,6 @@ Public Class frmEintragTvNew
cmbTvTextBezeichnungAuswahl.ValueMember = "ID"
cmbTvTextBezeichnungAuswahl.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList
cmbTvTextBezeichnungAuswahl.SelectedIndex = -1
cmbPosition.SelectedIndex = -1
isInitializing = False
@@ -669,11 +668,7 @@ Public Class frmEintragTvNew
Private Sub FillFieldsFromAviso(ByVal aviso As cAvisoTvNew)
cmbTvTextBezeichnungAuswahl.SelectedValue = aviso.TvTextBezeichnungID
If Not String.IsNullOrEmpty(aviso.Position) Then
cmbPosition.SelectedItem = aviso.Position
Else
cmbPosition.SelectedIndex = -1
End If
txtNeueTvTextBezeichnung.Text = ""
@@ -723,7 +718,7 @@ Public Class frmEintragTvNew
chkFriday.Checked = aviso.IsFriday.GetValueOrDefault(False)
chkSaturday.Checked = aviso.IsSaturday.GetValueOrDefault(False)
chkSunday.Checked = aviso.IsSunday.GetValueOrDefault(False)
nudPrioritaet.Value = Convert.ToDecimal(aviso.Art)
chkIsActive.Checked = aviso.IsActive
grpWochentage.Enabled = chkIsRecurring.Checked
@@ -885,11 +880,7 @@ Public Class frmEintragTvNew
Dim htmlContent3 As String = ConvertRtfToHtml(rtfContent3)
myAvisoTvNew.TvTextBezeichnung = verwendeteTvTextBezeichnung
myAvisoTvNew.StandortID = currentStandortID
If cmbPosition.SelectedIndex >= 0 Then
myAvisoTvNew.Position = cmbPosition.SelectedItem.ToString()
Else
myAvisoTvNew.Position = Nothing
End If
If isNeueTvTextBezeichnung Then
If AvisoTvNewDAL.IstTvTextBezeichnungVorhanden(myAvisoTvNew.TvTextBezeichnung) Then
MessageBox.Show("Die TvTextBezeichnung ist vorhanden. Bitte wählen Sie eine eindeutige TvTextBezeichnung.", "Eingabefehler", MessageBoxButtons.OK, MessageBoxIcon.Warning)
@@ -925,6 +916,7 @@ Public Class frmEintragTvNew
myAvisoTvNew.IsSunday = chkSunday.Checked
myAvisoTvNew.IsActive = chkIsActive.Checked
myAvisoTvNew.Art = Convert.ToInt32(nudPrioritaet.Value)
If Neuanlage Then
myAvisoTvNew.Standort = cbxStandort.SelectedItem?.ToString()
@@ -975,7 +967,7 @@ Public Class frmEintragTvNew
AvisoTvNewDAL.SetzeAufInaktiv(myAvisoTvNew.TvTextBezeichnungID)
list.Clear()
AvisoTvNewDAL.LesenAvisoTvNew(0, "", cbxStandort.SelectedItem?.ToString(), list)
initdgv() ' Verwende jetzt die parameterlose Methode
initdgv()
ClearFields()
myAvisoTvNew = Nothing
Neuanlage = False
@@ -1041,11 +1033,11 @@ Public Class frmEintragTvNew
Private Sub ClearFields()
cmbTvTextBezeichnungAuswahl.SelectedIndex = -1
cmbPosition.SelectedIndex = -1
txtNeueTvTextBezeichnung.Text = ""
rtbZeile1.Text = ""
rtbZeile2.Text = ""
rtbZeile3.Text = ""
nudPrioritaet.Value = Convert.ToDecimal(0)
dtpStartDate.Value = DateTime.Now
dtpStartDate.Checked = False
dtpEndDate.Value = DateTime.Now