por ahora todo menos orden de compra y remito

This commit is contained in:
2024-08-11 18:25:17 -03:00
parent ab890dbf98
commit 75c9f8ed9b
72 changed files with 985 additions and 379 deletions

View File

@@ -67,6 +67,12 @@ namespace Vista
// Asignar la lista de categorías al ComboBox
cmbCategoria.DataSource = categorias;
var listprod = ControladoraProductos.Instance.Listar();
numId.Value = (listprod.Count > 0) ?
listprod.Max(x => x.Id + 1) :
0;
numId.Enabled = false;
}
@@ -75,8 +81,8 @@ namespace Vista
string devolucion = "";
// Validar Nombre
if (string.IsNullOrEmpty(txtNombre.Text)) { devolucion += "El nombre del producto no puede estar vacío.\n"; }
if (txtNombre.Text.Length > 100) { devolucion += "El nombre del producto no puede superar los 100 caracteres.\n"; }
if (string.IsNullOrEmpty(txtNombre.Text)) { devolucion += "El nombre del producto no puede estar vacío.\n"; }
if (txtNombre.Text.Length > 100) { devolucion += "El nombre del producto no puede superar los 100 caracteres.\n"; }
if (numId.Value <= 0) { devolucion += "NO es un cuit válido"; };
// Validar Precio
@@ -199,5 +205,5 @@ namespace Vista
}
}
}
}
}