cosas que faltaban
This commit is contained in:
Binary file not shown.
Binary file not shown.
@@ -6,6 +6,12 @@
|
|||||||
<Nullable>enable</Nullable>
|
<Nullable>enable</Nullable>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
|
<<<<<<< HEAD
|
||||||
|
=======
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
>>>>>>> c493033 (cosas que faltaban)
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ProjectReference Include="..\Modelo\Modelo.csproj" />
|
<ProjectReference Include="..\Modelo\Modelo.csproj" />
|
||||||
<ProjectReference Include="..\Entidades\Entidades.csproj" />
|
<ProjectReference Include="..\Entidades\Entidades.csproj" />
|
||||||
|
|||||||
@@ -6,31 +6,48 @@ namespace Controladora
|
|||||||
{
|
{
|
||||||
public class ControladoraCategorias : Singleton<ControladoraCategorias>
|
public class ControladoraCategorias : Singleton<ControladoraCategorias>
|
||||||
{
|
{
|
||||||
|
// Método para verificar si una categoría con un ID ya existe
|
||||||
|
private bool CategoriaExiste(int id)
|
||||||
|
{
|
||||||
|
var categorias = RepositorioCategoria.Instance.Listar();
|
||||||
|
return categorias.Any(c => c.Id == id);
|
||||||
|
}
|
||||||
|
|
||||||
public string Añadir(Categoria t)
|
public string Añadir(Categoria t)
|
||||||
{
|
{
|
||||||
if (t == null) return "El Categoria es nulo fallo la carga";
|
if (t == null) return "La categoría es nula, fallo la carga";
|
||||||
|
|
||||||
return (RepositorioCategoria.Instance.Add(t)) ?
|
if (CategoriaExiste(t.Id))
|
||||||
$"El Categoria {t.Descripcion} se cargo correctamente":
|
{
|
||||||
$"Fallo la carga del Categoria {t.Descripcion}";
|
return $"Ya existe una categoría con el ID {t.Id}";
|
||||||
|
}
|
||||||
|
|
||||||
|
return (RepositorioCategoria.Instance.Add(t)) ?
|
||||||
|
$"La categoría {t.Descripcion} se cargó correctamente" :
|
||||||
|
$"Falló la carga de la categoría {t.Descripcion}";
|
||||||
}
|
}
|
||||||
|
|
||||||
public string Eliminar(Categoria t)
|
public string Eliminar(Categoria t)
|
||||||
{
|
{
|
||||||
if (t == null) return "El Categoria es nulo fallo la carga";
|
if (t == null) return "La categoría es nula, fallo la carga";
|
||||||
|
|
||||||
return (RepositorioCategoria.Instance.Del(t)) ?
|
return (RepositorioCategoria.Instance.Del(t)) ?
|
||||||
$"El Categoria {t.Descripcion} se Elimino correctamente":
|
$"La categoría {t.Descripcion} se eliminó correctamente" :
|
||||||
$"Fallo la Eliminacion del Categoria {t.Descripcion}";
|
$"Falló la eliminación de la categoría {t.Descripcion}";
|
||||||
}
|
}
|
||||||
|
|
||||||
public string Modificar(Categoria t)
|
public string Modificar(Categoria t)
|
||||||
{
|
{
|
||||||
if (t == null) return "El Categoria es nulo fallo la carga";
|
if (t == null) return "La categoría es nula, fallo la carga";
|
||||||
|
|
||||||
return (RepositorioCategoria.Instance.Mod(t)) ?
|
if (!CategoriaExiste(t.Id))
|
||||||
$"El Categoria {t.Descripcion} se Modifico correctamente":
|
{
|
||||||
$"Fallo la Modificacion del Categoria {t.Descripcion}";
|
return $"No se encontró una categoría con el ID {t.Id}";
|
||||||
|
}
|
||||||
|
|
||||||
|
return (RepositorioCategoria.Instance.Mod(t)) ?
|
||||||
|
$"La categoría {t.Descripcion} se modificó correctamente" :
|
||||||
|
$"Falló la modificación de la categoría {t.Descripcion}";
|
||||||
}
|
}
|
||||||
|
|
||||||
public ReadOnlyCollection<Categoria> Listar()
|
public ReadOnlyCollection<Categoria> Listar()
|
||||||
@@ -39,4 +56,3 @@ namespace Controladora
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -6,33 +6,51 @@ namespace Controladora
|
|||||||
{
|
{
|
||||||
public class ControladoraClientes : Singleton<ControladoraClientes>
|
public class ControladoraClientes : Singleton<ControladoraClientes>
|
||||||
{
|
{
|
||||||
public string Añadir(Cliente cl)
|
public string Añadir(Cliente t)
|
||||||
{
|
{
|
||||||
if (cl == null) return "El Cliente es nulo fallo la carga";
|
if (t == null)
|
||||||
|
{
|
||||||
|
return "El Cliente es nulo, fallo la carga";
|
||||||
|
}
|
||||||
|
|
||||||
return (RepositorioClientes.Instance.Add(cl)) ?
|
// Verificar si el CUIT ya existe en el repositorio
|
||||||
$"El Cliente {cl.Nombre} se cargo correctamente":
|
if (RepositorioClientes.Instance.ExistePorCuit(t.Cuit))
|
||||||
$"Fallo la carga del Cliente {cl.Nombre}";
|
{
|
||||||
|
return $"El Cliente con el CUIT {t.Cuit} ya existe";
|
||||||
|
}
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
bool resultado = RepositorioClientes.Instance.Add(t);
|
||||||
|
return resultado ?
|
||||||
|
$"El Cliente con el CUIT {t.Cuit} se cargó correctamente" :
|
||||||
|
$"Falló la carga del Cliente con el CUIT {t.Cuit}";
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
// Captura cualquier excepción no prevista
|
||||||
|
return $"Ocurrió un error inesperado: {ex.Message}";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public string Eliminar(long t)
|
public string Eliminar(long cuit)
|
||||||
{
|
{
|
||||||
var cl = RepositorioClientes.Instance.Listar().First(x => x.Cuit == t);
|
// Buscar el cliente por CUIT antes de eliminar
|
||||||
|
var cliente = RepositorioClientes.Instance.Listar().FirstOrDefault(x => x.Cuit == cuit);
|
||||||
|
if (cliente == null) return "El Cliente no existe";
|
||||||
|
|
||||||
if (cl == null) return "El Cliente es nulo fallo la carga";
|
return (RepositorioClientes.Instance.Del(cliente)) ?
|
||||||
|
$"El Cliente {cliente.Nombre} se eliminó correctamente" :
|
||||||
return (RepositorioClientes.Instance.Del(cl)) ?
|
$"Falló la eliminación del Cliente con el CUIT {cuit}";
|
||||||
$"El Cliente {cl.Nombre} se Elimino correctamente":
|
|
||||||
$"Fallo la Eliminacion del Cliente {t}";
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public string Modificar(Cliente t)
|
public string Modificar(Cliente t)
|
||||||
{
|
{
|
||||||
if (t == null) return "El Cliente es nulo fallo la carga";
|
if (t == null) return "El Cliente es nulo, fallo la carga";
|
||||||
|
|
||||||
return (RepositorioClientes.Instance.Mod(t)) ?
|
return (RepositorioClientes.Instance.Mod(t)) ?
|
||||||
$"El Cliente {t.Nombre} se Modifico correctamente":
|
$"El Cliente con el CUIT {t.Cuit} se modificó correctamente" :
|
||||||
$"Fallo la Modificacion del Cliente {t.Nombre}";
|
$"Falló la modificación del Cliente con el CUIT {t.Cuit}";
|
||||||
}
|
}
|
||||||
|
|
||||||
public ReadOnlyCollection<Cliente> Listar()
|
public ReadOnlyCollection<Cliente> Listar()
|
||||||
@@ -40,4 +58,4 @@ namespace Controladora
|
|||||||
return RepositorioClientes.Instance.Listar();
|
return RepositorioClientes.Instance.Listar();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -8,29 +8,49 @@ namespace Controladora
|
|||||||
{
|
{
|
||||||
public string Añadir(Factura t)
|
public string Añadir(Factura t)
|
||||||
{
|
{
|
||||||
if (t == null) return "El Factura es nulo fallo la carga";
|
if (t == null) return "La Factura es nula, fallo la carga";
|
||||||
|
|
||||||
return (RepositorioFactura.Instance.Add(t)) ?
|
if (RepositorioFactura.Instance.ExistePorId(t.Id))
|
||||||
$"El Factura {t.Id} se cargo correctamente":
|
{
|
||||||
$"Fallo la carga del Factura {t.Id}";
|
return $"La Factura con el ID {t.Id} ya existe";
|
||||||
|
}
|
||||||
|
|
||||||
|
// Verificar si el cliente está seleccionado
|
||||||
|
if (t.Cliente == null || t.Cliente.Cuit == 0)
|
||||||
|
{
|
||||||
|
return "Debe seleccionar un cliente antes de agregar la factura";
|
||||||
|
}
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
bool resultado = RepositorioFactura.Instance.Add(t);
|
||||||
|
return resultado ?
|
||||||
|
$"La Factura con el ID {t.Id} se cargó correctamente" :
|
||||||
|
$"Falló la carga de la Factura con el ID {t.Id}";
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
// Captura cualquier excepción no prevista
|
||||||
|
return $"Ocurrió un error inesperado: {ex.Message}";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public string Eliminar(Factura t)
|
public string Eliminar(Factura t)
|
||||||
{
|
{
|
||||||
if (t == null) return "El Factura es nulo fallo la carga";
|
if (t == null) return "La Factura es nula, fallo la carga";
|
||||||
|
|
||||||
return (RepositorioFactura.Instance.Del(t)) ?
|
return (RepositorioFactura.Instance.Del(t)) ?
|
||||||
$"El Factura {t.Id} se Elimino correctamente":
|
$"La Factura con el ID {t.Id} se eliminó correctamente" :
|
||||||
$"Fallo la Eliminacion del Factura {t.Id}";
|
$"Falló la eliminación de la Factura con el ID {t.Id}";
|
||||||
}
|
}
|
||||||
|
|
||||||
public string Modificar(Factura t)
|
public string Modificar(Factura t)
|
||||||
{
|
{
|
||||||
if (t == null) return "El Factura es nulo fallo la carga";
|
if (t == null) return "La Factura es nula, fallo la carga";
|
||||||
|
|
||||||
return (RepositorioFactura.Instance.Mod(t)) ?
|
return (RepositorioFactura.Instance.Mod(t)) ?
|
||||||
$"El Factura {t.Id} se Modifico correctamente":
|
$"La Factura con el ID {t.Id} se modificó correctamente" :
|
||||||
$"Fallo la Modificacion del Factura {t.Id}";
|
$"Falló la modificación de la Factura con el ID {t.Id}";
|
||||||
}
|
}
|
||||||
|
|
||||||
public ReadOnlyCollection<Factura> Listar()
|
public ReadOnlyCollection<Factura> Listar()
|
||||||
@@ -39,3 +59,4 @@ namespace Controladora
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -37,5 +37,7 @@ namespace Controladora
|
|||||||
{
|
{
|
||||||
return RepositorioProductos.Instance.Listar();
|
return RepositorioProductos.Instance.Listar();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -10,29 +10,36 @@ namespace Controladora
|
|||||||
{
|
{
|
||||||
if (t == null) return "El Proveedor es nulo fallo la carga";
|
if (t == null) return "El Proveedor es nulo fallo la carga";
|
||||||
|
|
||||||
return (RepositorioProveedor.Instance.Add(t)) ?
|
try
|
||||||
$"El Proveedor {t.Nombre} se cargo correctamente":
|
{
|
||||||
$"Fallo la carga del Proveedor {t.Nombre}";
|
return RepositorioProveedor.Instance.Add(t) ?
|
||||||
|
$"El Proveedor {t.Nombre} se cargó correctamente" :
|
||||||
|
$"Falló la carga del Proveedor {t.Nombre}";
|
||||||
|
}
|
||||||
|
catch (InvalidOperationException ex)
|
||||||
|
{
|
||||||
|
return ex.Message; // Captura la excepción y muestra el mensaje adecuado
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public string Eliminar(long t)
|
public string Eliminar(long t)
|
||||||
{
|
{
|
||||||
var proveedor = RepositorioProveedor.Instance.Listar().First(x => x.Cuit == t);
|
var proveedor = RepositorioProveedor.Instance.Listar().FirstOrDefault(x => x.Cuit == t);
|
||||||
|
|
||||||
if (proveedor == null) return "El Proveedor es nulo fallo la baja";
|
if (proveedor == null) return "El Proveedor es nulo fallo la baja";
|
||||||
|
|
||||||
return (RepositorioProveedor.Instance.Del(proveedor)) ?
|
return (RepositorioProveedor.Instance.Del(proveedor)) ?
|
||||||
$"El Proveedor {proveedor.Nombre} se Elimino correctamente" :
|
$"El Proveedor {proveedor.Nombre} se eliminó correctamente" :
|
||||||
$"Fallo la Eliminacion del Proveedor {t}";
|
$"Falló la eliminación del Proveedor {t}";
|
||||||
}
|
}
|
||||||
|
|
||||||
public string Modificar(Proveedor t)
|
public string Modificar(Proveedor t)
|
||||||
{
|
{
|
||||||
if (t == null) return "El Proveedor es nulo fallo la modificacion";
|
if (t == null) return "El Proveedor es nulo fallo la modificación";
|
||||||
|
|
||||||
return (RepositorioProveedor.Instance.Mod(t)) ?
|
return (RepositorioProveedor.Instance.Mod(t)) ?
|
||||||
$"El Proveedor {t.Nombre} se Modifico correctamente":
|
$"El Proveedor {t.Nombre} se modificó correctamente" :
|
||||||
$"Fallo la Modificacion del Proveedor {t.Nombre}";
|
$"Falló la modificación del Proveedor {t.Nombre}";
|
||||||
}
|
}
|
||||||
|
|
||||||
public ReadOnlyCollection<Proveedor> Listar()
|
public ReadOnlyCollection<Proveedor> Listar()
|
||||||
@@ -40,4 +47,4 @@ namespace Controladora
|
|||||||
return RepositorioProveedor.Instance.Listar();
|
return RepositorioProveedor.Instance.Listar();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
Binary file not shown.
Binary file not shown.
@@ -3,6 +3,7 @@
|
|||||||
"restore": {
|
"restore": {
|
||||||
<<<<<<< HEAD
|
<<<<<<< HEAD
|
||||||
<<<<<<< HEAD
|
<<<<<<< HEAD
|
||||||
|
<<<<<<< HEAD
|
||||||
<<<<<<< HEAD
|
<<<<<<< HEAD
|
||||||
"/home/fede/proyectos/Final_OOP/Controladora/Controladora.csproj": {}
|
"/home/fede/proyectos/Final_OOP/Controladora/Controladora.csproj": {}
|
||||||
},
|
},
|
||||||
@@ -23,13 +24,17 @@
|
|||||||
=======
|
=======
|
||||||
"C:\\Users\\fedpo\\source\\repos\\Final_OOP\\Controladora\\Controladora.csproj": {}
|
"C:\\Users\\fedpo\\source\\repos\\Final_OOP\\Controladora\\Controladora.csproj": {}
|
||||||
>>>>>>> 9b0bde2 (fix: arreglado nivel de acceso para las controladoras)
|
>>>>>>> 9b0bde2 (fix: arreglado nivel de acceso para las controladoras)
|
||||||
|
=======
|
||||||
|
"C:\\Users\\fedpo\\Downloads\\Final\\Final\\Controladora\\Controladora.csproj": {}
|
||||||
|
>>>>>>> c493033 (cosas que faltaban)
|
||||||
},
|
},
|
||||||
"projects": {
|
"projects": {
|
||||||
"C:\\Users\\fedpo\\source\\repos\\Final_OOP\\Controladora\\Controladora.csproj": {
|
"C:\\Users\\fedpo\\Downloads\\Final\\Final\\Controladora\\Controladora.csproj": {
|
||||||
"version": "1.0.0",
|
"version": "1.0.0",
|
||||||
"restore": {
|
"restore": {
|
||||||
"projectUniqueName": "C:\\Users\\fedpo\\source\\repos\\Final_OOP\\Controladora\\Controladora.csproj",
|
"projectUniqueName": "C:\\Users\\fedpo\\Downloads\\Final\\Final\\Controladora\\Controladora.csproj",
|
||||||
"projectName": "Controladora",
|
"projectName": "Controladora",
|
||||||
|
<<<<<<< HEAD
|
||||||
<<<<<<< HEAD
|
<<<<<<< HEAD
|
||||||
"projectPath": "C:\\Users\\Nacho\\Source\\Repos\\Final_OOP\\Controladora\\Controladora.csproj",
|
"projectPath": "C:\\Users\\Nacho\\Source\\Repos\\Final_OOP\\Controladora\\Controladora.csproj",
|
||||||
"packagesPath": "C:\\Users\\Nacho\\.nuget\\packages\\",
|
"packagesPath": "C:\\Users\\Nacho\\.nuget\\packages\\",
|
||||||
@@ -44,8 +49,11 @@
|
|||||||
"/home/fede/.nuget/NuGet/NuGet.Config"
|
"/home/fede/.nuget/NuGet/NuGet.Config"
|
||||||
=======
|
=======
|
||||||
"projectPath": "C:\\Users\\fedpo\\source\\repos\\Final_OOP\\Controladora\\Controladora.csproj",
|
"projectPath": "C:\\Users\\fedpo\\source\\repos\\Final_OOP\\Controladora\\Controladora.csproj",
|
||||||
|
=======
|
||||||
|
"projectPath": "C:\\Users\\fedpo\\Downloads\\Final\\Final\\Controladora\\Controladora.csproj",
|
||||||
|
>>>>>>> c493033 (cosas que faltaban)
|
||||||
"packagesPath": "C:\\Users\\fedpo\\.nuget\\packages\\",
|
"packagesPath": "C:\\Users\\fedpo\\.nuget\\packages\\",
|
||||||
"outputPath": "C:\\Users\\fedpo\\source\\repos\\Final_OOP\\Controladora\\obj\\",
|
"outputPath": "C:\\Users\\fedpo\\Downloads\\Final\\Final\\Controladora\\obj\\",
|
||||||
"projectStyle": "PackageReference",
|
"projectStyle": "PackageReference",
|
||||||
"configFilePaths": [
|
"configFilePaths": [
|
||||||
"C:\\Users\\fedpo\\AppData\\Roaming\\NuGet\\NuGet.Config",
|
"C:\\Users\\fedpo\\AppData\\Roaming\\NuGet\\NuGet.Config",
|
||||||
@@ -69,6 +77,7 @@
|
|||||||
"projectReferences": {
|
"projectReferences": {
|
||||||
<<<<<<< HEAD
|
<<<<<<< HEAD
|
||||||
<<<<<<< HEAD
|
<<<<<<< HEAD
|
||||||
|
<<<<<<< HEAD
|
||||||
<<<<<<< HEAD
|
<<<<<<< HEAD
|
||||||
"/home/fede/proyectos/Final_OOP/Entidades/Entidades.csproj": {
|
"/home/fede/proyectos/Final_OOP/Entidades/Entidades.csproj": {
|
||||||
"projectPath": "/home/fede/proyectos/Final_OOP/Entidades/Entidades.csproj"
|
"projectPath": "/home/fede/proyectos/Final_OOP/Entidades/Entidades.csproj"
|
||||||
@@ -96,6 +105,13 @@
|
|||||||
"C:\\Users\\fedpo\\source\\repos\\Final_OOP\\Modelo\\Modelo.csproj": {
|
"C:\\Users\\fedpo\\source\\repos\\Final_OOP\\Modelo\\Modelo.csproj": {
|
||||||
"projectPath": "C:\\Users\\fedpo\\source\\repos\\Final_OOP\\Modelo\\Modelo.csproj"
|
"projectPath": "C:\\Users\\fedpo\\source\\repos\\Final_OOP\\Modelo\\Modelo.csproj"
|
||||||
>>>>>>> 9b0bde2 (fix: arreglado nivel de acceso para las controladoras)
|
>>>>>>> 9b0bde2 (fix: arreglado nivel de acceso para las controladoras)
|
||||||
|
=======
|
||||||
|
"C:\\Users\\fedpo\\Downloads\\Final\\Final\\Entidades\\Entidades.csproj": {
|
||||||
|
"projectPath": "C:\\Users\\fedpo\\Downloads\\Final\\Final\\Entidades\\Entidades.csproj"
|
||||||
|
},
|
||||||
|
"C:\\Users\\fedpo\\Downloads\\Final\\Final\\Modelo\\Modelo.csproj": {
|
||||||
|
"projectPath": "C:\\Users\\fedpo\\Downloads\\Final\\Final\\Modelo\\Modelo.csproj"
|
||||||
|
>>>>>>> c493033 (cosas que faltaban)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -109,16 +125,6 @@
|
|||||||
"frameworks": {
|
"frameworks": {
|
||||||
"net6.0": {
|
"net6.0": {
|
||||||
"targetAlias": "net6.0",
|
"targetAlias": "net6.0",
|
||||||
"dependencies": {
|
|
||||||
"Emailer": {
|
|
||||||
"target": "Package",
|
|
||||||
"version": "[1.0.0, )"
|
|
||||||
},
|
|
||||||
"webhookSharp": {
|
|
||||||
"target": "Package",
|
|
||||||
"version": "[1.0.0, )"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"imports": [
|
"imports": [
|
||||||
"net461",
|
"net461",
|
||||||
"net462",
|
"net462",
|
||||||
@@ -285,14 +291,14 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"C:\\Users\\fedpo\\source\\repos\\Final_OOP\\Entidades\\Entidades.csproj": {
|
"C:\\Users\\fedpo\\Downloads\\Final\\Final\\Entidades\\Entidades.csproj": {
|
||||||
"version": "1.0.0",
|
"version": "1.0.0",
|
||||||
"restore": {
|
"restore": {
|
||||||
"projectUniqueName": "C:\\Users\\fedpo\\source\\repos\\Final_OOP\\Entidades\\Entidades.csproj",
|
"projectUniqueName": "C:\\Users\\fedpo\\Downloads\\Final\\Final\\Entidades\\Entidades.csproj",
|
||||||
"projectName": "Entidades",
|
"projectName": "Entidades",
|
||||||
"projectPath": "C:\\Users\\fedpo\\source\\repos\\Final_OOP\\Entidades\\Entidades.csproj",
|
"projectPath": "C:\\Users\\fedpo\\Downloads\\Final\\Final\\Entidades\\Entidades.csproj",
|
||||||
"packagesPath": "C:\\Users\\fedpo\\.nuget\\packages\\",
|
"packagesPath": "C:\\Users\\fedpo\\.nuget\\packages\\",
|
||||||
"outputPath": "C:\\Users\\fedpo\\source\\repos\\Final_OOP\\Entidades\\obj\\",
|
"outputPath": "C:\\Users\\fedpo\\Downloads\\Final\\Final\\Entidades\\obj\\",
|
||||||
"projectStyle": "PackageReference",
|
"projectStyle": "PackageReference",
|
||||||
"configFilePaths": [
|
"configFilePaths": [
|
||||||
"C:\\Users\\fedpo\\AppData\\Roaming\\NuGet\\NuGet.Config",
|
"C:\\Users\\fedpo\\AppData\\Roaming\\NuGet\\NuGet.Config",
|
||||||
@@ -341,14 +347,14 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"C:\\Users\\fedpo\\source\\repos\\Final_OOP\\Modelo\\Modelo.csproj": {
|
"C:\\Users\\fedpo\\Downloads\\Final\\Final\\Modelo\\Modelo.csproj": {
|
||||||
"version": "1.0.0",
|
"version": "1.0.0",
|
||||||
"restore": {
|
"restore": {
|
||||||
"projectUniqueName": "C:\\Users\\fedpo\\source\\repos\\Final_OOP\\Modelo\\Modelo.csproj",
|
"projectUniqueName": "C:\\Users\\fedpo\\Downloads\\Final\\Final\\Modelo\\Modelo.csproj",
|
||||||
"projectName": "Modelo",
|
"projectName": "Modelo",
|
||||||
"projectPath": "C:\\Users\\fedpo\\source\\repos\\Final_OOP\\Modelo\\Modelo.csproj",
|
"projectPath": "C:\\Users\\fedpo\\Downloads\\Final\\Final\\Modelo\\Modelo.csproj",
|
||||||
"packagesPath": "C:\\Users\\fedpo\\.nuget\\packages\\",
|
"packagesPath": "C:\\Users\\fedpo\\.nuget\\packages\\",
|
||||||
"outputPath": "C:\\Users\\fedpo\\source\\repos\\Final_OOP\\Modelo\\obj\\",
|
"outputPath": "C:\\Users\\fedpo\\Downloads\\Final\\Final\\Modelo\\obj\\",
|
||||||
"projectStyle": "PackageReference",
|
"projectStyle": "PackageReference",
|
||||||
"configFilePaths": [
|
"configFilePaths": [
|
||||||
"C:\\Users\\fedpo\\AppData\\Roaming\\NuGet\\NuGet.Config",
|
"C:\\Users\\fedpo\\AppData\\Roaming\\NuGet\\NuGet.Config",
|
||||||
@@ -366,8 +372,8 @@
|
|||||||
"net6.0": {
|
"net6.0": {
|
||||||
"targetAlias": "net6.0",
|
"targetAlias": "net6.0",
|
||||||
"projectReferences": {
|
"projectReferences": {
|
||||||
"C:\\Users\\fedpo\\source\\repos\\Final_OOP\\Entidades\\Entidades.csproj": {
|
"C:\\Users\\fedpo\\Downloads\\Final\\Final\\Entidades\\Entidades.csproj": {
|
||||||
"projectPath": "C:\\Users\\fedpo\\source\\repos\\Final_OOP\\Entidades\\Entidades.csproj"
|
"projectPath": "C:\\Users\\fedpo\\Downloads\\Final\\Final\\Entidades\\Entidades.csproj"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -26,10 +26,13 @@
|
|||||||
<ItemGroup Condition=" '$(ExcludeRestorePackageImports)' != 'true' ">
|
<ItemGroup Condition=" '$(ExcludeRestorePackageImports)' != 'true' ">
|
||||||
<SourceRoot Include="C:\Users\fedpo\.nuget\packages\" />
|
<SourceRoot Include="C:\Users\fedpo\.nuget\packages\" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
<<<<<<< HEAD
|
||||||
<PropertyGroup Condition=" '$(ExcludeRestorePackageImports)' != 'true' ">
|
<PropertyGroup Condition=" '$(ExcludeRestorePackageImports)' != 'true' ">
|
||||||
<PkgNewtonsoft_Json Condition=" '$(PkgNewtonsoft_Json)' == '' ">C:\Users\fedpo\.nuget\packages\newtonsoft.json\10.0.1</PkgNewtonsoft_Json>
|
<PkgNewtonsoft_Json Condition=" '$(PkgNewtonsoft_Json)' == '' ">C:\Users\fedpo\.nuget\packages\newtonsoft.json\10.0.1</PkgNewtonsoft_Json>
|
||||||
<PkgMicrosoft_EntityFrameworkCore_Tools Condition=" '$(PkgMicrosoft_EntityFrameworkCore_Tools)' == '' ">C:\Users\fedpo\.nuget\packages\microsoft.entityframeworkcore.tools\2.0.2</PkgMicrosoft_EntityFrameworkCore_Tools>
|
<PkgMicrosoft_EntityFrameworkCore_Tools Condition=" '$(PkgMicrosoft_EntityFrameworkCore_Tools)' == '' ">C:\Users\fedpo\.nuget\packages\microsoft.entityframeworkcore.tools\2.0.2</PkgMicrosoft_EntityFrameworkCore_Tools>
|
||||||
<PkgMicrosoft_CodeAnalysis_Analyzers Condition=" '$(PkgMicrosoft_CodeAnalysis_Analyzers)' == '' ">C:\Users\fedpo\.nuget\packages\microsoft.codeanalysis.analyzers\1.1.0</PkgMicrosoft_CodeAnalysis_Analyzers>
|
<PkgMicrosoft_CodeAnalysis_Analyzers Condition=" '$(PkgMicrosoft_CodeAnalysis_Analyzers)' == '' ">C:\Users\fedpo\.nuget\packages\microsoft.codeanalysis.analyzers\1.1.0</PkgMicrosoft_CodeAnalysis_Analyzers>
|
||||||
>>>>>>> 9b0bde2 (fix: arreglado nivel de acceso para las controladoras)
|
>>>>>>> 9b0bde2 (fix: arreglado nivel de acceso para las controladoras)
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
=======
|
||||||
|
>>>>>>> c493033 (cosas que faltaban)
|
||||||
</Project>
|
</Project>
|
||||||
@@ -12,6 +12,7 @@ build_property.RootNamespace = Controladora
|
|||||||
<<<<<<< HEAD
|
<<<<<<< HEAD
|
||||||
<<<<<<< HEAD
|
<<<<<<< HEAD
|
||||||
<<<<<<< HEAD
|
<<<<<<< HEAD
|
||||||
|
<<<<<<< HEAD
|
||||||
build_property.ProjectDir = /home/fede/proyectos/Final_OOP/Controladora/
|
build_property.ProjectDir = /home/fede/proyectos/Final_OOP/Controladora/
|
||||||
=======
|
=======
|
||||||
build_property.ProjectDir = C:\Users\Nacho\source\repos\Final\Controladora\
|
build_property.ProjectDir = C:\Users\Nacho\source\repos\Final\Controladora\
|
||||||
@@ -27,3 +28,6 @@ build_property.ProjectDir = C:\Users\fedpo\Downloads\Final\Final\Controladora\
|
|||||||
=======
|
=======
|
||||||
build_property.ProjectDir = C:\Users\fedpo\source\repos\Final_OOP\Controladora\
|
build_property.ProjectDir = C:\Users\fedpo\source\repos\Final_OOP\Controladora\
|
||||||
>>>>>>> 9b0bde2 (fix: arreglado nivel de acceso para las controladoras)
|
>>>>>>> 9b0bde2 (fix: arreglado nivel de acceso para las controladoras)
|
||||||
|
=======
|
||||||
|
build_property.ProjectDir = C:\Users\fedpo\Downloads\Final\Final\Controladora\
|
||||||
|
>>>>>>> c493033 (cosas que faltaban)
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
59d9a59c18cc1287fb9e3a009ea4857b622fe3fc
|
f2a6af9cbfa305ccb49144b674ae7e4ce398d6da648f0a2ed5600aa09ceb1f7c
|
||||||
|
|||||||
@@ -50,3 +50,34 @@ C:\Users\fedpo\source\repos\Final_OOP\Controladora\obj\Debug\net6.0\Controladora
|
|||||||
C:\Users\fedpo\source\repos\Final_OOP\Controladora\obj\Debug\net6.0\refint\Controladora.dll
|
C:\Users\fedpo\source\repos\Final_OOP\Controladora\obj\Debug\net6.0\refint\Controladora.dll
|
||||||
C:\Users\fedpo\source\repos\Final_OOP\Controladora\obj\Debug\net6.0\Controladora.pdb
|
C:\Users\fedpo\source\repos\Final_OOP\Controladora\obj\Debug\net6.0\Controladora.pdb
|
||||||
C:\Users\fedpo\source\repos\Final_OOP\Controladora\obj\Debug\net6.0\ref\Controladora.dll
|
C:\Users\fedpo\source\repos\Final_OOP\Controladora\obj\Debug\net6.0\ref\Controladora.dll
|
||||||
|
C:\Users\Nacho\Desktop\Final\Controladora\bin\Debug\net6.0\Controladora.deps.json
|
||||||
|
C:\Users\Nacho\Desktop\Final\Controladora\bin\Debug\net6.0\Controladora.dll
|
||||||
|
C:\Users\Nacho\Desktop\Final\Controladora\bin\Debug\net6.0\Controladora.pdb
|
||||||
|
C:\Users\Nacho\Desktop\Final\Controladora\bin\Debug\net6.0\Entidades.dll
|
||||||
|
C:\Users\Nacho\Desktop\Final\Controladora\bin\Debug\net6.0\Modelo.dll
|
||||||
|
C:\Users\Nacho\Desktop\Final\Controladora\bin\Debug\net6.0\Modelo.pdb
|
||||||
|
C:\Users\Nacho\Desktop\Final\Controladora\bin\Debug\net6.0\Entidades.pdb
|
||||||
|
C:\Users\Nacho\Desktop\Final\Controladora\obj\Debug\net6.0\Controladora.csproj.AssemblyReference.cache
|
||||||
|
C:\Users\Nacho\Desktop\Final\Controladora\obj\Debug\net6.0\Controladora.GeneratedMSBuildEditorConfig.editorconfig
|
||||||
|
C:\Users\Nacho\Desktop\Final\Controladora\obj\Debug\net6.0\Controladora.AssemblyInfoInputs.cache
|
||||||
|
C:\Users\Nacho\Desktop\Final\Controladora\obj\Debug\net6.0\Controladora.AssemblyInfo.cs
|
||||||
|
C:\Users\Nacho\Desktop\Final\Controladora\obj\Debug\net6.0\Controladora.csproj.CoreCompileInputs.cache
|
||||||
|
C:\Users\Nacho\Desktop\Final\Controladora\obj\Debug\net6.0\Controla.1EE7A4DA.Up2Date
|
||||||
|
C:\Users\Nacho\Desktop\Final\Controladora\obj\Debug\net6.0\ref\Controladora.dll
|
||||||
|
C:\Users\Nacho\Desktop\ASDDD\Final\Controladora\bin\Debug\net6.0\Controladora.deps.json
|
||||||
|
C:\Users\Nacho\Desktop\ASDDD\Final\Controladora\bin\Debug\net6.0\Controladora.dll
|
||||||
|
C:\Users\Nacho\Desktop\ASDDD\Final\Controladora\bin\Debug\net6.0\Controladora.pdb
|
||||||
|
C:\Users\Nacho\Desktop\ASDDD\Final\Controladora\bin\Debug\net6.0\Entidades.dll
|
||||||
|
C:\Users\Nacho\Desktop\ASDDD\Final\Controladora\bin\Debug\net6.0\Modelo.dll
|
||||||
|
C:\Users\Nacho\Desktop\ASDDD\Final\Controladora\bin\Debug\net6.0\Modelo.pdb
|
||||||
|
C:\Users\Nacho\Desktop\ASDDD\Final\Controladora\bin\Debug\net6.0\Entidades.pdb
|
||||||
|
C:\Users\Nacho\Desktop\ASDDD\Final\Controladora\obj\Debug\net6.0\Controladora.csproj.AssemblyReference.cache
|
||||||
|
C:\Users\Nacho\Desktop\ASDDD\Final\Controladora\obj\Debug\net6.0\Controladora.GeneratedMSBuildEditorConfig.editorconfig
|
||||||
|
C:\Users\Nacho\Desktop\ASDDD\Final\Controladora\obj\Debug\net6.0\Controladora.AssemblyInfoInputs.cache
|
||||||
|
C:\Users\Nacho\Desktop\ASDDD\Final\Controladora\obj\Debug\net6.0\Controladora.AssemblyInfo.cs
|
||||||
|
C:\Users\Nacho\Desktop\ASDDD\Final\Controladora\obj\Debug\net6.0\Controladora.csproj.CoreCompileInputs.cache
|
||||||
|
C:\Users\Nacho\Desktop\ASDDD\Final\Controladora\obj\Debug\net6.0\Controla.1EE7A4DA.Up2Date
|
||||||
|
C:\Users\Nacho\Desktop\ASDDD\Final\Controladora\obj\Debug\net6.0\Controladora.dll
|
||||||
|
C:\Users\Nacho\Desktop\ASDDD\Final\Controladora\obj\Debug\net6.0\refint\Controladora.dll
|
||||||
|
C:\Users\Nacho\Desktop\ASDDD\Final\Controladora\obj\Debug\net6.0\Controladora.pdb
|
||||||
|
C:\Users\Nacho\Desktop\ASDDD\Final\Controladora\obj\Debug\net6.0\ref\Controladora.dll
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
File diff suppressed because it is too large
Load Diff
@@ -2,6 +2,7 @@
|
|||||||
"version": 2,
|
"version": 2,
|
||||||
<<<<<<< HEAD
|
<<<<<<< HEAD
|
||||||
<<<<<<< HEAD
|
<<<<<<< HEAD
|
||||||
|
<<<<<<< HEAD
|
||||||
<<<<<<< HEAD
|
<<<<<<< HEAD
|
||||||
"dgSpecHash": "Vs+HTdq8Gqw56GHRk+ivU0JJ/5n6ghHJP2CKgIV+gDHL9rO3WgHHPoz0OWJjyozNRvnYskqZVibjHcSALkg9JQ==",
|
"dgSpecHash": "Vs+HTdq8Gqw56GHRk+ivU0JJ/5n6ghHJP2CKgIV+gDHL9rO3WgHHPoz0OWJjyozNRvnYskqZVibjHcSALkg9JQ==",
|
||||||
"success": true,
|
"success": true,
|
||||||
@@ -608,5 +609,11 @@
|
|||||||
"C:\\Users\\fedpo\\.nuget\\packages\\windowsazure.storage\\8.1.4\\windowsazure.storage.8.1.4.nupkg.sha512"
|
"C:\\Users\\fedpo\\.nuget\\packages\\windowsazure.storage\\8.1.4\\windowsazure.storage.8.1.4.nupkg.sha512"
|
||||||
>>>>>>> 9b0bde2 (fix: arreglado nivel de acceso para las controladoras)
|
>>>>>>> 9b0bde2 (fix: arreglado nivel de acceso para las controladoras)
|
||||||
],
|
],
|
||||||
|
=======
|
||||||
|
"dgSpecHash": "7p6sil6BdpeseYcwxc5SCaMq8T52JX3Gb+/veDRUiSWMCYx7lYCBfkail6lsPgISGkw+p3jfoipb6TSmLcP1ZA==",
|
||||||
|
"success": true,
|
||||||
|
"projectFilePath": "C:\\Users\\fedpo\\Downloads\\Final\\Final\\Controladora\\Controladora.csproj",
|
||||||
|
"expectedPackageFiles": [],
|
||||||
|
>>>>>>> c493033 (cosas que faltaban)
|
||||||
"logs": []
|
"logs": []
|
||||||
}
|
}
|
||||||
@@ -1,5 +1,4 @@
|
|||||||
|
using System.ComponentModel;
|
||||||
using System.ComponentModel;
|
|
||||||
|
|
||||||
namespace Entidades
|
namespace Entidades
|
||||||
{
|
{
|
||||||
@@ -10,8 +9,19 @@ namespace Entidades
|
|||||||
public string Apellido { get; set; }
|
public string Apellido { get; set; }
|
||||||
public string Direccion { get; set; }
|
public string Direccion { get; set; }
|
||||||
public string Correo { get; set; }
|
public string Correo { get; set; }
|
||||||
|
|
||||||
[Browsable(false)]
|
[Browsable(false)]
|
||||||
public bool Habilitado { get; set; }
|
public bool Habilitado { get; set; }
|
||||||
|
|
||||||
|
public string NombreCompleto
|
||||||
|
{
|
||||||
|
get { return $"{Nombre} {Apellido}"; }
|
||||||
|
}
|
||||||
|
|
||||||
|
// Sobreescribir ToString() para mostrar el nombre completo
|
||||||
|
public override string ToString()
|
||||||
|
{
|
||||||
|
return NombreCompleto;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,5 +4,7 @@ namespace Entidades
|
|||||||
public class DetallePedido : Detalle<Producto>
|
public class DetallePedido : Detalle<Producto>
|
||||||
{
|
{
|
||||||
public int IdPedido { get; set; }
|
public int IdPedido { get; set; }
|
||||||
|
public int CantidadPedido { get; set; }
|
||||||
|
public List<Producto> Productos { get; set; } = new List<Producto>();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -8,6 +8,7 @@ namespace Entidades
|
|||||||
public string Nombre { get; set; }
|
public string Nombre { get; set; }
|
||||||
public double Precio { get; set; }
|
public double Precio { get; set; }
|
||||||
public bool Habilitado { get; set; }
|
public bool Habilitado { get; set; }
|
||||||
|
public Categoria Categoria { get; set; }
|
||||||
private List<Categoria> categorias = new List<Categoria>();
|
private List<Categoria> categorias = new List<Categoria>();
|
||||||
|
|
||||||
public void AñadirCategoria(Categoria cat) {
|
public void AñadirCategoria(Categoria cat) {
|
||||||
|
|||||||
@@ -1,8 +0,0 @@
|
|||||||
|
|
||||||
namespace Entidades
|
|
||||||
{
|
|
||||||
public class ProductoNoPercedero: Producto
|
|
||||||
{
|
|
||||||
public EnvaseTipo TipoDeEnvase { get; set; }
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,9 +0,0 @@
|
|||||||
|
|
||||||
namespace Entidades
|
|
||||||
{
|
|
||||||
public class ProductoPercedero: Producto
|
|
||||||
{
|
|
||||||
public int MesesHastaConsumoPreferente { get; set; }
|
|
||||||
public int MesesHastaVencimiento { get; set; }
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
using System.Collections.ObjectModel;
|
using System.Collections.ObjectModel;
|
||||||
|
|
||||||
namespace Entidades
|
namespace Entidades
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -11,6 +11,7 @@ build_property.RootNamespace = Entidades
|
|||||||
<<<<<<< HEAD
|
<<<<<<< HEAD
|
||||||
<<<<<<< HEAD
|
<<<<<<< HEAD
|
||||||
<<<<<<< HEAD
|
<<<<<<< HEAD
|
||||||
|
<<<<<<< HEAD
|
||||||
build_property.ProjectDir = /home/fede/proyectos/Final_OOP/Entidades/
|
build_property.ProjectDir = /home/fede/proyectos/Final_OOP/Entidades/
|
||||||
=======
|
=======
|
||||||
build_property.ProjectDir = C:\Users\Nacho\source\repos\Final\Entidades\
|
build_property.ProjectDir = C:\Users\Nacho\source\repos\Final\Entidades\
|
||||||
@@ -23,3 +24,6 @@ build_property.EnableGeneratedComInterfaceComImportInterop =
|
|||||||
=======
|
=======
|
||||||
build_property.ProjectDir = C:\Users\fedpo\source\repos\Final_OOP\Entidades\
|
build_property.ProjectDir = C:\Users\fedpo\source\repos\Final_OOP\Entidades\
|
||||||
>>>>>>> 51676e6 (feat: Cambios Varios (mirar Desc))
|
>>>>>>> 51676e6 (feat: Cambios Varios (mirar Desc))
|
||||||
|
=======
|
||||||
|
build_property.ProjectDir = C:\Users\fedpo\Downloads\Final\Final\Entidades\
|
||||||
|
>>>>>>> c493033 (cosas que faltaban)
|
||||||
|
|||||||
@@ -3,6 +3,7 @@
|
|||||||
"restore": {
|
"restore": {
|
||||||
<<<<<<< HEAD
|
<<<<<<< HEAD
|
||||||
<<<<<<< HEAD
|
<<<<<<< HEAD
|
||||||
|
<<<<<<< HEAD
|
||||||
<<<<<<< HEAD
|
<<<<<<< HEAD
|
||||||
"/home/fede/proyectos/Final_OOP/Entidades/Entidades.csproj": {}
|
"/home/fede/proyectos/Final_OOP/Entidades/Entidades.csproj": {}
|
||||||
},
|
},
|
||||||
@@ -23,13 +24,17 @@
|
|||||||
=======
|
=======
|
||||||
"C:\\Users\\fedpo\\source\\repos\\Final_OOP\\Entidades\\Entidades.csproj": {}
|
"C:\\Users\\fedpo\\source\\repos\\Final_OOP\\Entidades\\Entidades.csproj": {}
|
||||||
>>>>>>> 51676e6 (feat: Cambios Varios (mirar Desc))
|
>>>>>>> 51676e6 (feat: Cambios Varios (mirar Desc))
|
||||||
|
=======
|
||||||
|
"C:\\Users\\fedpo\\Downloads\\Final\\Final\\Entidades\\Entidades.csproj": {}
|
||||||
|
>>>>>>> c493033 (cosas que faltaban)
|
||||||
},
|
},
|
||||||
"projects": {
|
"projects": {
|
||||||
"C:\\Users\\fedpo\\source\\repos\\Final_OOP\\Entidades\\Entidades.csproj": {
|
"C:\\Users\\fedpo\\Downloads\\Final\\Final\\Entidades\\Entidades.csproj": {
|
||||||
"version": "1.0.0",
|
"version": "1.0.0",
|
||||||
"restore": {
|
"restore": {
|
||||||
"projectUniqueName": "C:\\Users\\fedpo\\source\\repos\\Final_OOP\\Entidades\\Entidades.csproj",
|
"projectUniqueName": "C:\\Users\\fedpo\\Downloads\\Final\\Final\\Entidades\\Entidades.csproj",
|
||||||
"projectName": "Entidades",
|
"projectName": "Entidades",
|
||||||
|
<<<<<<< HEAD
|
||||||
<<<<<<< HEAD
|
<<<<<<< HEAD
|
||||||
"projectPath": "C:\\Users\\Nacho\\Source\\Repos\\Final_OOP\\Entidades\\Entidades.csproj",
|
"projectPath": "C:\\Users\\Nacho\\Source\\Repos\\Final_OOP\\Entidades\\Entidades.csproj",
|
||||||
"packagesPath": "C:\\Users\\Nacho\\.nuget\\packages\\",
|
"packagesPath": "C:\\Users\\Nacho\\.nuget\\packages\\",
|
||||||
@@ -44,8 +49,11 @@
|
|||||||
"/home/fede/.nuget/NuGet/NuGet.Config"
|
"/home/fede/.nuget/NuGet/NuGet.Config"
|
||||||
=======
|
=======
|
||||||
"projectPath": "C:\\Users\\fedpo\\source\\repos\\Final_OOP\\Entidades\\Entidades.csproj",
|
"projectPath": "C:\\Users\\fedpo\\source\\repos\\Final_OOP\\Entidades\\Entidades.csproj",
|
||||||
|
=======
|
||||||
|
"projectPath": "C:\\Users\\fedpo\\Downloads\\Final\\Final\\Entidades\\Entidades.csproj",
|
||||||
|
>>>>>>> c493033 (cosas que faltaban)
|
||||||
"packagesPath": "C:\\Users\\fedpo\\.nuget\\packages\\",
|
"packagesPath": "C:\\Users\\fedpo\\.nuget\\packages\\",
|
||||||
"outputPath": "C:\\Users\\fedpo\\source\\repos\\Final_OOP\\Entidades\\obj\\",
|
"outputPath": "C:\\Users\\fedpo\\Downloads\\Final\\Final\\Entidades\\obj\\",
|
||||||
"projectStyle": "PackageReference",
|
"projectStyle": "PackageReference",
|
||||||
"configFilePaths": [
|
"configFilePaths": [
|
||||||
"C:\\Users\\fedpo\\AppData\\Roaming\\NuGet\\NuGet.Config",
|
"C:\\Users\\fedpo\\AppData\\Roaming\\NuGet\\NuGet.Config",
|
||||||
|
|||||||
@@ -19,6 +19,7 @@
|
|||||||
"restore": {
|
"restore": {
|
||||||
<<<<<<< HEAD
|
<<<<<<< HEAD
|
||||||
<<<<<<< HEAD
|
<<<<<<< HEAD
|
||||||
|
<<<<<<< HEAD
|
||||||
<<<<<<< HEAD
|
<<<<<<< HEAD
|
||||||
"projectUniqueName": "/home/fede/proyectos/Final_OOP/Entidades/Entidades.csproj",
|
"projectUniqueName": "/home/fede/proyectos/Final_OOP/Entidades/Entidades.csproj",
|
||||||
"projectName": "Entidades",
|
"projectName": "Entidades",
|
||||||
@@ -44,10 +45,13 @@
|
|||||||
"/home/fede/.nuget/NuGet/NuGet.Config"
|
"/home/fede/.nuget/NuGet/NuGet.Config"
|
||||||
=======
|
=======
|
||||||
"projectUniqueName": "C:\\Users\\fedpo\\source\\repos\\Final_OOP\\Entidades\\Entidades.csproj",
|
"projectUniqueName": "C:\\Users\\fedpo\\source\\repos\\Final_OOP\\Entidades\\Entidades.csproj",
|
||||||
|
=======
|
||||||
|
"projectUniqueName": "C:\\Users\\fedpo\\Downloads\\Final\\Final\\Entidades\\Entidades.csproj",
|
||||||
|
>>>>>>> c493033 (cosas que faltaban)
|
||||||
"projectName": "Entidades",
|
"projectName": "Entidades",
|
||||||
"projectPath": "C:\\Users\\fedpo\\source\\repos\\Final_OOP\\Entidades\\Entidades.csproj",
|
"projectPath": "C:\\Users\\fedpo\\Downloads\\Final\\Final\\Entidades\\Entidades.csproj",
|
||||||
"packagesPath": "C:\\Users\\fedpo\\.nuget\\packages\\",
|
"packagesPath": "C:\\Users\\fedpo\\.nuget\\packages\\",
|
||||||
"outputPath": "C:\\Users\\fedpo\\source\\repos\\Final_OOP\\Entidades\\obj\\",
|
"outputPath": "C:\\Users\\fedpo\\Downloads\\Final\\Final\\Entidades\\obj\\",
|
||||||
"projectStyle": "PackageReference",
|
"projectStyle": "PackageReference",
|
||||||
"configFilePaths": [
|
"configFilePaths": [
|
||||||
"C:\\Users\\fedpo\\AppData\\Roaming\\NuGet\\NuGet.Config",
|
"C:\\Users\\fedpo\\AppData\\Roaming\\NuGet\\NuGet.Config",
|
||||||
|
|||||||
@@ -2,6 +2,7 @@
|
|||||||
"version": 2,
|
"version": 2,
|
||||||
<<<<<<< HEAD
|
<<<<<<< HEAD
|
||||||
<<<<<<< HEAD
|
<<<<<<< HEAD
|
||||||
|
<<<<<<< HEAD
|
||||||
<<<<<<< HEAD
|
<<<<<<< HEAD
|
||||||
"dgSpecHash": "LSnXGupX+sIU3VjCECy137T1ThKtECGacQq+4Cfd3SDyYEpIcp26yf15qIysqN2+1Fwti7c13f3fBKmUt8i0Og==",
|
"dgSpecHash": "LSnXGupX+sIU3VjCECy137T1ThKtECGacQq+4Cfd3SDyYEpIcp26yf15qIysqN2+1Fwti7c13f3fBKmUt8i0Og==",
|
||||||
"success": true,
|
"success": true,
|
||||||
@@ -18,8 +19,11 @@
|
|||||||
=======
|
=======
|
||||||
"dgSpecHash": "HXGSmDVQyRmnk0PltQ/0YQ5GVlG0+k5yrwjE8AEym5VgLOBWNEQdRU3yZ7m5TuvHzpPyj4xzCWtK6uATLanIjg==",
|
"dgSpecHash": "HXGSmDVQyRmnk0PltQ/0YQ5GVlG0+k5yrwjE8AEym5VgLOBWNEQdRU3yZ7m5TuvHzpPyj4xzCWtK6uATLanIjg==",
|
||||||
>>>>>>> 51676e6 (feat: Cambios Varios (mirar Desc))
|
>>>>>>> 51676e6 (feat: Cambios Varios (mirar Desc))
|
||||||
|
=======
|
||||||
|
"dgSpecHash": "iQ0EifyjZh9oi0Mdt+E3sLhf14CzOUsLKHxZb9iRQ9RyPF+gexIoaaQb71/6xZGzSye9KUJ3V77rlL+eNkHOdw==",
|
||||||
|
>>>>>>> c493033 (cosas que faltaban)
|
||||||
"success": true,
|
"success": true,
|
||||||
"projectFilePath": "C:\\Users\\fedpo\\source\\repos\\Final_OOP\\Entidades\\Entidades.csproj",
|
"projectFilePath": "C:\\Users\\fedpo\\Downloads\\Final\\Final\\Entidades\\Entidades.csproj",
|
||||||
"expectedPackageFiles": [],
|
"expectedPackageFiles": [],
|
||||||
>>>>>>> 8ad9dc6 (faltan controladoras)
|
>>>>>>> 8ad9dc6 (faltan controladoras)
|
||||||
"logs": []
|
"logs": []
|
||||||
|
|||||||
@@ -4,10 +4,14 @@ namespace Modelo
|
|||||||
{
|
{
|
||||||
public sealed class RepositorioClientes : RepositorioBase<Cliente, RepositorioClientes>
|
public sealed class RepositorioClientes : RepositorioBase<Cliente, RepositorioClientes>
|
||||||
{
|
{
|
||||||
override public bool Add(Cliente t)
|
public override bool Add(Cliente t)
|
||||||
{
|
{
|
||||||
bool ret = false;
|
if (ExistePorCuit(t.Cuit))
|
||||||
|
{
|
||||||
|
throw new InvalidOperationException($"El Cliente con el CUIT {t.Cuit} ya existe.");
|
||||||
|
}
|
||||||
|
|
||||||
|
bool ret = false;
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
almacen.Add(t);
|
almacen.Add(t);
|
||||||
@@ -20,6 +24,11 @@ namespace Modelo
|
|||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
// Método para verificar si el CUIT ya existe
|
||||||
|
public bool ExistePorCuit(long cuit)
|
||||||
|
{
|
||||||
|
return almacen.Any(c => c.Cuit == cuit);
|
||||||
|
}
|
||||||
|
|
||||||
override public bool Mod(Cliente t)
|
override public bool Mod(Cliente t)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -7,22 +7,31 @@ namespace Modelo
|
|||||||
{
|
{
|
||||||
override public bool Add(Factura t)
|
override public bool Add(Factura t)
|
||||||
{
|
{
|
||||||
bool ret = false;
|
if (ExistePorId(t.Id))
|
||||||
|
{
|
||||||
|
throw new InvalidOperationException($"La Factura con el ID {t.Id} ya existe.");
|
||||||
|
}
|
||||||
|
if (t.Cliente == null || t.Cliente.Cuit == 0)
|
||||||
|
{
|
||||||
|
throw new InvalidOperationException("Debe seleccionar un cliente antes de agregar la factura.");
|
||||||
|
}
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
almacen.Add(t);
|
almacen.Add(t);
|
||||||
ret = true;
|
return true;
|
||||||
}
|
}
|
||||||
catch (Exception)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
throw;
|
// Mejor manejo de excepciones, podrías registrar el error
|
||||||
|
throw new Exception("Error al agregar la factura.", ex);
|
||||||
}
|
}
|
||||||
|
|
||||||
return ret;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
override public bool Mod(Factura t)
|
public bool ExistePorId(int id)
|
||||||
|
{
|
||||||
|
return almacen.Any(f => f.Id == id);
|
||||||
|
}
|
||||||
|
override public bool Mod(Factura t)
|
||||||
{
|
{
|
||||||
bool ret = false;
|
bool ret = false;
|
||||||
|
|
||||||
|
|||||||
@@ -6,19 +6,20 @@ namespace Modelo
|
|||||||
{
|
{
|
||||||
override public bool Add(Proveedor t)
|
override public bool Add(Proveedor t)
|
||||||
{
|
{
|
||||||
bool ret = false;
|
if (ExistePorCuit(t.Cuit))
|
||||||
|
{
|
||||||
|
throw new InvalidOperationException($"El Proveedor con el CUIT {t.Cuit} ya existe.");
|
||||||
|
}
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
almacen.Add(t);
|
almacen.Add(t);
|
||||||
ret = true;
|
return true;
|
||||||
}
|
}
|
||||||
catch (Exception)
|
catch (Exception)
|
||||||
{
|
{
|
||||||
throw;
|
throw;
|
||||||
}
|
}
|
||||||
|
|
||||||
return ret;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
override public bool Mod(Proveedor t)
|
override public bool Mod(Proveedor t)
|
||||||
@@ -45,7 +46,7 @@ namespace Modelo
|
|||||||
override public bool Del(Proveedor t)
|
override public bool Del(Proveedor t)
|
||||||
{
|
{
|
||||||
bool ret = false;
|
bool ret = false;
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
var proveedorAEliminar = almacen.Find(x => x.Cuit == t.Cuit);
|
var proveedorAEliminar = almacen.Find(x => x.Cuit == t.Cuit);
|
||||||
@@ -62,5 +63,10 @@ namespace Modelo
|
|||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public bool ExistePorCuit(long cuit)
|
||||||
|
{
|
||||||
|
return almacen.Any(p => p.Cuit == cuit);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -11,6 +11,7 @@ build_property.RootNamespace = Modelo
|
|||||||
<<<<<<< HEAD
|
<<<<<<< HEAD
|
||||||
<<<<<<< HEAD
|
<<<<<<< HEAD
|
||||||
<<<<<<< HEAD
|
<<<<<<< HEAD
|
||||||
|
<<<<<<< HEAD
|
||||||
build_property.ProjectDir = /home/fede/proyectos/Final_OOP/Modelo/
|
build_property.ProjectDir = /home/fede/proyectos/Final_OOP/Modelo/
|
||||||
=======
|
=======
|
||||||
build_property.ProjectDir = C:\Users\Nacho\source\repos\Final\Modelo\
|
build_property.ProjectDir = C:\Users\Nacho\source\repos\Final\Modelo\
|
||||||
@@ -23,3 +24,6 @@ build_property.EnableGeneratedComInterfaceComImportInterop =
|
|||||||
=======
|
=======
|
||||||
build_property.ProjectDir = C:\Users\fedpo\source\repos\Final_OOP\Modelo\
|
build_property.ProjectDir = C:\Users\fedpo\source\repos\Final_OOP\Modelo\
|
||||||
>>>>>>> 51676e6 (feat: Cambios Varios (mirar Desc))
|
>>>>>>> 51676e6 (feat: Cambios Varios (mirar Desc))
|
||||||
|
=======
|
||||||
|
build_property.ProjectDir = C:\Users\fedpo\Downloads\Final\Final\Modelo\
|
||||||
|
>>>>>>> c493033 (cosas que faltaban)
|
||||||
|
|||||||
@@ -3,6 +3,7 @@
|
|||||||
"restore": {
|
"restore": {
|
||||||
<<<<<<< HEAD
|
<<<<<<< HEAD
|
||||||
<<<<<<< HEAD
|
<<<<<<< HEAD
|
||||||
|
<<<<<<< HEAD
|
||||||
<<<<<<< HEAD
|
<<<<<<< HEAD
|
||||||
"/home/fede/proyectos/Final_OOP/Modelo/Modelo.csproj": {}
|
"/home/fede/proyectos/Final_OOP/Modelo/Modelo.csproj": {}
|
||||||
},
|
},
|
||||||
@@ -23,13 +24,17 @@
|
|||||||
=======
|
=======
|
||||||
"C:\\Users\\fedpo\\source\\repos\\Final_OOP\\Modelo\\Modelo.csproj": {}
|
"C:\\Users\\fedpo\\source\\repos\\Final_OOP\\Modelo\\Modelo.csproj": {}
|
||||||
>>>>>>> 51676e6 (feat: Cambios Varios (mirar Desc))
|
>>>>>>> 51676e6 (feat: Cambios Varios (mirar Desc))
|
||||||
|
=======
|
||||||
|
"C:\\Users\\fedpo\\Downloads\\Final\\Final\\Modelo\\Modelo.csproj": {}
|
||||||
|
>>>>>>> c493033 (cosas que faltaban)
|
||||||
},
|
},
|
||||||
"projects": {
|
"projects": {
|
||||||
"C:\\Users\\fedpo\\source\\repos\\Final_OOP\\Entidades\\Entidades.csproj": {
|
"C:\\Users\\fedpo\\Downloads\\Final\\Final\\Entidades\\Entidades.csproj": {
|
||||||
"version": "1.0.0",
|
"version": "1.0.0",
|
||||||
"restore": {
|
"restore": {
|
||||||
"projectUniqueName": "C:\\Users\\fedpo\\source\\repos\\Final_OOP\\Entidades\\Entidades.csproj",
|
"projectUniqueName": "C:\\Users\\fedpo\\Downloads\\Final\\Final\\Entidades\\Entidades.csproj",
|
||||||
"projectName": "Entidades",
|
"projectName": "Entidades",
|
||||||
|
<<<<<<< HEAD
|
||||||
<<<<<<< HEAD
|
<<<<<<< HEAD
|
||||||
"projectPath": "C:\\Users\\Nacho\\Source\\Repos\\Final_OOP\\Entidades\\Entidades.csproj",
|
"projectPath": "C:\\Users\\Nacho\\Source\\Repos\\Final_OOP\\Entidades\\Entidades.csproj",
|
||||||
"packagesPath": "C:\\Users\\Nacho\\.nuget\\packages\\",
|
"packagesPath": "C:\\Users\\Nacho\\.nuget\\packages\\",
|
||||||
@@ -44,8 +49,11 @@
|
|||||||
"/home/fede/.nuget/NuGet/NuGet.Config"
|
"/home/fede/.nuget/NuGet/NuGet.Config"
|
||||||
=======
|
=======
|
||||||
"projectPath": "C:\\Users\\fedpo\\source\\repos\\Final_OOP\\Entidades\\Entidades.csproj",
|
"projectPath": "C:\\Users\\fedpo\\source\\repos\\Final_OOP\\Entidades\\Entidades.csproj",
|
||||||
|
=======
|
||||||
|
"projectPath": "C:\\Users\\fedpo\\Downloads\\Final\\Final\\Entidades\\Entidades.csproj",
|
||||||
|
>>>>>>> c493033 (cosas que faltaban)
|
||||||
"packagesPath": "C:\\Users\\fedpo\\.nuget\\packages\\",
|
"packagesPath": "C:\\Users\\fedpo\\.nuget\\packages\\",
|
||||||
"outputPath": "C:\\Users\\fedpo\\source\\repos\\Final_OOP\\Entidades\\obj\\",
|
"outputPath": "C:\\Users\\fedpo\\Downloads\\Final\\Final\\Entidades\\obj\\",
|
||||||
"projectStyle": "PackageReference",
|
"projectStyle": "PackageReference",
|
||||||
"configFilePaths": [
|
"configFilePaths": [
|
||||||
"C:\\Users\\fedpo\\AppData\\Roaming\\NuGet\\NuGet.Config",
|
"C:\\Users\\fedpo\\AppData\\Roaming\\NuGet\\NuGet.Config",
|
||||||
@@ -129,12 +137,17 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
<<<<<<< HEAD
|
||||||
"C:\\Users\\fedpo\\source\\repos\\Final_OOP\\Modelo\\Modelo.csproj": {
|
"C:\\Users\\fedpo\\source\\repos\\Final_OOP\\Modelo\\Modelo.csproj": {
|
||||||
>>>>>>> 51676e6 (feat: Cambios Varios (mirar Desc))
|
>>>>>>> 51676e6 (feat: Cambios Varios (mirar Desc))
|
||||||
|
=======
|
||||||
|
"C:\\Users\\fedpo\\Downloads\\Final\\Final\\Modelo\\Modelo.csproj": {
|
||||||
|
>>>>>>> c493033 (cosas que faltaban)
|
||||||
"version": "1.0.0",
|
"version": "1.0.0",
|
||||||
"restore": {
|
"restore": {
|
||||||
"projectUniqueName": "C:\\Users\\fedpo\\source\\repos\\Final_OOP\\Modelo\\Modelo.csproj",
|
"projectUniqueName": "C:\\Users\\fedpo\\Downloads\\Final\\Final\\Modelo\\Modelo.csproj",
|
||||||
"projectName": "Modelo",
|
"projectName": "Modelo",
|
||||||
|
<<<<<<< HEAD
|
||||||
<<<<<<< HEAD
|
<<<<<<< HEAD
|
||||||
"projectPath": "C:\\Users\\Nacho\\Source\\Repos\\Final_OOP\\Modelo\\Modelo.csproj",
|
"projectPath": "C:\\Users\\Nacho\\Source\\Repos\\Final_OOP\\Modelo\\Modelo.csproj",
|
||||||
"packagesPath": "C:\\Users\\Nacho\\.nuget\\packages\\",
|
"packagesPath": "C:\\Users\\Nacho\\.nuget\\packages\\",
|
||||||
@@ -149,8 +162,11 @@
|
|||||||
"/home/fede/.nuget/NuGet/NuGet.Config"
|
"/home/fede/.nuget/NuGet/NuGet.Config"
|
||||||
=======
|
=======
|
||||||
"projectPath": "C:\\Users\\fedpo\\source\\repos\\Final_OOP\\Modelo\\Modelo.csproj",
|
"projectPath": "C:\\Users\\fedpo\\source\\repos\\Final_OOP\\Modelo\\Modelo.csproj",
|
||||||
|
=======
|
||||||
|
"projectPath": "C:\\Users\\fedpo\\Downloads\\Final\\Final\\Modelo\\Modelo.csproj",
|
||||||
|
>>>>>>> c493033 (cosas que faltaban)
|
||||||
"packagesPath": "C:\\Users\\fedpo\\.nuget\\packages\\",
|
"packagesPath": "C:\\Users\\fedpo\\.nuget\\packages\\",
|
||||||
"outputPath": "C:\\Users\\fedpo\\source\\repos\\Final_OOP\\Modelo\\obj\\",
|
"outputPath": "C:\\Users\\fedpo\\Downloads\\Final\\Final\\Modelo\\obj\\",
|
||||||
"projectStyle": "PackageReference",
|
"projectStyle": "PackageReference",
|
||||||
"configFilePaths": [
|
"configFilePaths": [
|
||||||
"C:\\Users\\fedpo\\AppData\\Roaming\\NuGet\\NuGet.Config",
|
"C:\\Users\\fedpo\\AppData\\Roaming\\NuGet\\NuGet.Config",
|
||||||
@@ -174,6 +190,7 @@
|
|||||||
"projectReferences": {
|
"projectReferences": {
|
||||||
<<<<<<< HEAD
|
<<<<<<< HEAD
|
||||||
<<<<<<< HEAD
|
<<<<<<< HEAD
|
||||||
|
<<<<<<< HEAD
|
||||||
<<<<<<< HEAD
|
<<<<<<< HEAD
|
||||||
"/home/fede/proyectos/Final_OOP/Entidades/Entidades.csproj": {
|
"/home/fede/proyectos/Final_OOP/Entidades/Entidades.csproj": {
|
||||||
"projectPath": "/home/fede/proyectos/Final_OOP/Entidades/Entidades.csproj"
|
"projectPath": "/home/fede/proyectos/Final_OOP/Entidades/Entidades.csproj"
|
||||||
@@ -189,6 +206,10 @@
|
|||||||
"C:\\Users\\fedpo\\source\\repos\\Final_OOP\\Entidades\\Entidades.csproj": {
|
"C:\\Users\\fedpo\\source\\repos\\Final_OOP\\Entidades\\Entidades.csproj": {
|
||||||
"projectPath": "C:\\Users\\fedpo\\source\\repos\\Final_OOP\\Entidades\\Entidades.csproj"
|
"projectPath": "C:\\Users\\fedpo\\source\\repos\\Final_OOP\\Entidades\\Entidades.csproj"
|
||||||
>>>>>>> 51676e6 (feat: Cambios Varios (mirar Desc))
|
>>>>>>> 51676e6 (feat: Cambios Varios (mirar Desc))
|
||||||
|
=======
|
||||||
|
"C:\\Users\\fedpo\\Downloads\\Final\\Final\\Entidades\\Entidades.csproj": {
|
||||||
|
"projectPath": "C:\\Users\\fedpo\\Downloads\\Final\\Final\\Entidades\\Entidades.csproj"
|
||||||
|
>>>>>>> c493033 (cosas que faltaban)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -38,6 +38,7 @@
|
|||||||
"restore": {
|
"restore": {
|
||||||
<<<<<<< HEAD
|
<<<<<<< HEAD
|
||||||
<<<<<<< HEAD
|
<<<<<<< HEAD
|
||||||
|
<<<<<<< HEAD
|
||||||
<<<<<<< HEAD
|
<<<<<<< HEAD
|
||||||
"projectUniqueName": "/home/fede/proyectos/Final_OOP/Modelo/Modelo.csproj",
|
"projectUniqueName": "/home/fede/proyectos/Final_OOP/Modelo/Modelo.csproj",
|
||||||
"projectName": "Modelo",
|
"projectName": "Modelo",
|
||||||
@@ -63,10 +64,13 @@
|
|||||||
"/home/fede/.nuget/NuGet/NuGet.Config"
|
"/home/fede/.nuget/NuGet/NuGet.Config"
|
||||||
=======
|
=======
|
||||||
"projectUniqueName": "C:\\Users\\fedpo\\source\\repos\\Final_OOP\\Modelo\\Modelo.csproj",
|
"projectUniqueName": "C:\\Users\\fedpo\\source\\repos\\Final_OOP\\Modelo\\Modelo.csproj",
|
||||||
|
=======
|
||||||
|
"projectUniqueName": "C:\\Users\\fedpo\\Downloads\\Final\\Final\\Modelo\\Modelo.csproj",
|
||||||
|
>>>>>>> c493033 (cosas que faltaban)
|
||||||
"projectName": "Modelo",
|
"projectName": "Modelo",
|
||||||
"projectPath": "C:\\Users\\fedpo\\source\\repos\\Final_OOP\\Modelo\\Modelo.csproj",
|
"projectPath": "C:\\Users\\fedpo\\Downloads\\Final\\Final\\Modelo\\Modelo.csproj",
|
||||||
"packagesPath": "C:\\Users\\fedpo\\.nuget\\packages\\",
|
"packagesPath": "C:\\Users\\fedpo\\.nuget\\packages\\",
|
||||||
"outputPath": "C:\\Users\\fedpo\\source\\repos\\Final_OOP\\Modelo\\obj\\",
|
"outputPath": "C:\\Users\\fedpo\\Downloads\\Final\\Final\\Modelo\\obj\\",
|
||||||
"projectStyle": "PackageReference",
|
"projectStyle": "PackageReference",
|
||||||
"configFilePaths": [
|
"configFilePaths": [
|
||||||
"C:\\Users\\fedpo\\AppData\\Roaming\\NuGet\\NuGet.Config",
|
"C:\\Users\\fedpo\\AppData\\Roaming\\NuGet\\NuGet.Config",
|
||||||
@@ -90,6 +94,7 @@
|
|||||||
"projectReferences": {
|
"projectReferences": {
|
||||||
<<<<<<< HEAD
|
<<<<<<< HEAD
|
||||||
<<<<<<< HEAD
|
<<<<<<< HEAD
|
||||||
|
<<<<<<< HEAD
|
||||||
<<<<<<< HEAD
|
<<<<<<< HEAD
|
||||||
"/home/fede/proyectos/Final_OOP/Entidades/Entidades.csproj": {
|
"/home/fede/proyectos/Final_OOP/Entidades/Entidades.csproj": {
|
||||||
"projectPath": "/home/fede/proyectos/Final_OOP/Entidades/Entidades.csproj"
|
"projectPath": "/home/fede/proyectos/Final_OOP/Entidades/Entidades.csproj"
|
||||||
@@ -105,6 +110,10 @@
|
|||||||
"C:\\Users\\fedpo\\source\\repos\\Final_OOP\\Entidades\\Entidades.csproj": {
|
"C:\\Users\\fedpo\\source\\repos\\Final_OOP\\Entidades\\Entidades.csproj": {
|
||||||
"projectPath": "C:\\Users\\fedpo\\source\\repos\\Final_OOP\\Entidades\\Entidades.csproj"
|
"projectPath": "C:\\Users\\fedpo\\source\\repos\\Final_OOP\\Entidades\\Entidades.csproj"
|
||||||
>>>>>>> 51676e6 (feat: Cambios Varios (mirar Desc))
|
>>>>>>> 51676e6 (feat: Cambios Varios (mirar Desc))
|
||||||
|
=======
|
||||||
|
"C:\\Users\\fedpo\\Downloads\\Final\\Final\\Entidades\\Entidades.csproj": {
|
||||||
|
"projectPath": "C:\\Users\\fedpo\\Downloads\\Final\\Final\\Entidades\\Entidades.csproj"
|
||||||
|
>>>>>>> c493033 (cosas que faltaban)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,6 +2,7 @@
|
|||||||
"version": 2,
|
"version": 2,
|
||||||
<<<<<<< HEAD
|
<<<<<<< HEAD
|
||||||
<<<<<<< HEAD
|
<<<<<<< HEAD
|
||||||
|
<<<<<<< HEAD
|
||||||
<<<<<<< HEAD
|
<<<<<<< HEAD
|
||||||
"dgSpecHash": "druJUlWKmOp0ZDp0BX75o9Fs1GyoqoIkTLLMStpqDmZBEy8hoSreNrR/4qjyFeX2PbXxwtpQp0hY2GY2ewsTOQ==",
|
"dgSpecHash": "druJUlWKmOp0ZDp0BX75o9Fs1GyoqoIkTLLMStpqDmZBEy8hoSreNrR/4qjyFeX2PbXxwtpQp0hY2GY2ewsTOQ==",
|
||||||
"success": true,
|
"success": true,
|
||||||
@@ -18,8 +19,11 @@
|
|||||||
=======
|
=======
|
||||||
"dgSpecHash": "Lbp3ldB0Hrw5pXllkp+TBPvDxt/9rPRNHHKZTqTlG4g88ELwAzlQEuFOATRGWgN+sSkhjGassnHFTlqrUfwaQA==",
|
"dgSpecHash": "Lbp3ldB0Hrw5pXllkp+TBPvDxt/9rPRNHHKZTqTlG4g88ELwAzlQEuFOATRGWgN+sSkhjGassnHFTlqrUfwaQA==",
|
||||||
>>>>>>> 51676e6 (feat: Cambios Varios (mirar Desc))
|
>>>>>>> 51676e6 (feat: Cambios Varios (mirar Desc))
|
||||||
|
=======
|
||||||
|
"dgSpecHash": "pw7jedCv+5Z7cgVNhso+oycHNF67O1XyYT4HUnm6ukG4VUtgCv2G8NovbqYT02ZK0eONOKuhRbtsHdtFWeVAnw==",
|
||||||
|
>>>>>>> c493033 (cosas que faltaban)
|
||||||
"success": true,
|
"success": true,
|
||||||
"projectFilePath": "C:\\Users\\fedpo\\source\\repos\\Final_OOP\\Modelo\\Modelo.csproj",
|
"projectFilePath": "C:\\Users\\fedpo\\Downloads\\Final\\Final\\Modelo\\Modelo.csproj",
|
||||||
"expectedPackageFiles": [],
|
"expectedPackageFiles": [],
|
||||||
>>>>>>> 8ad9dc6 (faltan controladoras)
|
>>>>>>> 8ad9dc6 (faltan controladoras)
|
||||||
"logs": []
|
"logs": []
|
||||||
|
|||||||
122
Vista/AddProducto.Designer.cs
generated
Normal file
122
Vista/AddProducto.Designer.cs
generated
Normal file
@@ -0,0 +1,122 @@
|
|||||||
|
namespace Vista
|
||||||
|
{
|
||||||
|
partial class AddProducto
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Required designer variable.
|
||||||
|
/// </summary>
|
||||||
|
private System.ComponentModel.IContainer components = null;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Clean up any resources being used.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||||
|
protected override void Dispose(bool disposing)
|
||||||
|
{
|
||||||
|
if (disposing && (components != null))
|
||||||
|
{
|
||||||
|
components.Dispose();
|
||||||
|
}
|
||||||
|
base.Dispose(disposing);
|
||||||
|
}
|
||||||
|
|
||||||
|
#region Windows Form Designer generated code
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Required method for Designer support - do not modify
|
||||||
|
/// the contents of this method with the code editor.
|
||||||
|
/// </summary>
|
||||||
|
private void InitializeComponent()
|
||||||
|
{
|
||||||
|
comboBox1 = new ComboBox();
|
||||||
|
label1 = new Label();
|
||||||
|
label2 = new Label();
|
||||||
|
numericUpDown1 = new NumericUpDown();
|
||||||
|
button1 = new Button();
|
||||||
|
button2 = new Button();
|
||||||
|
((System.ComponentModel.ISupportInitialize)numericUpDown1).BeginInit();
|
||||||
|
SuspendLayout();
|
||||||
|
//
|
||||||
|
// comboBox1
|
||||||
|
//
|
||||||
|
comboBox1.DropDownStyle = ComboBoxStyle.DropDownList;
|
||||||
|
comboBox1.FormattingEnabled = true;
|
||||||
|
comboBox1.Location = new Point(164, 36);
|
||||||
|
comboBox1.Name = "comboBox1";
|
||||||
|
comboBox1.Size = new Size(121, 23);
|
||||||
|
comboBox1.TabIndex = 0;
|
||||||
|
//
|
||||||
|
// label1
|
||||||
|
//
|
||||||
|
label1.AutoSize = true;
|
||||||
|
label1.Location = new Point(92, 39);
|
||||||
|
label1.Name = "label1";
|
||||||
|
label1.Size = new Size(56, 15);
|
||||||
|
label1.TabIndex = 1;
|
||||||
|
label1.Text = "Producto";
|
||||||
|
//
|
||||||
|
// label2
|
||||||
|
//
|
||||||
|
label2.AutoSize = true;
|
||||||
|
label2.Location = new Point(93, 85);
|
||||||
|
label2.Name = "label2";
|
||||||
|
label2.Size = new Size(55, 15);
|
||||||
|
label2.TabIndex = 2;
|
||||||
|
label2.Text = "Cantidad";
|
||||||
|
//
|
||||||
|
// numericUpDown1
|
||||||
|
//
|
||||||
|
numericUpDown1.Location = new Point(165, 77);
|
||||||
|
numericUpDown1.Maximum = new decimal(new int[] { 10000000, 0, 0, 0 });
|
||||||
|
numericUpDown1.Name = "numericUpDown1";
|
||||||
|
numericUpDown1.Size = new Size(120, 23);
|
||||||
|
numericUpDown1.TabIndex = 3;
|
||||||
|
//
|
||||||
|
// button1
|
||||||
|
//
|
||||||
|
button1.Location = new Point(12, 191);
|
||||||
|
button1.Name = "button1";
|
||||||
|
button1.Size = new Size(85, 42);
|
||||||
|
button1.TabIndex = 4;
|
||||||
|
button1.Text = "Guardar";
|
||||||
|
button1.UseVisualStyleBackColor = true;
|
||||||
|
button1.Click += button1_Click;
|
||||||
|
//
|
||||||
|
// button2
|
||||||
|
//
|
||||||
|
button2.Location = new Point(354, 191);
|
||||||
|
button2.Name = "button2";
|
||||||
|
button2.Size = new Size(85, 42);
|
||||||
|
button2.TabIndex = 5;
|
||||||
|
button2.Text = "Cancelar";
|
||||||
|
button2.UseVisualStyleBackColor = true;
|
||||||
|
button2.Click += button2_Click;
|
||||||
|
//
|
||||||
|
// AddProducto
|
||||||
|
//
|
||||||
|
AutoScaleDimensions = new SizeF(7F, 15F);
|
||||||
|
AutoScaleMode = AutoScaleMode.Font;
|
||||||
|
ClientSize = new Size(451, 245);
|
||||||
|
Controls.Add(button2);
|
||||||
|
Controls.Add(button1);
|
||||||
|
Controls.Add(numericUpDown1);
|
||||||
|
Controls.Add(label2);
|
||||||
|
Controls.Add(label1);
|
||||||
|
Controls.Add(comboBox1);
|
||||||
|
Name = "AddProducto";
|
||||||
|
Text = "Form1";
|
||||||
|
((System.ComponentModel.ISupportInitialize)numericUpDown1).EndInit();
|
||||||
|
ResumeLayout(false);
|
||||||
|
PerformLayout();
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
private ComboBox comboBox1;
|
||||||
|
private Label label1;
|
||||||
|
private Label label2;
|
||||||
|
private NumericUpDown numericUpDown1;
|
||||||
|
private Button button1;
|
||||||
|
private Button button2;
|
||||||
|
}
|
||||||
|
}
|
||||||
30
Vista/AddProducto.cs
Normal file
30
Vista/AddProducto.cs
Normal file
@@ -0,0 +1,30 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.ComponentModel;
|
||||||
|
using System.Data;
|
||||||
|
using System.Drawing;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using System.Windows.Forms;
|
||||||
|
|
||||||
|
namespace Vista
|
||||||
|
{
|
||||||
|
public partial class AddProducto : Form
|
||||||
|
{
|
||||||
|
public AddProducto()
|
||||||
|
{
|
||||||
|
InitializeComponent();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void button1_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
Close();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void button2_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
Close();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
120
Vista/AddProducto.resx
Normal file
120
Vista/AddProducto.resx
Normal file
@@ -0,0 +1,120 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<root>
|
||||||
|
<!--
|
||||||
|
Microsoft ResX Schema
|
||||||
|
|
||||||
|
Version 2.0
|
||||||
|
|
||||||
|
The primary goals of this format is to allow a simple XML format
|
||||||
|
that is mostly human readable. The generation and parsing of the
|
||||||
|
various data types are done through the TypeConverter classes
|
||||||
|
associated with the data types.
|
||||||
|
|
||||||
|
Example:
|
||||||
|
|
||||||
|
... ado.net/XML headers & schema ...
|
||||||
|
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||||
|
<resheader name="version">2.0</resheader>
|
||||||
|
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||||
|
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||||
|
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||||
|
<data name="Color1" type="System.Drawing.Color, System.Drawing"">Blue</data>
|
||||||
|
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||||
|
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||||
|
</data>
|
||||||
|
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||||
|
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||||
|
<comment>This is a comment</comment>
|
||||||
|
</data>
|
||||||
|
|
||||||
|
There are any number of "resheader" rows that contain simple
|
||||||
|
name/value pairs.
|
||||||
|
|
||||||
|
Each data row contains a name, and value. The row also contains a
|
||||||
|
type or mimetype. Type corresponds to a .NET class that support
|
||||||
|
text/value conversion through the TypeConverter architecture.
|
||||||
|
Classes that don't support this are serialized and stored with the
|
||||||
|
mimetype set.
|
||||||
|
|
||||||
|
The mimetype is used for serialized objects, and tells the
|
||||||
|
ResXResourceReader how to depersist the object. This is currently not
|
||||||
|
extensible. For a given mimetype the value must be set accordingly:
|
||||||
|
|
||||||
|
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||||
|
that the ResXResourceWriter will generate, however the reader can
|
||||||
|
read any of the formats listed below.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.binary.base64
|
||||||
|
value : The object must be serialized with
|
||||||
|
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.soap.base64
|
||||||
|
value : The object must be serialized with
|
||||||
|
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||||
|
value : The object must be serialized into a byte array
|
||||||
|
: using a System.ComponentModel.TypeConverter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
-->
|
||||||
|
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||||
|
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||||
|
<xsd:element name="root" msdata:IsDataSet="true">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:choice maxOccurs="unbounded">
|
||||||
|
<xsd:element name="metadata">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||||
|
<xsd:attribute name="type" type="xsd:string" />
|
||||||
|
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||||
|
<xsd:attribute ref="xml:space" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="assembly">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:attribute name="alias" type="xsd:string" />
|
||||||
|
<xsd:attribute name="name" type="xsd:string" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="data">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||||
|
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||||
|
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||||
|
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||||
|
<xsd:attribute ref="xml:space" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="resheader">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
</xsd:choice>
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
</xsd:schema>
|
||||||
|
<resheader name="resmimetype">
|
||||||
|
<value>text/microsoft-resx</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="version">
|
||||||
|
<value>2.0</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="reader">
|
||||||
|
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="writer">
|
||||||
|
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
|
</resheader>
|
||||||
|
</root>
|
||||||
119
Vista/CategoriaCreate.Designer.cs
generated
Normal file
119
Vista/CategoriaCreate.Designer.cs
generated
Normal file
@@ -0,0 +1,119 @@
|
|||||||
|
namespace Vista
|
||||||
|
{
|
||||||
|
partial class CategoriaCreate
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Required designer variable.
|
||||||
|
/// </summary>
|
||||||
|
private System.ComponentModel.IContainer components = null;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Clean up any resources being used.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||||
|
protected override void Dispose(bool disposing)
|
||||||
|
{
|
||||||
|
if (disposing && (components != null))
|
||||||
|
{
|
||||||
|
components.Dispose();
|
||||||
|
}
|
||||||
|
base.Dispose(disposing);
|
||||||
|
}
|
||||||
|
|
||||||
|
#region Windows Form Designer generated code
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Required method for Designer support - do not modify
|
||||||
|
/// the contents of this method with the code editor.
|
||||||
|
/// </summary>
|
||||||
|
private void InitializeComponent()
|
||||||
|
{
|
||||||
|
button2 = new Button();
|
||||||
|
label1 = new Label();
|
||||||
|
label2 = new Label();
|
||||||
|
numericUpDown1 = new NumericUpDown();
|
||||||
|
textBox1 = new TextBox();
|
||||||
|
button1 = new Button();
|
||||||
|
((System.ComponentModel.ISupportInitialize)numericUpDown1).BeginInit();
|
||||||
|
SuspendLayout();
|
||||||
|
//
|
||||||
|
// button2
|
||||||
|
//
|
||||||
|
button2.Location = new Point(146, 166);
|
||||||
|
button2.Name = "button2";
|
||||||
|
button2.Size = new Size(75, 23);
|
||||||
|
button2.TabIndex = 1;
|
||||||
|
button2.Text = "Cancelar";
|
||||||
|
button2.UseVisualStyleBackColor = true;
|
||||||
|
button2.Click += button2_Click;
|
||||||
|
//
|
||||||
|
// label1
|
||||||
|
//
|
||||||
|
label1.AutoSize = true;
|
||||||
|
label1.Location = new Point(12, 31);
|
||||||
|
label1.Name = "label1";
|
||||||
|
label1.Size = new Size(18, 15);
|
||||||
|
label1.TabIndex = 2;
|
||||||
|
label1.Text = "ID";
|
||||||
|
//
|
||||||
|
// label2
|
||||||
|
//
|
||||||
|
label2.AutoSize = true;
|
||||||
|
label2.Location = new Point(12, 67);
|
||||||
|
label2.Name = "label2";
|
||||||
|
label2.Size = new Size(69, 15);
|
||||||
|
label2.TabIndex = 3;
|
||||||
|
label2.Text = "Descripcion";
|
||||||
|
//
|
||||||
|
// numericUpDown1
|
||||||
|
//
|
||||||
|
numericUpDown1.Location = new Point(101, 23);
|
||||||
|
numericUpDown1.Maximum = new decimal(new int[] { 1215752191, 23, 0, 0 });
|
||||||
|
numericUpDown1.Name = "numericUpDown1";
|
||||||
|
numericUpDown1.Size = new Size(120, 23);
|
||||||
|
numericUpDown1.TabIndex = 4;
|
||||||
|
//
|
||||||
|
// textBox1
|
||||||
|
//
|
||||||
|
textBox1.Location = new Point(101, 59);
|
||||||
|
textBox1.Name = "textBox1";
|
||||||
|
textBox1.Size = new Size(120, 23);
|
||||||
|
textBox1.TabIndex = 5;
|
||||||
|
//
|
||||||
|
// button1
|
||||||
|
//
|
||||||
|
button1.Location = new Point(32, 166);
|
||||||
|
button1.Name = "button1";
|
||||||
|
button1.Size = new Size(75, 23);
|
||||||
|
button1.TabIndex = 6;
|
||||||
|
button1.Text = "Aceptar";
|
||||||
|
button1.UseVisualStyleBackColor = true;
|
||||||
|
button1.Click += button1_Click;
|
||||||
|
//
|
||||||
|
// CategoriaCreate
|
||||||
|
//
|
||||||
|
AutoScaleDimensions = new SizeF(7F, 15F);
|
||||||
|
AutoScaleMode = AutoScaleMode.Font;
|
||||||
|
ClientSize = new Size(517, 235);
|
||||||
|
Controls.Add(button1);
|
||||||
|
Controls.Add(textBox1);
|
||||||
|
Controls.Add(numericUpDown1);
|
||||||
|
Controls.Add(label2);
|
||||||
|
Controls.Add(label1);
|
||||||
|
Controls.Add(button2);
|
||||||
|
Name = "CategoriaCreate";
|
||||||
|
Text = "Form1";
|
||||||
|
((System.ComponentModel.ISupportInitialize)numericUpDown1).EndInit();
|
||||||
|
ResumeLayout(false);
|
||||||
|
PerformLayout();
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
private Button button2;
|
||||||
|
private Label label1;
|
||||||
|
private Label label2;
|
||||||
|
private NumericUpDown numericUpDown1;
|
||||||
|
private TextBox textBox1;
|
||||||
|
private Button button1;
|
||||||
|
}
|
||||||
|
}
|
||||||
92
Vista/CategoriaCreate.cs
Normal file
92
Vista/CategoriaCreate.cs
Normal file
@@ -0,0 +1,92 @@
|
|||||||
|
using Controladora;
|
||||||
|
using Entidades;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.ComponentModel;
|
||||||
|
using System.Data;
|
||||||
|
using System.Drawing;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using System.Windows.Forms;
|
||||||
|
|
||||||
|
namespace Vista
|
||||||
|
{
|
||||||
|
public partial class CategoriaCreate : Form
|
||||||
|
{
|
||||||
|
private Categoria? categoria;
|
||||||
|
public CategoriaCreate()
|
||||||
|
{
|
||||||
|
InitializeComponent();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void button2_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
this.Close();
|
||||||
|
|
||||||
|
}
|
||||||
|
private void CargarDatos()
|
||||||
|
{
|
||||||
|
if (categoria != null)
|
||||||
|
{
|
||||||
|
textBox1.Text = categoria.Descripcion;
|
||||||
|
numericUpDown1.Value = categoria.Id;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private bool ValidarDatos()
|
||||||
|
{
|
||||||
|
string devolucion = "";
|
||||||
|
|
||||||
|
if (string.IsNullOrEmpty(textBox1.Text))
|
||||||
|
devolucion += "La descripción no puede ser nula o vacía\n";
|
||||||
|
else if (textBox1.Text.Length > 100) // Ajusta el límite según sea necesario
|
||||||
|
devolucion += "La descripción no puede superar los 100 caracteres\n";
|
||||||
|
|
||||||
|
// Validar unicidad del ID solo si es una nueva categoría
|
||||||
|
if (categoria == null && ControladoraCategorias.Instance.Listar().Any(c => c.Id == (int)numericUpDown1.Value))
|
||||||
|
{
|
||||||
|
devolucion += "Ya existe una categoría con el mismo ID\n";
|
||||||
|
}
|
||||||
|
|
||||||
|
if (devolucion == "")
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
MessageBox.Show(devolucion);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
private void button1_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
string msg;
|
||||||
|
if (ValidarDatos())
|
||||||
|
{
|
||||||
|
if (categoria == null)
|
||||||
|
{
|
||||||
|
categoria = new Categoria
|
||||||
|
{
|
||||||
|
Id = (int)numericUpDown1.Value,
|
||||||
|
Descripcion = textBox1.Text
|
||||||
|
};
|
||||||
|
|
||||||
|
msg = ControladoraCategorias.Instance.Añadir(categoria);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
categoria.Descripcion = textBox1.Text;
|
||||||
|
categoria.Id = (int)numericUpDown1.Value; // Solo si quieres permitir modificaciones del ID
|
||||||
|
|
||||||
|
msg = ControladoraCategorias.Instance.Modificar(categoria);
|
||||||
|
}
|
||||||
|
MessageBox.Show(msg, "Información", MessageBoxButtons.OK, MessageBoxIcon.Information);
|
||||||
|
Close();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
120
Vista/CategoriaCreate.resx
Normal file
120
Vista/CategoriaCreate.resx
Normal file
@@ -0,0 +1,120 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<root>
|
||||||
|
<!--
|
||||||
|
Microsoft ResX Schema
|
||||||
|
|
||||||
|
Version 2.0
|
||||||
|
|
||||||
|
The primary goals of this format is to allow a simple XML format
|
||||||
|
that is mostly human readable. The generation and parsing of the
|
||||||
|
various data types are done through the TypeConverter classes
|
||||||
|
associated with the data types.
|
||||||
|
|
||||||
|
Example:
|
||||||
|
|
||||||
|
... ado.net/XML headers & schema ...
|
||||||
|
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||||
|
<resheader name="version">2.0</resheader>
|
||||||
|
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||||
|
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||||
|
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||||
|
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||||
|
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||||
|
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||||
|
</data>
|
||||||
|
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||||
|
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||||
|
<comment>This is a comment</comment>
|
||||||
|
</data>
|
||||||
|
|
||||||
|
There are any number of "resheader" rows that contain simple
|
||||||
|
name/value pairs.
|
||||||
|
|
||||||
|
Each data row contains a name, and value. The row also contains a
|
||||||
|
type or mimetype. Type corresponds to a .NET class that support
|
||||||
|
text/value conversion through the TypeConverter architecture.
|
||||||
|
Classes that don't support this are serialized and stored with the
|
||||||
|
mimetype set.
|
||||||
|
|
||||||
|
The mimetype is used for serialized objects, and tells the
|
||||||
|
ResXResourceReader how to depersist the object. This is currently not
|
||||||
|
extensible. For a given mimetype the value must be set accordingly:
|
||||||
|
|
||||||
|
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||||
|
that the ResXResourceWriter will generate, however the reader can
|
||||||
|
read any of the formats listed below.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.binary.base64
|
||||||
|
value : The object must be serialized with
|
||||||
|
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.soap.base64
|
||||||
|
value : The object must be serialized with
|
||||||
|
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||||
|
value : The object must be serialized into a byte array
|
||||||
|
: using a System.ComponentModel.TypeConverter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
-->
|
||||||
|
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||||
|
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||||
|
<xsd:element name="root" msdata:IsDataSet="true">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:choice maxOccurs="unbounded">
|
||||||
|
<xsd:element name="metadata">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||||
|
<xsd:attribute name="type" type="xsd:string" />
|
||||||
|
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||||
|
<xsd:attribute ref="xml:space" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="assembly">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:attribute name="alias" type="xsd:string" />
|
||||||
|
<xsd:attribute name="name" type="xsd:string" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="data">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||||
|
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||||
|
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||||
|
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||||
|
<xsd:attribute ref="xml:space" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="resheader">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
</xsd:choice>
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
</xsd:schema>
|
||||||
|
<resheader name="resmimetype">
|
||||||
|
<value>text/microsoft-resx</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="version">
|
||||||
|
<value>2.0</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="reader">
|
||||||
|
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="writer">
|
||||||
|
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
|
</resheader>
|
||||||
|
</root>
|
||||||
1
Vista/FrmCliente.Designer.cs
generated
1
Vista/FrmCliente.Designer.cs
generated
@@ -144,6 +144,7 @@ namespace Vista
|
|||||||
numCuit.Name = "numCuit";
|
numCuit.Name = "numCuit";
|
||||||
numCuit.Size = new Size(173, 23);
|
numCuit.Size = new Size(173, 23);
|
||||||
numCuit.TabIndex = 12;
|
numCuit.TabIndex = 12;
|
||||||
|
numCuit.ValueChanged += numCuit_ValueChanged;
|
||||||
//
|
//
|
||||||
// FrmCliente
|
// FrmCliente
|
||||||
//
|
//
|
||||||
|
|||||||
@@ -49,6 +49,11 @@ namespace Vista
|
|||||||
if (txtNombre.Text.Length > 50) devolucion += "El nombre no puede superar los 50 chars\n";
|
if (txtNombre.Text.Length > 50) devolucion += "El nombre no puede superar los 50 chars\n";
|
||||||
if (string.IsNullOrEmpty(txtApellido.Text)) devolucion += "El Apellido no puede ser nulo o vacio\n";
|
if (string.IsNullOrEmpty(txtApellido.Text)) devolucion += "El Apellido no puede ser nulo o vacio\n";
|
||||||
if (string.IsNullOrEmpty(txtCorreo.Text)) devolucion += "El Correo no puede ser nulo o vacio\n";
|
if (string.IsNullOrEmpty(txtCorreo.Text)) devolucion += "El Correo no puede ser nulo o vacio\n";
|
||||||
|
else if (!txtCorreo.Text.Contains("@"))
|
||||||
|
{
|
||||||
|
devolucion += "El correo debe contener '@'\n";
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
if (devolucion == "")
|
if (devolucion == "")
|
||||||
{
|
{
|
||||||
@@ -99,6 +104,11 @@ namespace Vista
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
private void numCuit_ValueChanged(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -18,7 +18,7 @@
|
|||||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||||
<data name="Color1" type="System.Drawing.Color, System.Drawing"">Blue</data>
|
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||||
</data>
|
</data>
|
||||||
|
|||||||
3
Vista/FrmClientes.Designer.cs
generated
3
Vista/FrmClientes.Designer.cs
generated
@@ -83,6 +83,7 @@
|
|||||||
//
|
//
|
||||||
dataGridView1.AllowUserToAddRows = false;
|
dataGridView1.AllowUserToAddRows = false;
|
||||||
dataGridView1.AllowUserToDeleteRows = false;
|
dataGridView1.AllowUserToDeleteRows = false;
|
||||||
|
dataGridView1.AutoSizeColumnsMode = DataGridViewAutoSizeColumnsMode.Fill;
|
||||||
dataGridView1.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.AutoSize;
|
dataGridView1.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.AutoSize;
|
||||||
dataGridView1.Location = new Point(6, 22);
|
dataGridView1.Location = new Point(6, 22);
|
||||||
dataGridView1.MultiSelect = false;
|
dataGridView1.MultiSelect = false;
|
||||||
@@ -90,7 +91,7 @@
|
|||||||
dataGridView1.ReadOnly = true;
|
dataGridView1.ReadOnly = true;
|
||||||
dataGridView1.RowTemplate.Height = 25;
|
dataGridView1.RowTemplate.Height = 25;
|
||||||
dataGridView1.SelectionMode = DataGridViewSelectionMode.FullRowSelect;
|
dataGridView1.SelectionMode = DataGridViewSelectionMode.FullRowSelect;
|
||||||
dataGridView1.Size = new Size(550, 235);
|
dataGridView1.Size = new Size(737, 235);
|
||||||
dataGridView1.TabIndex = 3;
|
dataGridView1.TabIndex = 3;
|
||||||
//
|
//
|
||||||
// FrmClientes
|
// FrmClientes
|
||||||
|
|||||||
@@ -62,5 +62,7 @@ namespace Vista
|
|||||||
ActualizarGrilla();
|
ActualizarGrilla();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -18,7 +18,7 @@
|
|||||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||||
<data name="Color1" type="System.Drawing.Color, System.Drawing"">Blue</data>
|
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||||
</data>
|
</data>
|
||||||
|
|||||||
131
Vista/FrmFactura.Designer.cs
generated
131
Vista/FrmFactura.Designer.cs
generated
@@ -28,19 +28,142 @@
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
private void InitializeComponent()
|
private void InitializeComponent()
|
||||||
{
|
{
|
||||||
|
button1 = new Button();
|
||||||
|
button2 = new Button();
|
||||||
|
numericUpDown1 = new NumericUpDown();
|
||||||
|
label1 = new Label();
|
||||||
|
numericUpDown2 = new NumericUpDown();
|
||||||
|
label2 = new Label();
|
||||||
|
dateTimePicker1 = new DateTimePicker();
|
||||||
|
label3 = new Label();
|
||||||
|
label4 = new Label();
|
||||||
|
comboBox1 = new ComboBox();
|
||||||
|
((System.ComponentModel.ISupportInitialize)numericUpDown1).BeginInit();
|
||||||
|
((System.ComponentModel.ISupportInitialize)numericUpDown2).BeginInit();
|
||||||
SuspendLayout();
|
SuspendLayout();
|
||||||
//
|
//
|
||||||
// FrmAddVentas
|
// button1
|
||||||
|
//
|
||||||
|
button1.Location = new Point(12, 213);
|
||||||
|
button1.Name = "button1";
|
||||||
|
button1.Size = new Size(75, 23);
|
||||||
|
button1.TabIndex = 0;
|
||||||
|
button1.Text = "Aceptar";
|
||||||
|
button1.UseVisualStyleBackColor = true;
|
||||||
|
button1.Click += button1_Click;
|
||||||
|
//
|
||||||
|
// button2
|
||||||
|
//
|
||||||
|
button2.Location = new Point(123, 213);
|
||||||
|
button2.Name = "button2";
|
||||||
|
button2.Size = new Size(75, 23);
|
||||||
|
button2.TabIndex = 1;
|
||||||
|
button2.Text = "Cancelar";
|
||||||
|
button2.UseVisualStyleBackColor = true;
|
||||||
|
button2.Click += button2_Click;
|
||||||
|
//
|
||||||
|
// numericUpDown1
|
||||||
|
//
|
||||||
|
numericUpDown1.Location = new Point(97, 26);
|
||||||
|
numericUpDown1.Maximum = new decimal(new int[] { 1215752191, 23, 0, 0 });
|
||||||
|
numericUpDown1.Name = "numericUpDown1";
|
||||||
|
numericUpDown1.Size = new Size(120, 23);
|
||||||
|
numericUpDown1.TabIndex = 2;
|
||||||
|
//
|
||||||
|
// label1
|
||||||
|
//
|
||||||
|
label1.AutoSize = true;
|
||||||
|
label1.Location = new Point(69, 34);
|
||||||
|
label1.Name = "label1";
|
||||||
|
label1.Size = new Size(18, 15);
|
||||||
|
label1.TabIndex = 3;
|
||||||
|
label1.Text = "ID";
|
||||||
|
//
|
||||||
|
// numericUpDown2
|
||||||
|
//
|
||||||
|
numericUpDown2.Location = new Point(97, 57);
|
||||||
|
numericUpDown2.Maximum = new decimal(new int[] { 1215752191, 23, 0, 0 });
|
||||||
|
numericUpDown2.Name = "numericUpDown2";
|
||||||
|
numericUpDown2.Size = new Size(120, 23);
|
||||||
|
numericUpDown2.TabIndex = 4;
|
||||||
|
//
|
||||||
|
// label2
|
||||||
|
//
|
||||||
|
label2.AutoSize = true;
|
||||||
|
label2.Location = new Point(59, 65);
|
||||||
|
label2.Name = "label2";
|
||||||
|
label2.Size = new Size(32, 15);
|
||||||
|
label2.TabIndex = 5;
|
||||||
|
label2.Text = "Total";
|
||||||
|
//
|
||||||
|
// dateTimePicker1
|
||||||
|
//
|
||||||
|
dateTimePicker1.Location = new Point(97, 88);
|
||||||
|
dateTimePicker1.Name = "dateTimePicker1";
|
||||||
|
dateTimePicker1.Size = new Size(120, 23);
|
||||||
|
dateTimePicker1.TabIndex = 6;
|
||||||
|
//
|
||||||
|
// label3
|
||||||
|
//
|
||||||
|
label3.AutoSize = true;
|
||||||
|
label3.Location = new Point(49, 94);
|
||||||
|
label3.Name = "label3";
|
||||||
|
label3.Size = new Size(38, 15);
|
||||||
|
label3.TabIndex = 7;
|
||||||
|
label3.Text = "Fecha";
|
||||||
|
//
|
||||||
|
// label4
|
||||||
|
//
|
||||||
|
label4.AutoSize = true;
|
||||||
|
label4.Location = new Point(49, 124);
|
||||||
|
label4.Name = "label4";
|
||||||
|
label4.Size = new Size(44, 15);
|
||||||
|
label4.TabIndex = 8;
|
||||||
|
label4.Text = "Cliente";
|
||||||
|
//
|
||||||
|
// comboBox1
|
||||||
|
//
|
||||||
|
comboBox1.DropDownStyle = ComboBoxStyle.DropDownList;
|
||||||
|
comboBox1.FormattingEnabled = true;
|
||||||
|
comboBox1.Location = new Point(99, 121);
|
||||||
|
comboBox1.Name = "comboBox1";
|
||||||
|
comboBox1.Size = new Size(121, 23);
|
||||||
|
comboBox1.TabIndex = 10;
|
||||||
|
//
|
||||||
|
// FrmFactura
|
||||||
//
|
//
|
||||||
AutoScaleDimensions = new SizeF(7F, 15F);
|
AutoScaleDimensions = new SizeF(7F, 15F);
|
||||||
AutoScaleMode = AutoScaleMode.Font;
|
AutoScaleMode = AutoScaleMode.Font;
|
||||||
ClientSize = new Size(495, 229);
|
ClientSize = new Size(458, 265);
|
||||||
Name = "FrmAddVentas";
|
Controls.Add(comboBox1);
|
||||||
|
Controls.Add(label4);
|
||||||
|
Controls.Add(label3);
|
||||||
|
Controls.Add(dateTimePicker1);
|
||||||
|
Controls.Add(label2);
|
||||||
|
Controls.Add(numericUpDown2);
|
||||||
|
Controls.Add(label1);
|
||||||
|
Controls.Add(numericUpDown1);
|
||||||
|
Controls.Add(button2);
|
||||||
|
Controls.Add(button1);
|
||||||
|
Name = "FrmFactura";
|
||||||
Text = "Form1";
|
Text = "Form1";
|
||||||
|
((System.ComponentModel.ISupportInitialize)numericUpDown1).EndInit();
|
||||||
|
((System.ComponentModel.ISupportInitialize)numericUpDown2).EndInit();
|
||||||
ResumeLayout(false);
|
ResumeLayout(false);
|
||||||
|
PerformLayout();
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
private Button button1;
|
||||||
|
private Button button2;
|
||||||
|
private NumericUpDown numericUpDown1;
|
||||||
|
private Label label1;
|
||||||
|
private NumericUpDown numericUpDown2;
|
||||||
|
private Label label2;
|
||||||
|
private DateTimePicker dateTimePicker1;
|
||||||
|
private Label label3;
|
||||||
|
private Label label4;
|
||||||
|
private ComboBox comboBox1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1,5 +1,9 @@
|
|||||||
using System;
|
using Controladora;
|
||||||
|
using Entidades;
|
||||||
|
using Modelo;
|
||||||
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using System.Collections.ObjectModel;
|
||||||
using System.ComponentModel;
|
using System.ComponentModel;
|
||||||
using System.Data;
|
using System.Data;
|
||||||
using System.Drawing;
|
using System.Drawing;
|
||||||
@@ -12,9 +16,136 @@ namespace Vista
|
|||||||
{
|
{
|
||||||
public partial class FrmFactura : Form
|
public partial class FrmFactura : Form
|
||||||
{
|
{
|
||||||
public FrmFactura()
|
private Cliente clienteSeleccionado;
|
||||||
|
Factura factura;
|
||||||
|
public FrmFactura(Factura? factura = null)
|
||||||
{
|
{
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
|
CargarClientes();
|
||||||
|
comboBox1.SelectedIndexChanged += comboBox1_SelectedIndexChanged;
|
||||||
|
// Para el primer control NumericUpDown
|
||||||
|
numericUpDown1.Maximum = int.MaxValue; // Esto permitirá IDs muy grandes
|
||||||
|
|
||||||
|
// Para el segundo control NumericUpDown
|
||||||
|
numericUpDown2.Maximum = decimal.MaxValue; // Esto permitirá totales muy grandes
|
||||||
|
|
||||||
|
|
||||||
|
if (factura != null)
|
||||||
|
{
|
||||||
|
this.factura = factura;
|
||||||
|
this.Text = "Modificar Factura";
|
||||||
|
CargarDatos();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
this.Text = "Agregar Factura";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void CargarClientes()
|
||||||
|
{
|
||||||
|
// Obtener la lista de clientes desde el repositorio
|
||||||
|
ReadOnlyCollection<Cliente> clientes = RepositorioClientes.Instance.Listar();
|
||||||
|
|
||||||
|
// Asignar la lista de clientes como origen de datos para el ComboBox
|
||||||
|
comboBox1.DataSource = clientes;
|
||||||
|
|
||||||
|
// Establecer la propiedad para mostrar el nombre del cliente en el ComboBox
|
||||||
|
comboBox1.DisplayMember = "NombreCompleto";
|
||||||
|
}
|
||||||
|
|
||||||
|
private void comboBox1_SelectedIndexChanged(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
clienteSeleccionado = (Cliente)comboBox1.SelectedItem;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
private void CargarDatos()
|
||||||
|
{
|
||||||
|
numericUpDown1.Value = factura.Id;
|
||||||
|
numericUpDown2.Value = (decimal)factura.Total;
|
||||||
|
dateTimePicker1.Value = factura.Fecha;
|
||||||
|
|
||||||
|
// Asignar el cliente seleccionado en el ComboBox
|
||||||
|
if (factura.Cliente != null)
|
||||||
|
{
|
||||||
|
comboBox1.SelectedItem = factura.Cliente;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
private bool ValidarDatos()
|
||||||
|
{
|
||||||
|
string devolucion = "";
|
||||||
|
|
||||||
|
if (string.IsNullOrEmpty(numericUpDown1.Text)) devolucion += "El ID no puede ser nulo o vacío\n";
|
||||||
|
if (numericUpDown2.Value <= 0) devolucion += "El total debe ser mayor que cero\n";
|
||||||
|
if (clienteSeleccionado == null) devolucion += "Debe seleccionar un cliente\n";
|
||||||
|
|
||||||
|
if (devolucion == "")
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
MessageBox.Show(devolucion, "Errores de Validación", MessageBoxButtons.OK, MessageBoxIcon.Warning);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
private void button1_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
if (ValidarDatos())
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
if (factura == null)
|
||||||
|
{
|
||||||
|
// Crear una nueva factura con los datos proporcionados
|
||||||
|
factura = new Factura
|
||||||
|
{
|
||||||
|
Id = (int)numericUpDown1.Value,
|
||||||
|
Total = (double)numericUpDown2.Value,
|
||||||
|
Fecha = dateTimePicker1.Value,
|
||||||
|
Cliente = (Cliente)comboBox1.SelectedItem,
|
||||||
|
};
|
||||||
|
// Agregar la factura a la colección
|
||||||
|
ControladoraFacturas.Instance.Añadir(factura);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// Actualizar los datos de la factura existente
|
||||||
|
factura.Id = (int)numericUpDown1.Value;
|
||||||
|
factura.Total = (double)numericUpDown2.Value;
|
||||||
|
factura.Fecha = dateTimePicker1.Value;
|
||||||
|
factura.Cliente = (Cliente)comboBox1.SelectedItem;
|
||||||
|
// Modificar la factura en la colección
|
||||||
|
ControladoraFacturas.Instance.Modificar(factura);
|
||||||
|
}
|
||||||
|
MessageBox.Show("Operación realizada con éxito", "Información", MessageBoxButtons.OK, MessageBoxIcon.Information);
|
||||||
|
Close();
|
||||||
|
}
|
||||||
|
catch (InvalidOperationException ex)
|
||||||
|
{
|
||||||
|
MessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
// Captura cualquier otra excepción que pueda ocurrir
|
||||||
|
MessageBox.Show("Ocurrió un error inesperado: " + ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
private void button2_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
this.Close();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
8
Vista/FrmFacturas.Designer.cs
generated
8
Vista/FrmFacturas.Designer.cs
generated
@@ -47,12 +47,14 @@
|
|||||||
//
|
//
|
||||||
// dataGridView1
|
// dataGridView1
|
||||||
//
|
//
|
||||||
|
dataGridView1.AutoSizeColumnsMode = DataGridViewAutoSizeColumnsMode.Fill;
|
||||||
dataGridView1.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.AutoSize;
|
dataGridView1.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.AutoSize;
|
||||||
dataGridView1.Location = new Point(6, 22);
|
dataGridView1.Location = new Point(6, 22);
|
||||||
dataGridView1.Name = "dataGridView1";
|
dataGridView1.Name = "dataGridView1";
|
||||||
dataGridView1.RowTemplate.Height = 25;
|
dataGridView1.RowTemplate.Height = 25;
|
||||||
dataGridView1.Size = new Size(550, 235);
|
dataGridView1.Size = new Size(594, 235);
|
||||||
dataGridView1.TabIndex = 3;
|
dataGridView1.TabIndex = 3;
|
||||||
|
dataGridView1.CellBorderStyleChanged += dataGridView1_CellBorderStyleChanged;
|
||||||
//
|
//
|
||||||
// BtnAdd
|
// BtnAdd
|
||||||
//
|
//
|
||||||
@@ -64,13 +66,13 @@
|
|||||||
BtnAdd.UseVisualStyleBackColor = true;
|
BtnAdd.UseVisualStyleBackColor = true;
|
||||||
BtnAdd.Click += BtnAdd_Click;
|
BtnAdd.Click += BtnAdd_Click;
|
||||||
//
|
//
|
||||||
// FrmVentas
|
// FrmFacturas
|
||||||
//
|
//
|
||||||
AutoScaleDimensions = new SizeF(7F, 15F);
|
AutoScaleDimensions = new SizeF(7F, 15F);
|
||||||
AutoScaleMode = AutoScaleMode.Font;
|
AutoScaleMode = AutoScaleMode.Font;
|
||||||
ClientSize = new Size(800, 450);
|
ClientSize = new Size(800, 450);
|
||||||
Controls.Add(groupBox1);
|
Controls.Add(groupBox1);
|
||||||
Name = "FrmVentas";
|
Name = "FrmFacturas";
|
||||||
Text = "Ventas";
|
Text = "Ventas";
|
||||||
WindowState = FormWindowState.Maximized;
|
WindowState = FormWindowState.Maximized;
|
||||||
groupBox1.ResumeLayout(false);
|
groupBox1.ResumeLayout(false);
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ namespace Vista
|
|||||||
{
|
{
|
||||||
public partial class FrmFacturas : Form
|
public partial class FrmFacturas : Form
|
||||||
{
|
{
|
||||||
|
|
||||||
public FrmFacturas()
|
public FrmFacturas()
|
||||||
{
|
{
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
@@ -20,5 +21,10 @@ namespace Vista
|
|||||||
form.ShowDialog();
|
form.ShowDialog();
|
||||||
ActualizarGrilla();
|
ActualizarGrilla();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void dataGridView1_CellBorderStyleChanged(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -18,7 +18,7 @@
|
|||||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||||
<data name="Color1" type="System.Drawing.Color, System.Drawing"">Blue</data>
|
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||||
</data>
|
</data>
|
||||||
|
|||||||
13
Vista/FrmOrdenDeCompra.Designer.cs
generated
13
Vista/FrmOrdenDeCompra.Designer.cs
generated
@@ -32,7 +32,6 @@
|
|||||||
dataGridView1 = new DataGridView();
|
dataGridView1 = new DataGridView();
|
||||||
BtnAdd = new Button();
|
BtnAdd = new Button();
|
||||||
BtnEliminar = new Button();
|
BtnEliminar = new Button();
|
||||||
BtnModificar = new Button();
|
|
||||||
groupBox1.SuspendLayout();
|
groupBox1.SuspendLayout();
|
||||||
((System.ComponentModel.ISupportInitialize)dataGridView1).BeginInit();
|
((System.ComponentModel.ISupportInitialize)dataGridView1).BeginInit();
|
||||||
SuspendLayout();
|
SuspendLayout();
|
||||||
@@ -42,7 +41,6 @@
|
|||||||
groupBox1.Controls.Add(dataGridView1);
|
groupBox1.Controls.Add(dataGridView1);
|
||||||
groupBox1.Controls.Add(BtnAdd);
|
groupBox1.Controls.Add(BtnAdd);
|
||||||
groupBox1.Controls.Add(BtnEliminar);
|
groupBox1.Controls.Add(BtnEliminar);
|
||||||
groupBox1.Controls.Add(BtnModificar);
|
|
||||||
groupBox1.Location = new Point(12, 3);
|
groupBox1.Location = new Point(12, 3);
|
||||||
groupBox1.Name = "groupBox1";
|
groupBox1.Name = "groupBox1";
|
||||||
groupBox1.Size = new Size(776, 351);
|
groupBox1.Size = new Size(776, 351);
|
||||||
@@ -51,6 +49,7 @@
|
|||||||
//
|
//
|
||||||
// dataGridView1
|
// dataGridView1
|
||||||
//
|
//
|
||||||
|
dataGridView1.AutoSizeColumnsMode = DataGridViewAutoSizeColumnsMode.DisplayedCells;
|
||||||
dataGridView1.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.AutoSize;
|
dataGridView1.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.AutoSize;
|
||||||
dataGridView1.Location = new Point(6, 22);
|
dataGridView1.Location = new Point(6, 22);
|
||||||
dataGridView1.Name = "dataGridView1";
|
dataGridView1.Name = "dataGridView1";
|
||||||
@@ -77,15 +76,6 @@
|
|||||||
BtnEliminar.Text = "Eliminar";
|
BtnEliminar.Text = "Eliminar";
|
||||||
BtnEliminar.UseVisualStyleBackColor = true;
|
BtnEliminar.UseVisualStyleBackColor = true;
|
||||||
//
|
//
|
||||||
// BtnModificar
|
|
||||||
//
|
|
||||||
BtnModificar.Location = new Point(108, 302);
|
|
||||||
BtnModificar.Name = "BtnModificar";
|
|
||||||
BtnModificar.Size = new Size(75, 23);
|
|
||||||
BtnModificar.TabIndex = 1;
|
|
||||||
BtnModificar.Text = "Modificar";
|
|
||||||
BtnModificar.UseVisualStyleBackColor = true;
|
|
||||||
//
|
|
||||||
// FrmOrdenDeCompra
|
// FrmOrdenDeCompra
|
||||||
//
|
//
|
||||||
AutoScaleDimensions = new SizeF(7F, 15F);
|
AutoScaleDimensions = new SizeF(7F, 15F);
|
||||||
@@ -106,6 +96,5 @@
|
|||||||
private DataGridView dataGridView1;
|
private DataGridView dataGridView1;
|
||||||
private Button BtnAdd;
|
private Button BtnAdd;
|
||||||
private Button BtnEliminar;
|
private Button BtnEliminar;
|
||||||
private Button BtnModificar;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
31
Vista/FrmPedidosDePresupuestos.Designer.cs
generated
31
Vista/FrmPedidosDePresupuestos.Designer.cs
generated
@@ -32,30 +32,32 @@
|
|||||||
dataGridView1 = new DataGridView();
|
dataGridView1 = new DataGridView();
|
||||||
BtnAdd = new Button();
|
BtnAdd = new Button();
|
||||||
BtnEliminar = new Button();
|
BtnEliminar = new Button();
|
||||||
BtnModificar = new Button();
|
dataGridView2 = new DataGridView();
|
||||||
groupBox1.SuspendLayout();
|
groupBox1.SuspendLayout();
|
||||||
((System.ComponentModel.ISupportInitialize)dataGridView1).BeginInit();
|
((System.ComponentModel.ISupportInitialize)dataGridView1).BeginInit();
|
||||||
|
((System.ComponentModel.ISupportInitialize)dataGridView2).BeginInit();
|
||||||
SuspendLayout();
|
SuspendLayout();
|
||||||
//
|
//
|
||||||
// groupBox1
|
// groupBox1
|
||||||
//
|
//
|
||||||
|
groupBox1.Controls.Add(dataGridView2);
|
||||||
groupBox1.Controls.Add(dataGridView1);
|
groupBox1.Controls.Add(dataGridView1);
|
||||||
groupBox1.Controls.Add(BtnAdd);
|
groupBox1.Controls.Add(BtnAdd);
|
||||||
groupBox1.Controls.Add(BtnEliminar);
|
groupBox1.Controls.Add(BtnEliminar);
|
||||||
groupBox1.Controls.Add(BtnModificar);
|
|
||||||
groupBox1.Location = new Point(12, 2);
|
groupBox1.Location = new Point(12, 2);
|
||||||
groupBox1.Name = "groupBox1";
|
groupBox1.Name = "groupBox1";
|
||||||
groupBox1.Size = new Size(776, 351);
|
groupBox1.Size = new Size(946, 377);
|
||||||
groupBox1.TabIndex = 4;
|
groupBox1.TabIndex = 4;
|
||||||
groupBox1.TabStop = false;
|
groupBox1.TabStop = false;
|
||||||
//
|
//
|
||||||
// dataGridView1
|
// dataGridView1
|
||||||
//
|
//
|
||||||
|
dataGridView1.AutoSizeColumnsMode = DataGridViewAutoSizeColumnsMode.Fill;
|
||||||
dataGridView1.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.AutoSize;
|
dataGridView1.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.AutoSize;
|
||||||
dataGridView1.Location = new Point(6, 22);
|
dataGridView1.Location = new Point(6, 22);
|
||||||
dataGridView1.Name = "dataGridView1";
|
dataGridView1.Name = "dataGridView1";
|
||||||
dataGridView1.RowTemplate.Height = 25;
|
dataGridView1.RowTemplate.Height = 25;
|
||||||
dataGridView1.Size = new Size(550, 235);
|
dataGridView1.Size = new Size(284, 235);
|
||||||
dataGridView1.TabIndex = 3;
|
dataGridView1.TabIndex = 3;
|
||||||
//
|
//
|
||||||
// BtnAdd
|
// BtnAdd
|
||||||
@@ -66,6 +68,7 @@
|
|||||||
BtnAdd.TabIndex = 0;
|
BtnAdd.TabIndex = 0;
|
||||||
BtnAdd.Text = "Añadir";
|
BtnAdd.Text = "Añadir";
|
||||||
BtnAdd.UseVisualStyleBackColor = true;
|
BtnAdd.UseVisualStyleBackColor = true;
|
||||||
|
BtnAdd.Click += BtnAdd_Click;
|
||||||
//
|
//
|
||||||
// BtnEliminar
|
// BtnEliminar
|
||||||
//
|
//
|
||||||
@@ -76,26 +79,28 @@
|
|||||||
BtnEliminar.Text = "Eliminar";
|
BtnEliminar.Text = "Eliminar";
|
||||||
BtnEliminar.UseVisualStyleBackColor = true;
|
BtnEliminar.UseVisualStyleBackColor = true;
|
||||||
//
|
//
|
||||||
// BtnModificar
|
// dataGridView2
|
||||||
//
|
//
|
||||||
BtnModificar.Location = new Point(108, 302);
|
dataGridView2.AutoSizeColumnsMode = DataGridViewAutoSizeColumnsMode.Fill;
|
||||||
BtnModificar.Name = "BtnModificar";
|
dataGridView2.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.AutoSize;
|
||||||
BtnModificar.Size = new Size(75, 23);
|
dataGridView2.Location = new Point(355, 22);
|
||||||
BtnModificar.TabIndex = 1;
|
dataGridView2.Name = "dataGridView2";
|
||||||
BtnModificar.Text = "Modificar";
|
dataGridView2.RowTemplate.Height = 25;
|
||||||
BtnModificar.UseVisualStyleBackColor = true;
|
dataGridView2.Size = new Size(585, 281);
|
||||||
|
dataGridView2.TabIndex = 4;
|
||||||
//
|
//
|
||||||
// FrmPedidosDePresupuestos
|
// FrmPedidosDePresupuestos
|
||||||
//
|
//
|
||||||
AutoScaleDimensions = new SizeF(7F, 15F);
|
AutoScaleDimensions = new SizeF(7F, 15F);
|
||||||
AutoScaleMode = AutoScaleMode.Font;
|
AutoScaleMode = AutoScaleMode.Font;
|
||||||
ClientSize = new Size(800, 450);
|
ClientSize = new Size(970, 450);
|
||||||
Controls.Add(groupBox1);
|
Controls.Add(groupBox1);
|
||||||
Name = "FrmPedidosDePresupuestos";
|
Name = "FrmPedidosDePresupuestos";
|
||||||
Text = "PedidosDePresupuestos";
|
Text = "PedidosDePresupuestos";
|
||||||
WindowState = FormWindowState.Maximized;
|
WindowState = FormWindowState.Maximized;
|
||||||
groupBox1.ResumeLayout(false);
|
groupBox1.ResumeLayout(false);
|
||||||
((System.ComponentModel.ISupportInitialize)dataGridView1).EndInit();
|
((System.ComponentModel.ISupportInitialize)dataGridView1).EndInit();
|
||||||
|
((System.ComponentModel.ISupportInitialize)dataGridView2).EndInit();
|
||||||
ResumeLayout(false);
|
ResumeLayout(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -105,6 +110,6 @@
|
|||||||
private DataGridView dataGridView1;
|
private DataGridView dataGridView1;
|
||||||
private Button BtnAdd;
|
private Button BtnAdd;
|
||||||
private Button BtnEliminar;
|
private Button BtnEliminar;
|
||||||
private Button BtnModificar;
|
private DataGridView dataGridView2;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1,4 +1,5 @@
|
|||||||
using System;
|
using Controladora;
|
||||||
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.ComponentModel;
|
using System.ComponentModel;
|
||||||
using System.Data;
|
using System.Data;
|
||||||
@@ -16,5 +17,16 @@ namespace Vista
|
|||||||
{
|
{
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
}
|
}
|
||||||
|
private void ActualizarGrilla()
|
||||||
|
{
|
||||||
|
dataGridView1.DataSource = null;
|
||||||
|
dataGridView1.DataSource = ControladoraPedidoDePresupuestos.Instance.Listar();
|
||||||
|
}
|
||||||
|
private void BtnAdd_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
var form = new FrmPresupuesto();
|
||||||
|
form.ShowDialog();
|
||||||
|
ActualizarGrilla();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
181
Vista/FrmPresupuesto.Designer.cs
generated
Normal file
181
Vista/FrmPresupuesto.Designer.cs
generated
Normal file
@@ -0,0 +1,181 @@
|
|||||||
|
namespace Vista
|
||||||
|
{
|
||||||
|
partial class FrmPresupuesto
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Required designer variable.
|
||||||
|
/// </summary>
|
||||||
|
private System.ComponentModel.IContainer components = null;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Clean up any resources being used.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||||
|
protected override void Dispose(bool disposing)
|
||||||
|
{
|
||||||
|
if (disposing && (components != null))
|
||||||
|
{
|
||||||
|
components.Dispose();
|
||||||
|
}
|
||||||
|
base.Dispose(disposing);
|
||||||
|
}
|
||||||
|
|
||||||
|
#region Windows Form Designer generated code
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Required method for Designer support - do not modify
|
||||||
|
/// the contents of this method with the code editor.
|
||||||
|
/// </summary>
|
||||||
|
private void InitializeComponent()
|
||||||
|
{
|
||||||
|
dataGridView2 = new DataGridView();
|
||||||
|
ID = new Label();
|
||||||
|
label2 = new Label();
|
||||||
|
label3 = new Label();
|
||||||
|
dateTimePicker1 = new DateTimePicker();
|
||||||
|
comboBox1 = new ComboBox();
|
||||||
|
numericUpDown1 = new NumericUpDown();
|
||||||
|
button1 = new Button();
|
||||||
|
button2 = new Button();
|
||||||
|
button3 = new Button();
|
||||||
|
button4 = new Button();
|
||||||
|
((System.ComponentModel.ISupportInitialize)dataGridView2).BeginInit();
|
||||||
|
((System.ComponentModel.ISupportInitialize)numericUpDown1).BeginInit();
|
||||||
|
//
|
||||||
|
// dataGridView2
|
||||||
|
//
|
||||||
|
dataGridView2.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.AutoSize;
|
||||||
|
dataGridView2.Location = new Point(407, 12);
|
||||||
|
dataGridView2.Name = "dataGridView2";
|
||||||
|
dataGridView2.RowTemplate.Height = 25;
|
||||||
|
dataGridView2.Size = new Size(475, 413);
|
||||||
|
dataGridView2.TabIndex = 1;
|
||||||
|
//
|
||||||
|
// ID
|
||||||
|
//
|
||||||
|
ID.AutoSize = true;
|
||||||
|
ID.Location = new Point(34, 197);
|
||||||
|
ID.Name = "ID";
|
||||||
|
ID.Size = new Size(18, 15);
|
||||||
|
ID.TabIndex = 2;
|
||||||
|
ID.Text = "ID";
|
||||||
|
//
|
||||||
|
// label2
|
||||||
|
//
|
||||||
|
label2.AutoSize = true;
|
||||||
|
label2.Location = new Point(34, 234);
|
||||||
|
label2.Name = "label2";
|
||||||
|
label2.Size = new Size(55, 15);
|
||||||
|
label2.TabIndex = 3;
|
||||||
|
label2.Text = "Provedor";
|
||||||
|
//
|
||||||
|
// label3
|
||||||
|
//
|
||||||
|
label3.AutoSize = true;
|
||||||
|
label3.Location = new Point(34, 270);
|
||||||
|
label3.Name = "label3";
|
||||||
|
label3.Size = new Size(38, 15);
|
||||||
|
label3.TabIndex = 4;
|
||||||
|
label3.Text = "Fecha";
|
||||||
|
//
|
||||||
|
// dateTimePicker1
|
||||||
|
//
|
||||||
|
dateTimePicker1.Location = new Point(100, 264);
|
||||||
|
dateTimePicker1.Name = "dateTimePicker1";
|
||||||
|
dateTimePicker1.Size = new Size(121, 23);
|
||||||
|
dateTimePicker1.TabIndex = 6;
|
||||||
|
//
|
||||||
|
// comboBox1
|
||||||
|
//
|
||||||
|
comboBox1.DropDownStyle = ComboBoxStyle.DropDownList;
|
||||||
|
comboBox1.FormattingEnabled = true;
|
||||||
|
comboBox1.Location = new Point(100, 226);
|
||||||
|
comboBox1.Name = "comboBox1";
|
||||||
|
comboBox1.Size = new Size(121, 23);
|
||||||
|
comboBox1.TabIndex = 7;
|
||||||
|
//
|
||||||
|
// numericUpDown1
|
||||||
|
//
|
||||||
|
numericUpDown1.Location = new Point(101, 197);
|
||||||
|
numericUpDown1.Maximum = new decimal(new int[] { 1410065407, 2, 0, 0 });
|
||||||
|
numericUpDown1.Name = "numericUpDown1";
|
||||||
|
numericUpDown1.Size = new Size(120, 23);
|
||||||
|
numericUpDown1.TabIndex = 8;
|
||||||
|
//
|
||||||
|
// button1
|
||||||
|
//
|
||||||
|
button1.Location = new Point(34, 383);
|
||||||
|
button1.Name = "button1";
|
||||||
|
button1.Size = new Size(154, 42);
|
||||||
|
button1.TabIndex = 9;
|
||||||
|
button1.Text = "Guardar";
|
||||||
|
button1.UseVisualStyleBackColor = true;
|
||||||
|
|
||||||
|
//
|
||||||
|
// button2
|
||||||
|
//
|
||||||
|
button2.Location = new Point(247, 383);
|
||||||
|
button2.Name = "button2";
|
||||||
|
button2.Size = new Size(154, 42);
|
||||||
|
button2.TabIndex = 10;
|
||||||
|
button2.Text = "Cancelar";
|
||||||
|
button2.UseVisualStyleBackColor = true;
|
||||||
|
|
||||||
|
//
|
||||||
|
// button3
|
||||||
|
//
|
||||||
|
button3.Location = new Point(34, 42);
|
||||||
|
button3.Name = "button3";
|
||||||
|
button3.Size = new Size(128, 47);
|
||||||
|
button3.TabIndex = 11;
|
||||||
|
button3.Text = "Agregar Producto";
|
||||||
|
button3.UseVisualStyleBackColor = true;
|
||||||
|
|
||||||
|
//
|
||||||
|
// button4
|
||||||
|
//
|
||||||
|
button4.Location = new Point(34, 106);
|
||||||
|
button4.Name = "button4";
|
||||||
|
button4.Size = new Size(128, 47);
|
||||||
|
button4.TabIndex = 12;
|
||||||
|
button4.Text = "Eliminar Producto";
|
||||||
|
button4.UseVisualStyleBackColor = true;
|
||||||
|
//
|
||||||
|
// FrmPresupuesto
|
||||||
|
//
|
||||||
|
AutoScaleDimensions = new SizeF(7F, 15F);
|
||||||
|
AutoScaleMode = AutoScaleMode.Font;
|
||||||
|
ClientSize = new Size(925, 446);
|
||||||
|
Controls.Add(button4);
|
||||||
|
Controls.Add(button3);
|
||||||
|
Controls.Add(button2);
|
||||||
|
Controls.Add(button1);
|
||||||
|
Controls.Add(numericUpDown1);
|
||||||
|
Controls.Add(comboBox1);
|
||||||
|
Controls.Add(dateTimePicker1);
|
||||||
|
Controls.Add(label3);
|
||||||
|
Controls.Add(label2);
|
||||||
|
Controls.Add(ID);
|
||||||
|
Controls.Add(dataGridView2);
|
||||||
|
Name = "FrmPresupuesto";
|
||||||
|
Text = "Form1";
|
||||||
|
((System.ComponentModel.ISupportInitialize)dataGridView2).EndInit();
|
||||||
|
((System.ComponentModel.ISupportInitialize)numericUpDown1).EndInit();
|
||||||
|
ResumeLayout(false);
|
||||||
|
PerformLayout();
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
private DataGridView dataGridView2;
|
||||||
|
private Label ID;
|
||||||
|
private Label label2;
|
||||||
|
private Label label3;
|
||||||
|
private DateTimePicker dateTimePicker1;
|
||||||
|
private ComboBox comboBox1;
|
||||||
|
private NumericUpDown numericUpDown1;
|
||||||
|
private Button button1;
|
||||||
|
private Button button2;
|
||||||
|
private Button button3;
|
||||||
|
private Button button4;
|
||||||
|
}
|
||||||
|
}
|
||||||
37
Vista/FrmPresupuesto.cs
Normal file
37
Vista/FrmPresupuesto.cs
Normal file
@@ -0,0 +1,37 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.ComponentModel;
|
||||||
|
using System.Data;
|
||||||
|
using System.Drawing;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using System.Windows.Forms;
|
||||||
|
|
||||||
|
namespace Vista
|
||||||
|
{
|
||||||
|
public partial class FrmPresupuesto : Form
|
||||||
|
{
|
||||||
|
public FrmPresupuesto()
|
||||||
|
{
|
||||||
|
InitializeComponent();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void button3_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
var form = new AddProducto();
|
||||||
|
form.ShowDialog();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void button2_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
Close();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void button1_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
//guardar
|
||||||
|
Close();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
120
Vista/FrmPresupuesto.resx
Normal file
120
Vista/FrmPresupuesto.resx
Normal file
@@ -0,0 +1,120 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<root>
|
||||||
|
<!--
|
||||||
|
Microsoft ResX Schema
|
||||||
|
|
||||||
|
Version 2.0
|
||||||
|
|
||||||
|
The primary goals of this format is to allow a simple XML format
|
||||||
|
that is mostly human readable. The generation and parsing of the
|
||||||
|
various data types are done through the TypeConverter classes
|
||||||
|
associated with the data types.
|
||||||
|
|
||||||
|
Example:
|
||||||
|
|
||||||
|
... ado.net/XML headers & schema ...
|
||||||
|
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||||
|
<resheader name="version">2.0</resheader>
|
||||||
|
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||||
|
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||||
|
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||||
|
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||||
|
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||||
|
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||||
|
</data>
|
||||||
|
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||||
|
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||||
|
<comment>This is a comment</comment>
|
||||||
|
</data>
|
||||||
|
|
||||||
|
There are any number of "resheader" rows that contain simple
|
||||||
|
name/value pairs.
|
||||||
|
|
||||||
|
Each data row contains a name, and value. The row also contains a
|
||||||
|
type or mimetype. Type corresponds to a .NET class that support
|
||||||
|
text/value conversion through the TypeConverter architecture.
|
||||||
|
Classes that don't support this are serialized and stored with the
|
||||||
|
mimetype set.
|
||||||
|
|
||||||
|
The mimetype is used for serialized objects, and tells the
|
||||||
|
ResXResourceReader how to depersist the object. This is currently not
|
||||||
|
extensible. For a given mimetype the value must be set accordingly:
|
||||||
|
|
||||||
|
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||||
|
that the ResXResourceWriter will generate, however the reader can
|
||||||
|
read any of the formats listed below.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.binary.base64
|
||||||
|
value : The object must be serialized with
|
||||||
|
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.soap.base64
|
||||||
|
value : The object must be serialized with
|
||||||
|
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||||
|
value : The object must be serialized into a byte array
|
||||||
|
: using a System.ComponentModel.TypeConverter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
-->
|
||||||
|
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||||
|
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||||
|
<xsd:element name="root" msdata:IsDataSet="true">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:choice maxOccurs="unbounded">
|
||||||
|
<xsd:element name="metadata">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||||
|
<xsd:attribute name="type" type="xsd:string" />
|
||||||
|
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||||
|
<xsd:attribute ref="xml:space" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="assembly">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:attribute name="alias" type="xsd:string" />
|
||||||
|
<xsd:attribute name="name" type="xsd:string" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="data">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||||
|
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||||
|
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||||
|
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||||
|
<xsd:attribute ref="xml:space" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="resheader">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
</xsd:choice>
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
</xsd:schema>
|
||||||
|
<resheader name="resmimetype">
|
||||||
|
<value>text/microsoft-resx</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="version">
|
||||||
|
<value>2.0</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="reader">
|
||||||
|
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="writer">
|
||||||
|
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
|
</resheader>
|
||||||
|
</root>
|
||||||
194
Vista/FrmProducto.Designer.cs
generated
Normal file
194
Vista/FrmProducto.Designer.cs
generated
Normal file
@@ -0,0 +1,194 @@
|
|||||||
|
namespace Vista
|
||||||
|
{
|
||||||
|
partial class FrmProducto
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Required designer variable.
|
||||||
|
/// </summary>
|
||||||
|
private System.ComponentModel.IContainer components = null;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Clean up any resources being used.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||||
|
protected override void Dispose(bool disposing)
|
||||||
|
{
|
||||||
|
if (disposing && (components != null))
|
||||||
|
{
|
||||||
|
components.Dispose();
|
||||||
|
}
|
||||||
|
base.Dispose(disposing);
|
||||||
|
}
|
||||||
|
|
||||||
|
#region Windows Form Designer generated code
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Required method for Designer support - do not modify
|
||||||
|
/// the contents of this method with the code editor.
|
||||||
|
/// </summary>
|
||||||
|
private void InitializeComponent()
|
||||||
|
{
|
||||||
|
label1 = new Label();
|
||||||
|
label2 = new Label();
|
||||||
|
label3 = new Label();
|
||||||
|
label4 = new Label();
|
||||||
|
label5 = new Label();
|
||||||
|
numericUpDown1 = new NumericUpDown();
|
||||||
|
textBox1 = new TextBox();
|
||||||
|
numericUpDown2 = new NumericUpDown();
|
||||||
|
checkBox1 = new CheckBox();
|
||||||
|
comboBox1 = new ComboBox();
|
||||||
|
button1 = new Button();
|
||||||
|
button2 = new Button();
|
||||||
|
((System.ComponentModel.ISupportInitialize)numericUpDown1).BeginInit();
|
||||||
|
((System.ComponentModel.ISupportInitialize)numericUpDown2).BeginInit();
|
||||||
|
SuspendLayout();
|
||||||
|
//
|
||||||
|
// label1
|
||||||
|
//
|
||||||
|
label1.AutoSize = true;
|
||||||
|
label1.Location = new Point(47, 44);
|
||||||
|
label1.Name = "label1";
|
||||||
|
label1.Size = new Size(18, 15);
|
||||||
|
label1.TabIndex = 0;
|
||||||
|
label1.Text = "ID";
|
||||||
|
//
|
||||||
|
// label2
|
||||||
|
//
|
||||||
|
label2.AutoSize = true;
|
||||||
|
label2.Location = new Point(14, 73);
|
||||||
|
label2.Name = "label2";
|
||||||
|
label2.Size = new Size(51, 15);
|
||||||
|
label2.TabIndex = 1;
|
||||||
|
label2.Text = "Nombre";
|
||||||
|
//
|
||||||
|
// label3
|
||||||
|
//
|
||||||
|
label3.AutoSize = true;
|
||||||
|
label3.Location = new Point(25, 105);
|
||||||
|
label3.Name = "label3";
|
||||||
|
label3.Size = new Size(40, 15);
|
||||||
|
label3.TabIndex = 2;
|
||||||
|
label3.Text = "Precio";
|
||||||
|
//
|
||||||
|
// label4
|
||||||
|
//
|
||||||
|
label4.AutoSize = true;
|
||||||
|
label4.Location = new Point(7, 136);
|
||||||
|
label4.Name = "label4";
|
||||||
|
label4.Size = new Size(62, 15);
|
||||||
|
label4.TabIndex = 3;
|
||||||
|
label4.Text = "Habilitado";
|
||||||
|
//
|
||||||
|
// label5
|
||||||
|
//
|
||||||
|
label5.AutoSize = true;
|
||||||
|
label5.Location = new Point(7, 167);
|
||||||
|
label5.Name = "label5";
|
||||||
|
label5.Size = new Size(58, 15);
|
||||||
|
label5.TabIndex = 4;
|
||||||
|
label5.Text = "Categoria";
|
||||||
|
//
|
||||||
|
// numericUpDown1
|
||||||
|
//
|
||||||
|
numericUpDown1.Location = new Point(71, 36);
|
||||||
|
numericUpDown1.Maximum = new decimal(new int[] { 1215752191, 23, 0, 0 });
|
||||||
|
numericUpDown1.Name = "numericUpDown1";
|
||||||
|
numericUpDown1.Size = new Size(120, 23);
|
||||||
|
numericUpDown1.TabIndex = 5;
|
||||||
|
//
|
||||||
|
// textBox1
|
||||||
|
//
|
||||||
|
textBox1.Location = new Point(71, 65);
|
||||||
|
textBox1.Name = "textBox1";
|
||||||
|
textBox1.Size = new Size(120, 23);
|
||||||
|
textBox1.TabIndex = 6;
|
||||||
|
//
|
||||||
|
// numericUpDown2
|
||||||
|
//
|
||||||
|
numericUpDown2.Location = new Point(71, 97);
|
||||||
|
numericUpDown2.Maximum = new decimal(new int[] { 100000000, 0, 0, 0 });
|
||||||
|
numericUpDown2.Name = "numericUpDown2";
|
||||||
|
numericUpDown2.Size = new Size(120, 23);
|
||||||
|
numericUpDown2.TabIndex = 7;
|
||||||
|
//
|
||||||
|
// checkBox1
|
||||||
|
//
|
||||||
|
checkBox1.AutoSize = true;
|
||||||
|
checkBox1.Location = new Point(71, 137);
|
||||||
|
checkBox1.Name = "checkBox1";
|
||||||
|
checkBox1.Size = new Size(15, 14);
|
||||||
|
checkBox1.TabIndex = 8;
|
||||||
|
checkBox1.UseVisualStyleBackColor = true;
|
||||||
|
//
|
||||||
|
// comboBox1
|
||||||
|
//
|
||||||
|
comboBox1.DropDownStyle = ComboBoxStyle.DropDownList;
|
||||||
|
comboBox1.FormattingEnabled = true;
|
||||||
|
comboBox1.Location = new Point(70, 159);
|
||||||
|
comboBox1.Name = "comboBox1";
|
||||||
|
comboBox1.Size = new Size(121, 23);
|
||||||
|
comboBox1.TabIndex = 9;
|
||||||
|
comboBox1.SelectedIndexChanged += comboBox1_SelectedIndexChanged;
|
||||||
|
//
|
||||||
|
// button1
|
||||||
|
//
|
||||||
|
button1.Location = new Point(14, 239);
|
||||||
|
button1.Name = "button1";
|
||||||
|
button1.Size = new Size(92, 35);
|
||||||
|
button1.TabIndex = 10;
|
||||||
|
button1.Text = "Aceptar";
|
||||||
|
button1.UseVisualStyleBackColor = true;
|
||||||
|
button1.Click += button1_Click;
|
||||||
|
//
|
||||||
|
// button2
|
||||||
|
//
|
||||||
|
button2.Location = new Point(154, 239);
|
||||||
|
button2.Name = "button2";
|
||||||
|
button2.Size = new Size(92, 35);
|
||||||
|
button2.TabIndex = 11;
|
||||||
|
button2.Text = "Cancelar";
|
||||||
|
button2.UseVisualStyleBackColor = true;
|
||||||
|
button2.Click += button2_Click;
|
||||||
|
//
|
||||||
|
// FrmProducto
|
||||||
|
//
|
||||||
|
AutoScaleDimensions = new SizeF(7F, 15F);
|
||||||
|
AutoScaleMode = AutoScaleMode.Font;
|
||||||
|
ClientSize = new Size(471, 313);
|
||||||
|
Controls.Add(button2);
|
||||||
|
Controls.Add(button1);
|
||||||
|
Controls.Add(comboBox1);
|
||||||
|
Controls.Add(checkBox1);
|
||||||
|
Controls.Add(numericUpDown2);
|
||||||
|
Controls.Add(textBox1);
|
||||||
|
Controls.Add(numericUpDown1);
|
||||||
|
Controls.Add(label5);
|
||||||
|
Controls.Add(label4);
|
||||||
|
Controls.Add(label3);
|
||||||
|
Controls.Add(label2);
|
||||||
|
Controls.Add(label1);
|
||||||
|
Name = "FrmProducto";
|
||||||
|
Text = "Producto";
|
||||||
|
((System.ComponentModel.ISupportInitialize)numericUpDown1).EndInit();
|
||||||
|
((System.ComponentModel.ISupportInitialize)numericUpDown2).EndInit();
|
||||||
|
ResumeLayout(false);
|
||||||
|
PerformLayout();
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
private Label label1;
|
||||||
|
private Label label2;
|
||||||
|
private Label label3;
|
||||||
|
private Label label4;
|
||||||
|
private Label label5;
|
||||||
|
private NumericUpDown numericUpDown1;
|
||||||
|
private TextBox textBox1;
|
||||||
|
private NumericUpDown numericUpDown2;
|
||||||
|
private CheckBox checkBox1;
|
||||||
|
private ComboBox comboBox1;
|
||||||
|
private Button button1;
|
||||||
|
private Button button2;
|
||||||
|
}
|
||||||
|
}
|
||||||
113
Vista/FrmProducto.cs
Normal file
113
Vista/FrmProducto.cs
Normal file
@@ -0,0 +1,113 @@
|
|||||||
|
using Controladora;
|
||||||
|
using Entidades;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.ComponentModel;
|
||||||
|
using System.Data;
|
||||||
|
using System.Drawing;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using System.Windows.Forms;
|
||||||
|
using static System.Windows.Forms.VisualStyles.VisualStyleElement;
|
||||||
|
|
||||||
|
namespace Vista
|
||||||
|
{
|
||||||
|
public partial class FrmProducto : Form
|
||||||
|
{
|
||||||
|
public FrmProducto()
|
||||||
|
{
|
||||||
|
InitializeComponent();
|
||||||
|
CargarCategorias();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void CargarCategorias()
|
||||||
|
{
|
||||||
|
// Obtener la lista de categorías desde la controladora
|
||||||
|
var categorias = ControladoraCategorias.Instance.Listar();
|
||||||
|
|
||||||
|
// Configurar el ComboBox para categorías
|
||||||
|
comboBox1.DisplayMember = "Descripcion"; // Mostrar la propiedad Descripcion
|
||||||
|
comboBox1.ValueMember = "Id"; // Usar la propiedad Id como valor
|
||||||
|
|
||||||
|
// Asignar la lista de categorías al ComboBox
|
||||||
|
comboBox1.DataSource = categorias;
|
||||||
|
}
|
||||||
|
|
||||||
|
private bool ValidarDatos()
|
||||||
|
{
|
||||||
|
string devolucion = "";
|
||||||
|
|
||||||
|
// Validar Nombre
|
||||||
|
if (string.IsNullOrEmpty(textBox1.Text))
|
||||||
|
{
|
||||||
|
devolucion += "El nombre del producto no puede estar vacío.\n";
|
||||||
|
}
|
||||||
|
else if (textBox1.Text.Length > 100) // Limite de caracteres
|
||||||
|
{
|
||||||
|
devolucion += "El nombre del producto no puede superar los 100 caracteres.\n";
|
||||||
|
}
|
||||||
|
|
||||||
|
// Validar Precio
|
||||||
|
if (numericUpDown2.Value <= 0)
|
||||||
|
{
|
||||||
|
devolucion += "El precio debe ser mayor a cero.\n";
|
||||||
|
}
|
||||||
|
|
||||||
|
// Validar ID (Si es necesario)
|
||||||
|
if (ControladoraProductos.Instance.Listar().Any(p => p.Id == (int)numericUpDown1.Value))
|
||||||
|
{
|
||||||
|
devolucion += "Ya existe un producto con el mismo ID.\n";
|
||||||
|
}
|
||||||
|
|
||||||
|
// Validar Categoría Seleccionada
|
||||||
|
if (comboBox1.SelectedItem == null)
|
||||||
|
{
|
||||||
|
devolucion += "Debe seleccionar una categoría.\n";
|
||||||
|
}
|
||||||
|
|
||||||
|
if (devolucion == "")
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
MessageBox.Show(devolucion, "Errores de Validación", MessageBoxButtons.OK, MessageBoxIcon.Error);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void button1_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
if (ValidarDatos())
|
||||||
|
{
|
||||||
|
// Crear nuevo producto
|
||||||
|
var nuevoProducto = new Producto
|
||||||
|
{
|
||||||
|
Id = (int)numericUpDown1.Value,
|
||||||
|
Nombre = textBox1.Text,
|
||||||
|
Precio = (double)numericUpDown2.Value,
|
||||||
|
Habilitado = checkBox1.Checked,
|
||||||
|
Categoria = (Categoria)comboBox1.SelectedItem, // Asignar categoría seleccionada
|
||||||
|
};
|
||||||
|
|
||||||
|
// Agregar el producto usando la controladora
|
||||||
|
string mensaje = ControladoraProductos.Instance.Añadir(nuevoProducto);
|
||||||
|
|
||||||
|
MessageBox.Show(mensaje, "Información", MessageBoxButtons.OK, MessageBoxIcon.Information);
|
||||||
|
Close();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void button2_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
this.Close();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void comboBox1_SelectedIndexChanged(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
// Puedes usar este método para manejar cambios en el ComboBox si es necesario
|
||||||
|
// No es necesario mantener una variable separada para la categoría seleccionada
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
120
Vista/FrmProducto.resx
Normal file
120
Vista/FrmProducto.resx
Normal file
@@ -0,0 +1,120 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<root>
|
||||||
|
<!--
|
||||||
|
Microsoft ResX Schema
|
||||||
|
|
||||||
|
Version 2.0
|
||||||
|
|
||||||
|
The primary goals of this format is to allow a simple XML format
|
||||||
|
that is mostly human readable. The generation and parsing of the
|
||||||
|
various data types are done through the TypeConverter classes
|
||||||
|
associated with the data types.
|
||||||
|
|
||||||
|
Example:
|
||||||
|
|
||||||
|
... ado.net/XML headers & schema ...
|
||||||
|
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||||
|
<resheader name="version">2.0</resheader>
|
||||||
|
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||||
|
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||||
|
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||||
|
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||||
|
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||||
|
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||||
|
</data>
|
||||||
|
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||||
|
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||||
|
<comment>This is a comment</comment>
|
||||||
|
</data>
|
||||||
|
|
||||||
|
There are any number of "resheader" rows that contain simple
|
||||||
|
name/value pairs.
|
||||||
|
|
||||||
|
Each data row contains a name, and value. The row also contains a
|
||||||
|
type or mimetype. Type corresponds to a .NET class that support
|
||||||
|
text/value conversion through the TypeConverter architecture.
|
||||||
|
Classes that don't support this are serialized and stored with the
|
||||||
|
mimetype set.
|
||||||
|
|
||||||
|
The mimetype is used for serialized objects, and tells the
|
||||||
|
ResXResourceReader how to depersist the object. This is currently not
|
||||||
|
extensible. For a given mimetype the value must be set accordingly:
|
||||||
|
|
||||||
|
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||||
|
that the ResXResourceWriter will generate, however the reader can
|
||||||
|
read any of the formats listed below.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.binary.base64
|
||||||
|
value : The object must be serialized with
|
||||||
|
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.soap.base64
|
||||||
|
value : The object must be serialized with
|
||||||
|
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||||
|
value : The object must be serialized into a byte array
|
||||||
|
: using a System.ComponentModel.TypeConverter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
-->
|
||||||
|
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||||
|
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||||
|
<xsd:element name="root" msdata:IsDataSet="true">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:choice maxOccurs="unbounded">
|
||||||
|
<xsd:element name="metadata">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||||
|
<xsd:attribute name="type" type="xsd:string" />
|
||||||
|
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||||
|
<xsd:attribute ref="xml:space" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="assembly">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:attribute name="alias" type="xsd:string" />
|
||||||
|
<xsd:attribute name="name" type="xsd:string" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="data">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||||
|
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||||
|
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||||
|
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||||
|
<xsd:attribute ref="xml:space" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="resheader">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
</xsd:choice>
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
</xsd:schema>
|
||||||
|
<resheader name="resmimetype">
|
||||||
|
<value>text/microsoft-resx</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="version">
|
||||||
|
<value>2.0</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="reader">
|
||||||
|
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="writer">
|
||||||
|
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
|
</resheader>
|
||||||
|
</root>
|
||||||
72
Vista/FrmProductos.Designer.cs
generated
72
Vista/FrmProductos.Designer.cs
generated
@@ -29,33 +29,49 @@
|
|||||||
private void InitializeComponent()
|
private void InitializeComponent()
|
||||||
{
|
{
|
||||||
groupBox1 = new GroupBox();
|
groupBox1 = new GroupBox();
|
||||||
|
button1 = new Button();
|
||||||
dataGridView1 = new DataGridView();
|
dataGridView1 = new DataGridView();
|
||||||
BtnAdd = new Button();
|
BtnAdd = new Button();
|
||||||
BtnEliminar = new Button();
|
BtnEliminar = new Button();
|
||||||
BtnModificar = new Button();
|
dataGridView2 = new DataGridView();
|
||||||
|
label1 = new Label();
|
||||||
|
label2 = new Label();
|
||||||
groupBox1.SuspendLayout();
|
groupBox1.SuspendLayout();
|
||||||
((System.ComponentModel.ISupportInitialize)dataGridView1).BeginInit();
|
((System.ComponentModel.ISupportInitialize)dataGridView1).BeginInit();
|
||||||
|
((System.ComponentModel.ISupportInitialize)dataGridView2).BeginInit();
|
||||||
SuspendLayout();
|
SuspendLayout();
|
||||||
//
|
//
|
||||||
// groupBox1
|
// groupBox1
|
||||||
//
|
//
|
||||||
|
groupBox1.Controls.Add(label2);
|
||||||
groupBox1.Controls.Add(dataGridView1);
|
groupBox1.Controls.Add(dataGridView1);
|
||||||
groupBox1.Controls.Add(BtnAdd);
|
groupBox1.Controls.Add(BtnAdd);
|
||||||
groupBox1.Controls.Add(BtnEliminar);
|
groupBox1.Controls.Add(BtnEliminar);
|
||||||
groupBox1.Controls.Add(BtnModificar);
|
|
||||||
groupBox1.Location = new Point(12, 0);
|
groupBox1.Location = new Point(12, 0);
|
||||||
groupBox1.Name = "groupBox1";
|
groupBox1.Name = "groupBox1";
|
||||||
groupBox1.Size = new Size(776, 351);
|
groupBox1.Size = new Size(776, 351);
|
||||||
groupBox1.TabIndex = 5;
|
groupBox1.TabIndex = 5;
|
||||||
groupBox1.TabStop = false;
|
groupBox1.TabStop = false;
|
||||||
//
|
//
|
||||||
|
// button1
|
||||||
|
//
|
||||||
|
button1.Location = new Point(794, 302);
|
||||||
|
button1.Name = "button1";
|
||||||
|
button1.Size = new Size(128, 23);
|
||||||
|
button1.TabIndex = 4;
|
||||||
|
button1.Text = "Crear Categoria";
|
||||||
|
button1.UseVisualStyleBackColor = true;
|
||||||
|
button1.Click += button1_Click;
|
||||||
|
//
|
||||||
// dataGridView1
|
// dataGridView1
|
||||||
//
|
//
|
||||||
|
dataGridView1.AutoSizeColumnsMode = DataGridViewAutoSizeColumnsMode.Fill;
|
||||||
dataGridView1.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.AutoSize;
|
dataGridView1.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.AutoSize;
|
||||||
dataGridView1.Location = new Point(6, 22);
|
dataGridView1.Location = new Point(6, 22);
|
||||||
dataGridView1.Name = "dataGridView1";
|
dataGridView1.Name = "dataGridView1";
|
||||||
dataGridView1.RowTemplate.Height = 25;
|
dataGridView1.RowTemplate.Height = 25;
|
||||||
dataGridView1.Size = new Size(550, 235);
|
dataGridView1.SelectionMode = DataGridViewSelectionMode.FullRowSelect;
|
||||||
|
dataGridView1.Size = new Size(690, 235);
|
||||||
dataGridView1.TabIndex = 3;
|
dataGridView1.TabIndex = 3;
|
||||||
//
|
//
|
||||||
// BtnAdd
|
// BtnAdd
|
||||||
@@ -66,37 +82,64 @@
|
|||||||
BtnAdd.TabIndex = 0;
|
BtnAdd.TabIndex = 0;
|
||||||
BtnAdd.Text = "Añadir";
|
BtnAdd.Text = "Añadir";
|
||||||
BtnAdd.UseVisualStyleBackColor = true;
|
BtnAdd.UseVisualStyleBackColor = true;
|
||||||
|
BtnAdd.Click += BtnAdd_Click;
|
||||||
//
|
//
|
||||||
// BtnEliminar
|
// BtnEliminar
|
||||||
//
|
//
|
||||||
BtnEliminar.Location = new Point(215, 302);
|
BtnEliminar.Location = new Point(137, 302);
|
||||||
BtnEliminar.Name = "BtnEliminar";
|
BtnEliminar.Name = "BtnEliminar";
|
||||||
BtnEliminar.Size = new Size(75, 23);
|
BtnEliminar.Size = new Size(75, 23);
|
||||||
BtnEliminar.TabIndex = 2;
|
BtnEliminar.TabIndex = 2;
|
||||||
BtnEliminar.Text = "Eliminar";
|
BtnEliminar.Text = "Eliminar";
|
||||||
BtnEliminar.UseVisualStyleBackColor = true;
|
BtnEliminar.UseVisualStyleBackColor = true;
|
||||||
|
BtnEliminar.Click += BtnEliminar_Click;
|
||||||
//
|
//
|
||||||
// BtnModificar
|
// dataGridView2
|
||||||
//
|
//
|
||||||
BtnModificar.Location = new Point(108, 302);
|
dataGridView2.AutoSizeColumnsMode = DataGridViewAutoSizeColumnsMode.Fill;
|
||||||
BtnModificar.Name = "BtnModificar";
|
dataGridView2.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.AutoSize;
|
||||||
BtnModificar.Size = new Size(75, 23);
|
dataGridView2.Location = new Point(794, 22);
|
||||||
BtnModificar.TabIndex = 1;
|
dataGridView2.Name = "dataGridView2";
|
||||||
BtnModificar.Text = "Modificar";
|
dataGridView2.RowTemplate.Height = 25;
|
||||||
BtnModificar.UseVisualStyleBackColor = true;
|
dataGridView2.Size = new Size(250, 235);
|
||||||
|
dataGridView2.TabIndex = 6;
|
||||||
|
//
|
||||||
|
// label1
|
||||||
|
//
|
||||||
|
label1.AutoSize = true;
|
||||||
|
label1.Location = new Point(797, 4);
|
||||||
|
label1.Name = "label1";
|
||||||
|
label1.Size = new Size(63, 15);
|
||||||
|
label1.TabIndex = 7;
|
||||||
|
label1.Text = "Categorias";
|
||||||
|
//
|
||||||
|
// label2
|
||||||
|
//
|
||||||
|
label2.AutoSize = true;
|
||||||
|
label2.Location = new Point(6, 4);
|
||||||
|
label2.Name = "label2";
|
||||||
|
label2.Size = new Size(61, 15);
|
||||||
|
label2.TabIndex = 8;
|
||||||
|
label2.Text = "Productos";
|
||||||
//
|
//
|
||||||
// FrmProductos
|
// FrmProductos
|
||||||
//
|
//
|
||||||
AutoScaleDimensions = new SizeF(7F, 15F);
|
AutoScaleDimensions = new SizeF(7F, 15F);
|
||||||
AutoScaleMode = AutoScaleMode.Font;
|
AutoScaleMode = AutoScaleMode.Font;
|
||||||
ClientSize = new Size(800, 450);
|
ClientSize = new Size(1071, 450);
|
||||||
|
Controls.Add(label1);
|
||||||
|
Controls.Add(button1);
|
||||||
|
Controls.Add(dataGridView2);
|
||||||
Controls.Add(groupBox1);
|
Controls.Add(groupBox1);
|
||||||
Name = "FrmProductos";
|
Name = "FrmProductos";
|
||||||
Text = "Productos";
|
Text = "Productos";
|
||||||
WindowState = FormWindowState.Maximized;
|
WindowState = FormWindowState.Maximized;
|
||||||
groupBox1.ResumeLayout(false);
|
groupBox1.ResumeLayout(false);
|
||||||
|
groupBox1.PerformLayout();
|
||||||
((System.ComponentModel.ISupportInitialize)dataGridView1).EndInit();
|
((System.ComponentModel.ISupportInitialize)dataGridView1).EndInit();
|
||||||
|
((System.ComponentModel.ISupportInitialize)dataGridView2).EndInit();
|
||||||
ResumeLayout(false);
|
ResumeLayout(false);
|
||||||
|
PerformLayout();
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
@@ -105,6 +148,9 @@
|
|||||||
private DataGridView dataGridView1;
|
private DataGridView dataGridView1;
|
||||||
private Button BtnAdd;
|
private Button BtnAdd;
|
||||||
private Button BtnEliminar;
|
private Button BtnEliminar;
|
||||||
private Button BtnModificar;
|
private Button button1;
|
||||||
|
private DataGridView dataGridView2;
|
||||||
|
private Label label2;
|
||||||
|
private Label label1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1,4 +1,5 @@
|
|||||||
using System;
|
using Controladora;
|
||||||
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.ComponentModel;
|
using System.ComponentModel;
|
||||||
using System.Data;
|
using System.Data;
|
||||||
@@ -8,6 +9,12 @@ using System.Text;
|
|||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using System.Windows.Forms;
|
using System.Windows.Forms;
|
||||||
|
|
||||||
|
using System.Collections.ObjectModel;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Windows.Forms;
|
||||||
|
using Controladora;
|
||||||
|
using Entidades;
|
||||||
|
|
||||||
namespace Vista
|
namespace Vista
|
||||||
{
|
{
|
||||||
public partial class FrmProductos : Form
|
public partial class FrmProductos : Form
|
||||||
@@ -15,6 +22,139 @@ namespace Vista
|
|||||||
public FrmProductos()
|
public FrmProductos()
|
||||||
{
|
{
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
|
ConfigurarDataGridView();
|
||||||
|
ActualizarGrilla();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void ConfigurarDataGridView()
|
||||||
|
{
|
||||||
|
dataGridView1.AutoGenerateColumns = false;
|
||||||
|
|
||||||
|
// Crear una columna para el ID
|
||||||
|
var colId = new DataGridViewTextBoxColumn
|
||||||
|
{
|
||||||
|
DataPropertyName = "Id",
|
||||||
|
HeaderText = "ID",
|
||||||
|
Name = "colId"
|
||||||
|
};
|
||||||
|
|
||||||
|
// Crear una columna para el nombre
|
||||||
|
var colNombre = new DataGridViewTextBoxColumn
|
||||||
|
{
|
||||||
|
DataPropertyName = "Nombre",
|
||||||
|
HeaderText = "Nombre",
|
||||||
|
Name = "colNombre"
|
||||||
|
};
|
||||||
|
|
||||||
|
// Crear una columna para el precio
|
||||||
|
var colPrecio = new DataGridViewTextBoxColumn
|
||||||
|
{
|
||||||
|
DataPropertyName = "Precio",
|
||||||
|
HeaderText = "Precio",
|
||||||
|
Name = "colPrecio"
|
||||||
|
};
|
||||||
|
var colHabilitado = new DataGridViewTextBoxColumn
|
||||||
|
{
|
||||||
|
DataPropertyName = "Habilitado",
|
||||||
|
HeaderText = "Habilitado",
|
||||||
|
Name = "colHabilitado"
|
||||||
|
};
|
||||||
|
// Crear una columna para la categoría (mostrando la descripción)
|
||||||
|
var colCategoria = new DataGridViewTextBoxColumn
|
||||||
|
{
|
||||||
|
DataPropertyName = "CategoriaDescripcion",
|
||||||
|
HeaderText = "Categoría",
|
||||||
|
Name = "colCategoria"
|
||||||
|
};
|
||||||
|
|
||||||
|
// Agregar las columnas al DataGridView
|
||||||
|
dataGridView1.Columns.Add(colId);
|
||||||
|
dataGridView1.Columns.Add(colNombre);
|
||||||
|
dataGridView1.Columns.Add(colPrecio);
|
||||||
|
dataGridView1.Columns.Add(colHabilitado);
|
||||||
|
dataGridView1.Columns.Add(colCategoria);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void ActualizarGrilla()
|
||||||
|
{
|
||||||
|
dataGridView1.DataSource = null;
|
||||||
|
dataGridView2.DataSource = null;
|
||||||
|
var categorias = ControladoraCategorias.Instance.Listar();
|
||||||
|
dataGridView2.DataSource = categorias;
|
||||||
|
|
||||||
|
// Obtener la lista de productos y proyectar los datos
|
||||||
|
var productos = ControladoraProductos.Instance.Listar()
|
||||||
|
.Select(p => new
|
||||||
|
{
|
||||||
|
p.Id,
|
||||||
|
p.Nombre,
|
||||||
|
p.Precio,
|
||||||
|
p.Habilitado,
|
||||||
|
CategoriaDescripcion = p.Categoria != null ? p.Categoria.Descripcion : string.Empty
|
||||||
|
})
|
||||||
|
.ToList();
|
||||||
|
|
||||||
|
dataGridView1.DataSource = productos;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void BtnAdd_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
var form = new FrmProducto();
|
||||||
|
form.ShowDialog();
|
||||||
|
ActualizarGrilla();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void button1_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
var form = new CategoriaCreate();
|
||||||
|
form.ShowDialog();
|
||||||
|
ActualizarGrilla();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
private void BtnEliminar_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
if (dataGridView1.SelectedRows.Count == 0)
|
||||||
|
{
|
||||||
|
MessageBox.Show("Seleccione una línea para eliminar");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Recorre las filas seleccionadas
|
||||||
|
foreach (DataGridViewRow fila in dataGridView1.SelectedRows)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
// Obtén el ID del producto desde la columna "colId"
|
||||||
|
int id = Convert.ToInt32(fila.Cells["colId"].Value);
|
||||||
|
|
||||||
|
// Busca el producto con el ID correspondiente
|
||||||
|
var producto = ControladoraProductos.Instance.Listar().FirstOrDefault(p => p.Id == id);
|
||||||
|
|
||||||
|
if (producto != null)
|
||||||
|
{
|
||||||
|
// Llama al método Eliminar pasando el objeto Producto
|
||||||
|
string devolucion = ControladoraProductos.Instance.Eliminar(producto);
|
||||||
|
MessageBox.Show(devolucion);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
MessageBox.Show($"No se encontró el producto con el ID {id}");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
MessageBox.Show($"Error al eliminar el producto: {ex.Message}");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Actualiza la grilla después de eliminar
|
||||||
|
ActualizarGrilla();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
2
Vista/FrmProveedores.Designer.cs
generated
2
Vista/FrmProveedores.Designer.cs
generated
@@ -55,7 +55,7 @@
|
|||||||
dataGridView1.AllowUserToDeleteRows = false;
|
dataGridView1.AllowUserToDeleteRows = false;
|
||||||
dataGridView1.AllowUserToResizeColumns = false;
|
dataGridView1.AllowUserToResizeColumns = false;
|
||||||
dataGridView1.AllowUserToResizeRows = false;
|
dataGridView1.AllowUserToResizeRows = false;
|
||||||
dataGridView1.AutoSizeColumnsMode = DataGridViewAutoSizeColumnsMode.AllCells;
|
dataGridView1.AutoSizeColumnsMode = DataGridViewAutoSizeColumnsMode.Fill;
|
||||||
dataGridView1.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.AutoSize;
|
dataGridView1.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.AutoSize;
|
||||||
dataGridView1.Location = new Point(6, 22);
|
dataGridView1.Location = new Point(6, 22);
|
||||||
dataGridView1.Name = "dataGridView1";
|
dataGridView1.Name = "dataGridView1";
|
||||||
|
|||||||
@@ -18,7 +18,7 @@
|
|||||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||||
<data name="Color1" type="System.Drawing.Color, System.Drawing"">Blue</data>
|
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||||
</data>
|
</data>
|
||||||
|
|||||||
1
Vista/FrmRemitos.Designer.cs
generated
1
Vista/FrmRemitos.Designer.cs
generated
@@ -47,6 +47,7 @@
|
|||||||
//
|
//
|
||||||
// dataGridView1
|
// dataGridView1
|
||||||
//
|
//
|
||||||
|
dataGridView1.AutoSizeColumnsMode = DataGridViewAutoSizeColumnsMode.Fill;
|
||||||
dataGridView1.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.AutoSize;
|
dataGridView1.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.AutoSize;
|
||||||
dataGridView1.Location = new Point(6, 22);
|
dataGridView1.Location = new Point(6, 22);
|
||||||
dataGridView1.Name = "dataGridView1";
|
dataGridView1.Name = "dataGridView1";
|
||||||
|
|||||||
@@ -1,6 +1,15 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<Project ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
<Project ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
<Compile Update="CategoriaCreate.cs">
|
||||||
|
<SubType>Form</SubType>
|
||||||
|
</Compile>
|
||||||
|
<Compile Update="AddProducto.cs">
|
||||||
|
<SubType>Form</SubType>
|
||||||
|
</Compile>
|
||||||
|
<Compile Update="FrmPresupuesto.cs">
|
||||||
|
<SubType>Form</SubType>
|
||||||
|
</Compile>
|
||||||
<Compile Update="FrmCliente.cs">
|
<Compile Update="FrmCliente.cs">
|
||||||
<SubType>Form</SubType>
|
<SubType>Form</SubType>
|
||||||
</Compile>
|
</Compile>
|
||||||
@@ -13,6 +22,9 @@
|
|||||||
<Compile Update="FrmOrdenDeCompra.cs">
|
<Compile Update="FrmOrdenDeCompra.cs">
|
||||||
<SubType>Form</SubType>
|
<SubType>Form</SubType>
|
||||||
</Compile>
|
</Compile>
|
||||||
|
<Compile Update="FrmProducto.cs">
|
||||||
|
<SubType>Form</SubType>
|
||||||
|
</Compile>
|
||||||
<Compile Update="FrmProveedor.cs">
|
<Compile Update="FrmProveedor.cs">
|
||||||
<SubType>Form</SubType>
|
<SubType>Form</SubType>
|
||||||
</Compile>
|
</Compile>
|
||||||
|
|||||||
@@ -12,6 +12,7 @@ build_property.RootNamespace = Vista
|
|||||||
<<<<<<< HEAD
|
<<<<<<< HEAD
|
||||||
<<<<<<< HEAD
|
<<<<<<< HEAD
|
||||||
<<<<<<< HEAD
|
<<<<<<< HEAD
|
||||||
|
<<<<<<< HEAD
|
||||||
build_property.ProjectDir = /home/fede/proyectos/Final_OOP/Vista/
|
build_property.ProjectDir = /home/fede/proyectos/Final_OOP/Vista/
|
||||||
=======
|
=======
|
||||||
build_property.ProjectDir = C:\Users\Nacho\source\repos\Final\Vista\
|
build_property.ProjectDir = C:\Users\Nacho\source\repos\Final\Vista\
|
||||||
@@ -27,3 +28,6 @@ build_property.ProjectDir = C:\Users\fedpo\Downloads\Final\Final\Vista\
|
|||||||
=======
|
=======
|
||||||
build_property.ProjectDir = C:\Users\fedpo\source\repos\Final_OOP\Vista\
|
build_property.ProjectDir = C:\Users\fedpo\source\repos\Final_OOP\Vista\
|
||||||
>>>>>>> 51676e6 (feat: Cambios Varios (mirar Desc))
|
>>>>>>> 51676e6 (feat: Cambios Varios (mirar Desc))
|
||||||
|
=======
|
||||||
|
build_property.ProjectDir = C:\Users\fedpo\Downloads\Final\Final\Vista\
|
||||||
|
>>>>>>> c493033 (cosas que faltaban)
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -3,6 +3,7 @@
|
|||||||
"restore": {
|
"restore": {
|
||||||
<<<<<<< HEAD
|
<<<<<<< HEAD
|
||||||
<<<<<<< HEAD
|
<<<<<<< HEAD
|
||||||
|
<<<<<<< HEAD
|
||||||
<<<<<<< HEAD
|
<<<<<<< HEAD
|
||||||
"/home/fede/proyectos/Final_OOP/Vista/Vista.csproj": {}
|
"/home/fede/proyectos/Final_OOP/Vista/Vista.csproj": {}
|
||||||
},
|
},
|
||||||
@@ -23,16 +24,19 @@
|
|||||||
=======
|
=======
|
||||||
"C:\\Users\\fedpo\\source\\repos\\Final_OOP\\Vista\\Vista.csproj": {}
|
"C:\\Users\\fedpo\\source\\repos\\Final_OOP\\Vista\\Vista.csproj": {}
|
||||||
>>>>>>> 51676e6 (feat: Cambios Varios (mirar Desc))
|
>>>>>>> 51676e6 (feat: Cambios Varios (mirar Desc))
|
||||||
|
=======
|
||||||
|
"C:\\Users\\fedpo\\Downloads\\Final\\Final\\Vista\\Vista.csproj": {}
|
||||||
|
>>>>>>> c493033 (cosas que faltaban)
|
||||||
},
|
},
|
||||||
"projects": {
|
"projects": {
|
||||||
"C:\\Users\\fedpo\\source\\repos\\Final_OOP\\Controladora\\Controladora.csproj": {
|
"C:\\Users\\fedpo\\Downloads\\Final\\Final\\Controladora\\Controladora.csproj": {
|
||||||
"version": "1.0.0",
|
"version": "1.0.0",
|
||||||
"restore": {
|
"restore": {
|
||||||
"projectUniqueName": "C:\\Users\\fedpo\\source\\repos\\Final_OOP\\Controladora\\Controladora.csproj",
|
"projectUniqueName": "C:\\Users\\fedpo\\Downloads\\Final\\Final\\Controladora\\Controladora.csproj",
|
||||||
"projectName": "Controladora",
|
"projectName": "Controladora",
|
||||||
"projectPath": "C:\\Users\\fedpo\\source\\repos\\Final_OOP\\Controladora\\Controladora.csproj",
|
"projectPath": "C:\\Users\\fedpo\\Downloads\\Final\\Final\\Controladora\\Controladora.csproj",
|
||||||
"packagesPath": "C:\\Users\\fedpo\\.nuget\\packages\\",
|
"packagesPath": "C:\\Users\\fedpo\\.nuget\\packages\\",
|
||||||
"outputPath": "C:\\Users\\fedpo\\source\\repos\\Final_OOP\\Controladora\\obj\\",
|
"outputPath": "C:\\Users\\fedpo\\Downloads\\Final\\Final\\Controladora\\obj\\",
|
||||||
"projectStyle": "PackageReference",
|
"projectStyle": "PackageReference",
|
||||||
"configFilePaths": [
|
"configFilePaths": [
|
||||||
"C:\\Users\\fedpo\\AppData\\Roaming\\NuGet\\NuGet.Config",
|
"C:\\Users\\fedpo\\AppData\\Roaming\\NuGet\\NuGet.Config",
|
||||||
@@ -50,11 +54,11 @@
|
|||||||
"net6.0": {
|
"net6.0": {
|
||||||
"targetAlias": "net6.0",
|
"targetAlias": "net6.0",
|
||||||
"projectReferences": {
|
"projectReferences": {
|
||||||
"C:\\Users\\fedpo\\source\\repos\\Final_OOP\\Entidades\\Entidades.csproj": {
|
"C:\\Users\\fedpo\\Downloads\\Final\\Final\\Entidades\\Entidades.csproj": {
|
||||||
"projectPath": "C:\\Users\\fedpo\\source\\repos\\Final_OOP\\Entidades\\Entidades.csproj"
|
"projectPath": "C:\\Users\\fedpo\\Downloads\\Final\\Final\\Entidades\\Entidades.csproj"
|
||||||
},
|
},
|
||||||
"C:\\Users\\fedpo\\source\\repos\\Final_OOP\\Modelo\\Modelo.csproj": {
|
"C:\\Users\\fedpo\\Downloads\\Final\\Final\\Modelo\\Modelo.csproj": {
|
||||||
"projectPath": "C:\\Users\\fedpo\\source\\repos\\Final_OOP\\Modelo\\Modelo.csproj"
|
"projectPath": "C:\\Users\\fedpo\\Downloads\\Final\\Final\\Modelo\\Modelo.csproj"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -68,16 +72,6 @@
|
|||||||
"frameworks": {
|
"frameworks": {
|
||||||
"net6.0": {
|
"net6.0": {
|
||||||
"targetAlias": "net6.0",
|
"targetAlias": "net6.0",
|
||||||
"dependencies": {
|
|
||||||
"Emailer": {
|
|
||||||
"target": "Package",
|
|
||||||
"version": "[1.0.0, )"
|
|
||||||
},
|
|
||||||
"webhookSharp": {
|
|
||||||
"target": "Package",
|
|
||||||
"version": "[1.0.0, )"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"imports": [
|
"imports": [
|
||||||
"net461",
|
"net461",
|
||||||
"net462",
|
"net462",
|
||||||
@@ -98,14 +92,14 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"C:\\Users\\fedpo\\source\\repos\\Final_OOP\\Entidades\\Entidades.csproj": {
|
"C:\\Users\\fedpo\\Downloads\\Final\\Final\\Entidades\\Entidades.csproj": {
|
||||||
"version": "1.0.0",
|
"version": "1.0.0",
|
||||||
"restore": {
|
"restore": {
|
||||||
"projectUniqueName": "C:\\Users\\fedpo\\source\\repos\\Final_OOP\\Entidades\\Entidades.csproj",
|
"projectUniqueName": "C:\\Users\\fedpo\\Downloads\\Final\\Final\\Entidades\\Entidades.csproj",
|
||||||
"projectName": "Entidades",
|
"projectName": "Entidades",
|
||||||
"projectPath": "C:\\Users\\fedpo\\source\\repos\\Final_OOP\\Entidades\\Entidades.csproj",
|
"projectPath": "C:\\Users\\fedpo\\Downloads\\Final\\Final\\Entidades\\Entidades.csproj",
|
||||||
"packagesPath": "C:\\Users\\fedpo\\.nuget\\packages\\",
|
"packagesPath": "C:\\Users\\fedpo\\.nuget\\packages\\",
|
||||||
"outputPath": "C:\\Users\\fedpo\\source\\repos\\Final_OOP\\Entidades\\obj\\",
|
"outputPath": "C:\\Users\\fedpo\\Downloads\\Final\\Final\\Entidades\\obj\\",
|
||||||
"projectStyle": "PackageReference",
|
"projectStyle": "PackageReference",
|
||||||
"configFilePaths": [
|
"configFilePaths": [
|
||||||
"C:\\Users\\fedpo\\AppData\\Roaming\\NuGet\\NuGet.Config",
|
"C:\\Users\\fedpo\\AppData\\Roaming\\NuGet\\NuGet.Config",
|
||||||
@@ -154,9 +148,10 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"C:\\Users\\fedpo\\source\\repos\\Final_OOP\\Modelo\\Modelo.csproj": {
|
"C:\\Users\\fedpo\\Downloads\\Final\\Final\\Modelo\\Modelo.csproj": {
|
||||||
"version": "1.0.0",
|
"version": "1.0.0",
|
||||||
"restore": {
|
"restore": {
|
||||||
|
<<<<<<< HEAD
|
||||||
<<<<<<< HEAD
|
<<<<<<< HEAD
|
||||||
"projectUniqueName": "C:\\Users\\Nacho\\Source\\Repos\\Final_OOP\\Vista\\Vista.csproj",
|
"projectUniqueName": "C:\\Users\\Nacho\\Source\\Repos\\Final_OOP\\Vista\\Vista.csproj",
|
||||||
"projectName": "Vista",
|
"projectName": "Vista",
|
||||||
@@ -173,10 +168,13 @@
|
|||||||
"/home/fede/.nuget/NuGet/NuGet.Config"
|
"/home/fede/.nuget/NuGet/NuGet.Config"
|
||||||
=======
|
=======
|
||||||
"projectUniqueName": "C:\\Users\\fedpo\\source\\repos\\Final_OOP\\Modelo\\Modelo.csproj",
|
"projectUniqueName": "C:\\Users\\fedpo\\source\\repos\\Final_OOP\\Modelo\\Modelo.csproj",
|
||||||
|
=======
|
||||||
|
"projectUniqueName": "C:\\Users\\fedpo\\Downloads\\Final\\Final\\Modelo\\Modelo.csproj",
|
||||||
|
>>>>>>> c493033 (cosas que faltaban)
|
||||||
"projectName": "Modelo",
|
"projectName": "Modelo",
|
||||||
"projectPath": "C:\\Users\\fedpo\\source\\repos\\Final_OOP\\Modelo\\Modelo.csproj",
|
"projectPath": "C:\\Users\\fedpo\\Downloads\\Final\\Final\\Modelo\\Modelo.csproj",
|
||||||
"packagesPath": "C:\\Users\\fedpo\\.nuget\\packages\\",
|
"packagesPath": "C:\\Users\\fedpo\\.nuget\\packages\\",
|
||||||
"outputPath": "C:\\Users\\fedpo\\source\\repos\\Final_OOP\\Modelo\\obj\\",
|
"outputPath": "C:\\Users\\fedpo\\Downloads\\Final\\Final\\Modelo\\obj\\",
|
||||||
"projectStyle": "PackageReference",
|
"projectStyle": "PackageReference",
|
||||||
"configFilePaths": [
|
"configFilePaths": [
|
||||||
"C:\\Users\\fedpo\\AppData\\Roaming\\NuGet\\NuGet.Config",
|
"C:\\Users\\fedpo\\AppData\\Roaming\\NuGet\\NuGet.Config",
|
||||||
@@ -398,8 +396,13 @@
|
|||||||
"net6.0": {
|
"net6.0": {
|
||||||
"targetAlias": "net6.0",
|
"targetAlias": "net6.0",
|
||||||
"projectReferences": {
|
"projectReferences": {
|
||||||
|
<<<<<<< HEAD
|
||||||
"/home/fede/proyectos/Final_OOP/Entidades/Entidades.csproj": {
|
"/home/fede/proyectos/Final_OOP/Entidades/Entidades.csproj": {
|
||||||
"projectPath": "/home/fede/proyectos/Final_OOP/Entidades/Entidades.csproj"
|
"projectPath": "/home/fede/proyectos/Final_OOP/Entidades/Entidades.csproj"
|
||||||
|
=======
|
||||||
|
"C:\\Users\\fedpo\\Downloads\\Final\\Final\\Entidades\\Entidades.csproj": {
|
||||||
|
"projectPath": "C:\\Users\\fedpo\\Downloads\\Final\\Final\\Entidades\\Entidades.csproj"
|
||||||
|
>>>>>>> c493033 (cosas que faltaban)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -443,6 +446,7 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
<<<<<<< HEAD
|
||||||
"/home/fede/proyectos/Final_OOP/Vista/Vista.csproj": {
|
"/home/fede/proyectos/Final_OOP/Vista/Vista.csproj": {
|
||||||
"version": "1.0.0",
|
"version": "1.0.0",
|
||||||
"restore": {
|
"restore": {
|
||||||
@@ -451,6 +455,16 @@
|
|||||||
"projectPath": "/home/fede/proyectos/Final_OOP/Vista/Vista.csproj",
|
"projectPath": "/home/fede/proyectos/Final_OOP/Vista/Vista.csproj",
|
||||||
"packagesPath": "/home/fede/.nuget/packages/",
|
"packagesPath": "/home/fede/.nuget/packages/",
|
||||||
"outputPath": "/home/fede/proyectos/Final_OOP/Vista/obj/",
|
"outputPath": "/home/fede/proyectos/Final_OOP/Vista/obj/",
|
||||||
|
=======
|
||||||
|
"C:\\Users\\fedpo\\Downloads\\Final\\Final\\Vista\\Vista.csproj": {
|
||||||
|
"version": "1.0.0",
|
||||||
|
"restore": {
|
||||||
|
"projectUniqueName": "C:\\Users\\fedpo\\Downloads\\Final\\Final\\Vista\\Vista.csproj",
|
||||||
|
"projectName": "Vista",
|
||||||
|
"projectPath": "C:\\Users\\fedpo\\Downloads\\Final\\Final\\Vista\\Vista.csproj",
|
||||||
|
"packagesPath": "C:\\Users\\fedpo\\.nuget\\packages\\",
|
||||||
|
"outputPath": "C:\\Users\\fedpo\\Downloads\\Final\\Final\\Vista\\obj\\",
|
||||||
|
>>>>>>> c493033 (cosas que faltaban)
|
||||||
"projectStyle": "PackageReference",
|
"projectStyle": "PackageReference",
|
||||||
"configFilePaths": [
|
"configFilePaths": [
|
||||||
"/home/fede/.nuget/NuGet/NuGet.Config"
|
"/home/fede/.nuget/NuGet/NuGet.Config"
|
||||||
@@ -466,6 +480,7 @@
|
|||||||
"net6.0-windows7.0": {
|
"net6.0-windows7.0": {
|
||||||
"targetAlias": "net6.0-windows",
|
"targetAlias": "net6.0-windows",
|
||||||
"projectReferences": {
|
"projectReferences": {
|
||||||
|
<<<<<<< HEAD
|
||||||
"/home/fede/proyectos/Final_OOP/Controladora/Controladora.csproj": {
|
"/home/fede/proyectos/Final_OOP/Controladora/Controladora.csproj": {
|
||||||
"projectPath": "/home/fede/proyectos/Final_OOP/Controladora/Controladora.csproj"
|
"projectPath": "/home/fede/proyectos/Final_OOP/Controladora/Controladora.csproj"
|
||||||
},
|
},
|
||||||
@@ -481,6 +496,13 @@
|
|||||||
"C:\\Users\\fedpo\\source\\repos\\Final_OOP\\Entidades\\Entidades.csproj": {
|
"C:\\Users\\fedpo\\source\\repos\\Final_OOP\\Entidades\\Entidades.csproj": {
|
||||||
"projectPath": "C:\\Users\\fedpo\\source\\repos\\Final_OOP\\Entidades\\Entidades.csproj"
|
"projectPath": "C:\\Users\\fedpo\\source\\repos\\Final_OOP\\Entidades\\Entidades.csproj"
|
||||||
>>>>>>> 51676e6 (feat: Cambios Varios (mirar Desc))
|
>>>>>>> 51676e6 (feat: Cambios Varios (mirar Desc))
|
||||||
|
=======
|
||||||
|
"C:\\Users\\fedpo\\Downloads\\Final\\Final\\Controladora\\Controladora.csproj": {
|
||||||
|
"projectPath": "C:\\Users\\fedpo\\Downloads\\Final\\Final\\Controladora\\Controladora.csproj"
|
||||||
|
},
|
||||||
|
"C:\\Users\\fedpo\\Downloads\\Final\\Final\\Entidades\\Entidades.csproj": {
|
||||||
|
"projectPath": "C:\\Users\\fedpo\\Downloads\\Final\\Final\\Entidades\\Entidades.csproj"
|
||||||
|
>>>>>>> c493033 (cosas que faltaban)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -26,10 +26,13 @@
|
|||||||
<ItemGroup Condition=" '$(ExcludeRestorePackageImports)' != 'true' ">
|
<ItemGroup Condition=" '$(ExcludeRestorePackageImports)' != 'true' ">
|
||||||
<SourceRoot Include="C:\Users\fedpo\.nuget\packages\" />
|
<SourceRoot Include="C:\Users\fedpo\.nuget\packages\" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
<<<<<<< HEAD
|
||||||
<PropertyGroup Condition=" '$(ExcludeRestorePackageImports)' != 'true' ">
|
<PropertyGroup Condition=" '$(ExcludeRestorePackageImports)' != 'true' ">
|
||||||
<PkgNewtonsoft_Json Condition=" '$(PkgNewtonsoft_Json)' == '' ">C:\Users\fedpo\.nuget\packages\newtonsoft.json\10.0.1</PkgNewtonsoft_Json>
|
<PkgNewtonsoft_Json Condition=" '$(PkgNewtonsoft_Json)' == '' ">C:\Users\fedpo\.nuget\packages\newtonsoft.json\10.0.1</PkgNewtonsoft_Json>
|
||||||
<PkgMicrosoft_EntityFrameworkCore_Tools Condition=" '$(PkgMicrosoft_EntityFrameworkCore_Tools)' == '' ">C:\Users\fedpo\.nuget\packages\microsoft.entityframeworkcore.tools\2.0.2</PkgMicrosoft_EntityFrameworkCore_Tools>
|
<PkgMicrosoft_EntityFrameworkCore_Tools Condition=" '$(PkgMicrosoft_EntityFrameworkCore_Tools)' == '' ">C:\Users\fedpo\.nuget\packages\microsoft.entityframeworkcore.tools\2.0.2</PkgMicrosoft_EntityFrameworkCore_Tools>
|
||||||
<PkgMicrosoft_CodeAnalysis_Analyzers Condition=" '$(PkgMicrosoft_CodeAnalysis_Analyzers)' == '' ">C:\Users\fedpo\.nuget\packages\microsoft.codeanalysis.analyzers\1.1.0</PkgMicrosoft_CodeAnalysis_Analyzers>
|
<PkgMicrosoft_CodeAnalysis_Analyzers Condition=" '$(PkgMicrosoft_CodeAnalysis_Analyzers)' == '' ">C:\Users\fedpo\.nuget\packages\microsoft.codeanalysis.analyzers\1.1.0</PkgMicrosoft_CodeAnalysis_Analyzers>
|
||||||
>>>>>>> 51676e6 (feat: Cambios Varios (mirar Desc))
|
>>>>>>> 51676e6 (feat: Cambios Varios (mirar Desc))
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
=======
|
||||||
|
>>>>>>> c493033 (cosas que faltaban)
|
||||||
</Project>
|
</Project>
|
||||||
@@ -4,6 +4,7 @@
|
|||||||
"net6.0-windows7.0": {
|
"net6.0-windows7.0": {
|
||||||
<<<<<<< HEAD
|
<<<<<<< HEAD
|
||||||
<<<<<<< HEAD
|
<<<<<<< HEAD
|
||||||
|
<<<<<<< HEAD
|
||||||
=======
|
=======
|
||||||
>>>>>>> 51676e6 (feat: Cambios Varios (mirar Desc))
|
>>>>>>> 51676e6 (feat: Cambios Varios (mirar Desc))
|
||||||
"Emailer/1.0.0": {
|
"Emailer/1.0.0": {
|
||||||
@@ -5439,14 +5440,14 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
=======
|
||||||
|
>>>>>>> c493033 (cosas que faltaban)
|
||||||
"Controladora/1.0.0": {
|
"Controladora/1.0.0": {
|
||||||
"type": "project",
|
"type": "project",
|
||||||
"framework": ".NETCoreApp,Version=v6.0",
|
"framework": ".NETCoreApp,Version=v6.0",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"Emailer": "1.0.0",
|
|
||||||
"Entidades": "1.0.0",
|
"Entidades": "1.0.0",
|
||||||
"Modelo": "1.0.0",
|
"Modelo": "1.0.0"
|
||||||
"webhookSharp": "1.0.0"
|
|
||||||
},
|
},
|
||||||
"compile": {
|
"compile": {
|
||||||
"bin/placeholder/Controladora.dll": {}
|
"bin/placeholder/Controladora.dll": {}
|
||||||
@@ -5497,6 +5498,7 @@
|
|||||||
"libraries": {
|
"libraries": {
|
||||||
<<<<<<< HEAD
|
<<<<<<< HEAD
|
||||||
<<<<<<< HEAD
|
<<<<<<< HEAD
|
||||||
|
<<<<<<< HEAD
|
||||||
=======
|
=======
|
||||||
>>>>>>> 51676e6 (feat: Cambios Varios (mirar Desc))
|
>>>>>>> 51676e6 (feat: Cambios Varios (mirar Desc))
|
||||||
"Emailer/1.0.0": {
|
"Emailer/1.0.0": {
|
||||||
@@ -13488,6 +13490,8 @@
|
|||||||
"windowsazure.storage.nuspec"
|
"windowsazure.storage.nuspec"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
=======
|
||||||
|
>>>>>>> c493033 (cosas que faltaban)
|
||||||
"Controladora/1.0.0": {
|
"Controladora/1.0.0": {
|
||||||
"type": "project",
|
"type": "project",
|
||||||
"path": "../Controladora/Controladora.csproj",
|
"path": "../Controladora/Controladora.csproj",
|
||||||
@@ -13543,6 +13547,7 @@
|
|||||||
"restore": {
|
"restore": {
|
||||||
<<<<<<< HEAD
|
<<<<<<< HEAD
|
||||||
<<<<<<< HEAD
|
<<<<<<< HEAD
|
||||||
|
<<<<<<< HEAD
|
||||||
<<<<<<< HEAD
|
<<<<<<< HEAD
|
||||||
"projectUniqueName": "/home/fede/proyectos/Final_OOP/Vista/Vista.csproj",
|
"projectUniqueName": "/home/fede/proyectos/Final_OOP/Vista/Vista.csproj",
|
||||||
"projectName": "Vista",
|
"projectName": "Vista",
|
||||||
@@ -13568,10 +13573,13 @@
|
|||||||
"/home/fede/.nuget/NuGet/NuGet.Config"
|
"/home/fede/.nuget/NuGet/NuGet.Config"
|
||||||
=======
|
=======
|
||||||
"projectUniqueName": "C:\\Users\\fedpo\\source\\repos\\Final_OOP\\Vista\\Vista.csproj",
|
"projectUniqueName": "C:\\Users\\fedpo\\source\\repos\\Final_OOP\\Vista\\Vista.csproj",
|
||||||
|
=======
|
||||||
|
"projectUniqueName": "C:\\Users\\fedpo\\Downloads\\Final\\Final\\Vista\\Vista.csproj",
|
||||||
|
>>>>>>> c493033 (cosas que faltaban)
|
||||||
"projectName": "Vista",
|
"projectName": "Vista",
|
||||||
"projectPath": "C:\\Users\\fedpo\\source\\repos\\Final_OOP\\Vista\\Vista.csproj",
|
"projectPath": "C:\\Users\\fedpo\\Downloads\\Final\\Final\\Vista\\Vista.csproj",
|
||||||
"packagesPath": "C:\\Users\\fedpo\\.nuget\\packages\\",
|
"packagesPath": "C:\\Users\\fedpo\\.nuget\\packages\\",
|
||||||
"outputPath": "C:\\Users\\fedpo\\source\\repos\\Final_OOP\\Vista\\obj\\",
|
"outputPath": "C:\\Users\\fedpo\\Downloads\\Final\\Final\\Vista\\obj\\",
|
||||||
"projectStyle": "PackageReference",
|
"projectStyle": "PackageReference",
|
||||||
"configFilePaths": [
|
"configFilePaths": [
|
||||||
"C:\\Users\\fedpo\\AppData\\Roaming\\NuGet\\NuGet.Config",
|
"C:\\Users\\fedpo\\AppData\\Roaming\\NuGet\\NuGet.Config",
|
||||||
@@ -13595,6 +13603,7 @@
|
|||||||
"projectReferences": {
|
"projectReferences": {
|
||||||
<<<<<<< HEAD
|
<<<<<<< HEAD
|
||||||
<<<<<<< HEAD
|
<<<<<<< HEAD
|
||||||
|
<<<<<<< HEAD
|
||||||
<<<<<<< HEAD
|
<<<<<<< HEAD
|
||||||
"/home/fede/proyectos/Final_OOP/Controladora/Controladora.csproj": {
|
"/home/fede/proyectos/Final_OOP/Controladora/Controladora.csproj": {
|
||||||
"projectPath": "/home/fede/proyectos/Final_OOP/Controladora/Controladora.csproj"
|
"projectPath": "/home/fede/proyectos/Final_OOP/Controladora/Controladora.csproj"
|
||||||
@@ -13616,6 +13625,13 @@
|
|||||||
"C:\\Users\\fedpo\\source\\repos\\Final_OOP\\Entidades\\Entidades.csproj": {
|
"C:\\Users\\fedpo\\source\\repos\\Final_OOP\\Entidades\\Entidades.csproj": {
|
||||||
"projectPath": "C:\\Users\\fedpo\\source\\repos\\Final_OOP\\Entidades\\Entidades.csproj"
|
"projectPath": "C:\\Users\\fedpo\\source\\repos\\Final_OOP\\Entidades\\Entidades.csproj"
|
||||||
>>>>>>> 51676e6 (feat: Cambios Varios (mirar Desc))
|
>>>>>>> 51676e6 (feat: Cambios Varios (mirar Desc))
|
||||||
|
=======
|
||||||
|
"C:\\Users\\fedpo\\Downloads\\Final\\Final\\Controladora\\Controladora.csproj": {
|
||||||
|
"projectPath": "C:\\Users\\fedpo\\Downloads\\Final\\Final\\Controladora\\Controladora.csproj"
|
||||||
|
},
|
||||||
|
"C:\\Users\\fedpo\\Downloads\\Final\\Final\\Entidades\\Entidades.csproj": {
|
||||||
|
"projectPath": "C:\\Users\\fedpo\\Downloads\\Final\\Final\\Entidades\\Entidades.csproj"
|
||||||
|
>>>>>>> c493033 (cosas que faltaban)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,6 +2,7 @@
|
|||||||
"version": 2,
|
"version": 2,
|
||||||
<<<<<<< HEAD
|
<<<<<<< HEAD
|
||||||
<<<<<<< HEAD
|
<<<<<<< HEAD
|
||||||
|
<<<<<<< HEAD
|
||||||
<<<<<<< HEAD
|
<<<<<<< HEAD
|
||||||
"dgSpecHash": "NrgVcMaE+xOpA8UnmFhQwGflGRDAICnz8EffGQ+5vJrqniVecS26UDqJMYcJ2SmlijA3PT49NDmcrKADdBbkcQ==",
|
"dgSpecHash": "NrgVcMaE+xOpA8UnmFhQwGflGRDAICnz8EffGQ+5vJrqniVecS26UDqJMYcJ2SmlijA3PT49NDmcrKADdBbkcQ==",
|
||||||
"success": true,
|
"success": true,
|
||||||
@@ -610,5 +611,11 @@
|
|||||||
"C:\\Users\\fedpo\\.nuget\\packages\\windowsazure.storage\\8.1.4\\windowsazure.storage.8.1.4.nupkg.sha512"
|
"C:\\Users\\fedpo\\.nuget\\packages\\windowsazure.storage\\8.1.4\\windowsazure.storage.8.1.4.nupkg.sha512"
|
||||||
],
|
],
|
||||||
>>>>>>> 51676e6 (feat: Cambios Varios (mirar Desc))
|
>>>>>>> 51676e6 (feat: Cambios Varios (mirar Desc))
|
||||||
|
=======
|
||||||
|
"dgSpecHash": "aNFbNdDa22Mg1jfOxDzb7N16RdBndEphnWuh1X0WK6h4YNDptQDhQUjqbwCKBPcpGb6LmtlDSztOIxoXuc2UXQ==",
|
||||||
|
"success": true,
|
||||||
|
"projectFilePath": "C:\\Users\\fedpo\\Downloads\\Final\\Final\\Vista\\Vista.csproj",
|
||||||
|
"expectedPackageFiles": [],
|
||||||
|
>>>>>>> c493033 (cosas que faltaban)
|
||||||
"logs": []
|
"logs": []
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user