From 74c82bd121aa478b225ade8264f4d40b59a02a0a Mon Sep 17 00:00:00 2001 From: "d.breimaier" Date: Mon, 23 Jan 2023 09:54:01 +0100 Subject: [PATCH] Warenort max Anzahl an Zeichen auf 50 gesetzt inkl Exception Handling --- Aviso/frmWarenorte.vb | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/Aviso/frmWarenorte.vb b/Aviso/frmWarenorte.vb index 0c1126e..724fece 100644 --- a/Aviso/frmWarenorte.vb +++ b/Aviso/frmWarenorte.vb @@ -192,6 +192,13 @@ Public Class frmWarenorte Dim WarenortNew As New cWarenorte(dgvWarenorteNew.SelectedRows(0).Cells("wo_id").Value) + If txtWarenort.TextLength > 50 Then + lblWarning.Text = "Warenort darf max 50 Zeichen besitzen!" + Exit Sub + Else + lblWarning.Text = "" + End If + WarenortNew.wo_warenort = txtWarenort.Text WarenortNew.wo_bezeichnung = txtBezeichnung.Text WarenortNew.wo_aktiv = cbxAktiv.Checked @@ -208,12 +215,6 @@ Public Class frmWarenorte WarenortNew.wo_ze = cxZE.Checked WarenortNew.wo_zv = cxZV.Checked - 'If cbxGrenzstelle._value = "" Then - ' lblWarning.Text = "Grenzstelle muss ausgewählt werden!" - ' Exit Sub - 'Else - ' lblWarning.Text = "" - 'End If WarenortNew.SAVE() dgvWarenorteNew.GetOrder()