Compare commits
19 Commits
informes
...
f03870d284
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f03870d284 | ||
|
|
d9b810b550 | ||
|
|
88e614d538 | ||
|
|
5b7ee8c6bc | ||
|
|
a323a5cca1 | ||
|
|
6f5e78e5ef | ||
|
|
6dcfe4ddca | ||
|
|
c3fb675532 | ||
|
|
513e060309 | ||
|
|
8e394af47a | ||
|
|
51cffafb9f | ||
|
|
b2abbf0859 | ||
|
|
3925b59bd4 | ||
|
|
82ef086a3b | ||
|
|
a3b7e9bfc4 | ||
|
|
90affbb581 | ||
|
|
fa75f93a7a | ||
|
|
bcc8a26a9d | ||
| c0891ec427 |
@@ -8,10 +8,7 @@ namespace Controladora
|
||||
{
|
||||
public string Añadir(Cliente t)
|
||||
{
|
||||
if (t == null)
|
||||
{
|
||||
return "El Cliente es nulo, fallo la carga";
|
||||
}
|
||||
if (t == null) return "El Cliente es nulo, fallo la carga";
|
||||
|
||||
// Verificar si el CUIT ya existe en el repositorio
|
||||
if (RepositorioClientes.Instance.ExistePorCuit(t.Cuit))
|
||||
@@ -55,7 +52,9 @@ namespace Controladora
|
||||
|
||||
public ReadOnlyCollection<Cliente> Listar()
|
||||
{
|
||||
return RepositorioClientes.Instance.Listar();
|
||||
return RepositorioClientes.Instance.Listar().Where(x => x.Habilitado == true)
|
||||
.ToList()
|
||||
.AsReadOnly();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -57,6 +57,14 @@ namespace Controladora
|
||||
{
|
||||
return RepositorioFactura.Instance.Listar();
|
||||
}
|
||||
|
||||
public ReadOnlyCollection<DetalleFactura> ListarDetallesFactura(Factura factura)
|
||||
{
|
||||
Factura facturaalistar = ControladoraFacturas.Instance.Listar().First(x => x.Id == factura.Id);
|
||||
if (facturaalistar == null) return new ReadOnlyCollection<DetalleFactura>(new List<DetalleFactura>());
|
||||
return facturaalistar.MostrarDetalles();
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -65,30 +65,7 @@ namespace Controladora
|
||||
}
|
||||
}
|
||||
|
||||
public string EliminarPorFacturaId(int facturaId)
|
||||
{
|
||||
try
|
||||
{
|
||||
var lotes = RepositorioLote.Instance.Listar();
|
||||
var lotesAEliminar = lotes.Where(lote => lote.Id == facturaId).ToList();
|
||||
|
||||
foreach (var lote in lotesAEliminar)
|
||||
{
|
||||
RepositorioLote.Instance.Del(lote);
|
||||
}
|
||||
|
||||
return lotesAEliminar.Any() ?
|
||||
$"Los Lotes asociados a la Factura con el ID {facturaId} se eliminaron correctamente" :
|
||||
$"No se encontraron Lotes asociados a la Factura con el ID {facturaId}";
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
// Captura cualquier excepción no prevista
|
||||
return $"Ocurrió un error inesperado: {ex.Message}";
|
||||
}
|
||||
}
|
||||
|
||||
public ReadOnlyCollection<Lote> ListarPorFacturaId(int facturaId)
|
||||
/*public ReadOnlyCollection<Lote> ListarPorFacturaId(int facturaId)
|
||||
{
|
||||
try
|
||||
{
|
||||
@@ -101,13 +78,14 @@ namespace Controladora
|
||||
// Captura cualquier excepción no prevista
|
||||
throw new InvalidOperationException($"Ocurrió un error inesperado: {ex.Message}");
|
||||
}
|
||||
}
|
||||
}*/
|
||||
|
||||
public ReadOnlyCollection<Lote> Listar()
|
||||
{
|
||||
try
|
||||
{
|
||||
return RepositorioLote.Instance.Listar();
|
||||
return RepositorioLote.Instance.Listar().Where(x=> x.Habilitado == true)
|
||||
.ToList().AsReadOnly();
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
|
||||
@@ -18,6 +18,7 @@ namespace Controladora
|
||||
public string Eliminar(OrdenDeCompra t)
|
||||
{
|
||||
if (t == null) return "El OrdenDeCompra es nulo fallo la carga";
|
||||
if (t.Id < 0) return "El Id esta mal cargado";
|
||||
|
||||
return (RepositorioOrdenDeCompra.Instance.Del(t)) ?
|
||||
$"El OrdenDeCompra {t.Id} se Elimino correctamente":
|
||||
@@ -37,6 +38,14 @@ namespace Controladora
|
||||
{
|
||||
return RepositorioOrdenDeCompra.Instance.Listar();
|
||||
}
|
||||
|
||||
public ReadOnlyCollection<DetalleOrdenDeCompra> ListarDetalles(OrdenDeCompra orden)
|
||||
{
|
||||
var ordenalistar = RepositorioOrdenDeCompra.Instance.Listar().First(x => x.Id == orden.Id);
|
||||
if (ordenalistar == null) return new ReadOnlyCollection<DetalleOrdenDeCompra>(new List<DetalleOrdenDeCompra>());
|
||||
return ordenalistar.MostrarDetalles();
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,42 +0,0 @@
|
||||
using System.Collections.ObjectModel;
|
||||
using Entidades;
|
||||
using Modelo;
|
||||
|
||||
namespace Controladora
|
||||
{
|
||||
public class ControladoraPedidoDePresupuestos : Singleton<ControladoraPedidoDePresupuestos>
|
||||
{
|
||||
public string Añadir(PedidoDePresupuesto t)
|
||||
{
|
||||
if (t == null) return "El PedidoDePresupuesto es nulo fallo la carga";
|
||||
|
||||
return (RepositorioPedidoDePresupuesto.Instance.Add(t)) ?
|
||||
$"El PedidoDePresupuesto {t.Id} se cargo correctamente":
|
||||
$"Fallo la carga del PedidoDePresupuesto {t.Id}";
|
||||
}
|
||||
|
||||
public string Eliminar(PedidoDePresupuesto t)
|
||||
{
|
||||
if (t == null) return "El PedidoDePresupuesto es nulo fallo la carga";
|
||||
|
||||
return (RepositorioPedidoDePresupuesto.Instance.Del(t)) ?
|
||||
$"El PedidoDePresupuesto {t.Id} se Elimino correctamente":
|
||||
$"Fallo la Eliminacion del PedidoDePresupuesto {t.Id}";
|
||||
}
|
||||
|
||||
public string Modificar(PedidoDePresupuesto t)
|
||||
{
|
||||
if (t == null) return "El PedidoDePresupuesto es nulo fallo la carga";
|
||||
|
||||
return (RepositorioPedidoDePresupuesto.Instance.Mod(t)) ?
|
||||
$"El PedidoDePresupuesto {t.Id} se Modifico correctamente":
|
||||
$"Fallo la Modificacion del PedidoDePresupuesto {t.Id}";
|
||||
}
|
||||
|
||||
public ReadOnlyCollection<PedidoDePresupuesto> Listar()
|
||||
{
|
||||
return RepositorioPedidoDePresupuesto.Instance.Listar();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -32,10 +32,60 @@ namespace Controladora
|
||||
$"El Presupuesto {t.Id} se Modifico correctamente":
|
||||
$"Fallo la Modificacion del Presupuesto {t.Id}";
|
||||
}
|
||||
public string AceptarPresupuesto(Presupuesto t)
|
||||
{
|
||||
if (t == null) return "El Presupuesto es nulo fallo la carga";
|
||||
if (t.Aceptado == true) return "El presupuesto ya fue aceptado";
|
||||
|
||||
return (RepositorioPresupuesto.Instance.AceptarPresupuesto(t)) ?
|
||||
$"El Presupuesto {t.Id} se Acepto correctamente":
|
||||
$"Fallo la aceptacion del Presupuesto {t.Id}";
|
||||
}
|
||||
public ReadOnlyCollection<Presupuesto> Listar()
|
||||
{
|
||||
return RepositorioPresupuesto.Instance.Listar();
|
||||
return RepositorioPresupuesto.Instance.Listar()
|
||||
.Where(x => x.Habilitado == true)
|
||||
.ToList()
|
||||
.AsReadOnly();
|
||||
}
|
||||
|
||||
public ReadOnlyCollection<Presupuesto> ListarAceptado()
|
||||
{
|
||||
return RepositorioPresupuesto.Instance.Listar()
|
||||
.Where(x => x.Habilitado == true)
|
||||
.Where(x => x.Aceptado == true)
|
||||
.ToList()
|
||||
.AsReadOnly();
|
||||
}
|
||||
|
||||
public ReadOnlyCollection<DetallePresupuesto> ListarDetalles(Presupuesto presupuesto)
|
||||
{
|
||||
Presupuesto pres = RepositorioPresupuesto.Instance.Listar().First(x=> x.Id == presupuesto.Id);
|
||||
if (pres == null) return new ReadOnlyCollection<DetallePresupuesto>(new List<DetallePresupuesto>());
|
||||
return pres.MostrarDetalles();
|
||||
|
||||
}
|
||||
|
||||
public Presupuesto? MostrarPresupuestoPorId(Presupuesto presupuesto)
|
||||
{
|
||||
if (presupuesto == null) return null;
|
||||
if (presupuesto.Id < 0) return null;
|
||||
var pres = RepositorioPresupuesto.Instance.Listar().First(x => x.Id == presupuesto.Id);
|
||||
return pres;
|
||||
|
||||
}
|
||||
|
||||
public ReadOnlyCollection<Presupuesto>? ListarPresupuestosPorProveedor(Proveedor proveedor)
|
||||
{
|
||||
if (proveedor == null) return null;
|
||||
if (proveedor.Cuit < 0) return null;
|
||||
var presupuestos = RepositorioPresupuesto.Instance.Listar()
|
||||
.Where(x => x.Proveedor.Cuit == proveedor.Cuit)
|
||||
.ToList()
|
||||
.AsReadOnly();
|
||||
return presupuestos;
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -35,9 +35,20 @@ namespace Controladora
|
||||
|
||||
public ReadOnlyCollection<Producto> Listar()
|
||||
{
|
||||
return RepositorioProductos.Instance.Listar();
|
||||
return RepositorioProductos.Instance.Listar()
|
||||
.Where(x => x.Habilitado == true)
|
||||
.ToList()
|
||||
.AsReadOnly();
|
||||
}
|
||||
|
||||
|
||||
public ReadOnlyCollection<Proveedor> ListarProveedores(Producto producto)
|
||||
{
|
||||
Producto productoalistar = RepositorioProductos.Instance.Listar().First(x => x.Id == producto.Id);
|
||||
if (productoalistar == null) return new ReadOnlyCollection<Proveedor>(new List<Proveedor>());
|
||||
return productoalistar.ListarProveedores();
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -44,7 +44,10 @@ namespace Controladora
|
||||
|
||||
public ReadOnlyCollection<Proveedor> Listar()
|
||||
{
|
||||
return RepositorioProveedor.Instance.Listar();
|
||||
return RepositorioProveedor.Instance.Listar()
|
||||
.Where(x => x.Habilitado == true)
|
||||
.ToList()
|
||||
.AsReadOnly();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -14,29 +14,31 @@ namespace Controladora
|
||||
public string Añadir(Remito t)
|
||||
{
|
||||
if (t == null) return "El Remito es nulo fallo la carga";
|
||||
if (t.Id < 0) return "El id Esta Mal Cargado";
|
||||
|
||||
return (RepositorioRemito.Instance.Add(t)) ?
|
||||
var retRemito = RepositorioRemito.Instance.Add(t);
|
||||
var retLotes = RepositorioLote.Instance.Add(t);
|
||||
|
||||
return (!retLotes) ?
|
||||
$"El remito {t.Id} se cargo correctamente":
|
||||
$"Fallo la carga del remito {t.Id}";
|
||||
|
||||
}
|
||||
public string Modificar(Remito t)
|
||||
{
|
||||
if (t == null) return "El Remito es nulo fallo la carga";
|
||||
|
||||
return (RepositorioRemito.Instance.Add(t)) ?
|
||||
$"El remito {t.Id} se cargo correctamente":
|
||||
$"Fallo la carga del remito {t.Id}";
|
||||
|
||||
return "No se puede modificar un Remito";
|
||||
}
|
||||
public string Eliminar(Remito t)
|
||||
|
||||
private string Eliminar(Remito t)
|
||||
{
|
||||
return "No se puede Eliminar un remito";
|
||||
/*
|
||||
if (t == null) return "El Remito es nulo fallo la carga";
|
||||
|
||||
return (RepositorioRemito.Instance.Add(t)) ?
|
||||
$"El remito {t.Id} se cargo correctamente":
|
||||
$"Fallo la carga del remito {t.Id}";
|
||||
|
||||
return (RepositorioRemito.Instance.Del(t)) ?
|
||||
$"El remito {t.Id} se elimino correctamente":
|
||||
$"Fallo la Eliminacion del remito {t.Id}";
|
||||
*/
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,50 +0,0 @@
|
||||
{
|
||||
"runtimeTarget": {
|
||||
"name": ".NETCoreApp,Version=v6.0",
|
||||
"signature": ""
|
||||
},
|
||||
"compilationOptions": {},
|
||||
"targets": {
|
||||
".NETCoreApp,Version=v6.0": {
|
||||
"Controladora/1.0.0": {
|
||||
"dependencies": {
|
||||
"Entidades": "1.0.0",
|
||||
"Modelo": "1.0.0"
|
||||
},
|
||||
"runtime": {
|
||||
"Controladora.dll": {}
|
||||
}
|
||||
},
|
||||
"Entidades/1.0.0": {
|
||||
"runtime": {
|
||||
"Entidades.dll": {}
|
||||
}
|
||||
},
|
||||
"Modelo/1.0.0": {
|
||||
"dependencies": {
|
||||
"Entidades": "1.0.0"
|
||||
},
|
||||
"runtime": {
|
||||
"Modelo.dll": {}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"libraries": {
|
||||
"Controladora/1.0.0": {
|
||||
"type": "project",
|
||||
"serviceable": false,
|
||||
"sha512": ""
|
||||
},
|
||||
"Entidades/1.0.0": {
|
||||
"type": "project",
|
||||
"serviceable": false,
|
||||
"sha512": ""
|
||||
},
|
||||
"Modelo/1.0.0": {
|
||||
"type": "project",
|
||||
"serviceable": false,
|
||||
"sha512": ""
|
||||
}
|
||||
}
|
||||
}
|
||||
Binary file not shown.
Binary file not shown.
@@ -1,17 +1,31 @@
|
||||
{
|
||||
"format": 1,
|
||||
"restore": {
|
||||
"C:\\Users\\fedpo\\Downloads\\final actual\\final actual\\Controladora\\Controladora.csproj": {}
|
||||
<<<<<<< HEAD
|
||||
"C:\\Users\\fedpo\\Desktop\\Final actual\\Controladora\\Controladora.csproj": {}
|
||||
},
|
||||
"projects": {
|
||||
"C:\\Users\\fedpo\\Downloads\\final actual\\final actual\\Controladora\\Controladora.csproj": {
|
||||
"C:\\Users\\fedpo\\Desktop\\Final actual\\Controladora\\Controladora.csproj": {
|
||||
"version": "1.0.0",
|
||||
"restore": {
|
||||
"projectUniqueName": "C:\\Users\\fedpo\\Downloads\\final actual\\final actual\\Controladora\\Controladora.csproj",
|
||||
"projectUniqueName": "C:\\Users\\fedpo\\Desktop\\Final actual\\Controladora\\Controladora.csproj",
|
||||
"projectName": "Controladora",
|
||||
"projectPath": "C:\\Users\\fedpo\\Downloads\\final actual\\final actual\\Controladora\\Controladora.csproj",
|
||||
"projectPath": "C:\\Users\\fedpo\\Desktop\\Final actual\\Controladora\\Controladora.csproj",
|
||||
"packagesPath": "C:\\Users\\fedpo\\.nuget\\packages\\",
|
||||
"outputPath": "C:\\Users\\fedpo\\Downloads\\final actual\\final actual\\Controladora\\obj\\",
|
||||
"outputPath": "C:\\Users\\fedpo\\Desktop\\Final actual\\Controladora\\obj\\",
|
||||
=======
|
||||
"C:\\Users\\fedpo\\Downloads\\Final actua2l\\Final actual\\Controladora\\Controladora.csproj": {}
|
||||
},
|
||||
"projects": {
|
||||
"C:\\Users\\fedpo\\Downloads\\Final actua2l\\Final actual\\Controladora\\Controladora.csproj": {
|
||||
"version": "1.0.0",
|
||||
"restore": {
|
||||
"projectUniqueName": "C:\\Users\\fedpo\\Downloads\\Final actua2l\\Final actual\\Controladora\\Controladora.csproj",
|
||||
"projectName": "Controladora",
|
||||
"projectPath": "C:\\Users\\fedpo\\Downloads\\Final actua2l\\Final actual\\Controladora\\Controladora.csproj",
|
||||
"packagesPath": "C:\\Users\\fedpo\\.nuget\\packages\\",
|
||||
"outputPath": "C:\\Users\\fedpo\\Downloads\\Final actua2l\\Final actual\\Controladora\\obj\\",
|
||||
>>>>>>> 88e614d538344c4aeb32449ffc15cff3993b7857
|
||||
"projectStyle": "PackageReference",
|
||||
"configFilePaths": [
|
||||
"C:\\Users\\fedpo\\AppData\\Roaming\\NuGet\\NuGet.Config",
|
||||
@@ -29,11 +43,19 @@
|
||||
"net6.0": {
|
||||
"targetAlias": "net6.0",
|
||||
"projectReferences": {
|
||||
"C:\\Users\\fedpo\\Downloads\\final actual\\final actual\\Entidades\\Entidades.csproj": {
|
||||
"projectPath": "C:\\Users\\fedpo\\Downloads\\final actual\\final actual\\Entidades\\Entidades.csproj"
|
||||
<<<<<<< HEAD
|
||||
"C:\\Users\\fedpo\\Desktop\\Final actual\\Entidades\\Entidades.csproj": {
|
||||
"projectPath": "C:\\Users\\fedpo\\Desktop\\Final actual\\Entidades\\Entidades.csproj"
|
||||
},
|
||||
"C:\\Users\\fedpo\\Downloads\\final actual\\final actual\\Modelo\\Modelo.csproj": {
|
||||
"projectPath": "C:\\Users\\fedpo\\Downloads\\final actual\\final actual\\Modelo\\Modelo.csproj"
|
||||
"C:\\Users\\fedpo\\Desktop\\Final actual\\Modelo\\Modelo.csproj": {
|
||||
"projectPath": "C:\\Users\\fedpo\\Desktop\\Final actual\\Modelo\\Modelo.csproj"
|
||||
=======
|
||||
"C:\\Users\\fedpo\\Downloads\\Final actua2l\\Final actual\\Entidades\\Entidades.csproj": {
|
||||
"projectPath": "C:\\Users\\fedpo\\Downloads\\Final actua2l\\Final actual\\Entidades\\Entidades.csproj"
|
||||
},
|
||||
"C:\\Users\\fedpo\\Downloads\\Final actua2l\\Final actual\\Modelo\\Modelo.csproj": {
|
||||
"projectPath": "C:\\Users\\fedpo\\Downloads\\Final actua2l\\Final actual\\Modelo\\Modelo.csproj"
|
||||
>>>>>>> 88e614d538344c4aeb32449ffc15cff3993b7857
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -67,14 +89,25 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"C:\\Users\\fedpo\\Downloads\\final actual\\final actual\\Entidades\\Entidades.csproj": {
|
||||
<<<<<<< HEAD
|
||||
"C:\\Users\\fedpo\\Desktop\\Final actual\\Entidades\\Entidades.csproj": {
|
||||
"version": "1.0.0",
|
||||
"restore": {
|
||||
"projectUniqueName": "C:\\Users\\fedpo\\Downloads\\final actual\\final actual\\Entidades\\Entidades.csproj",
|
||||
"projectUniqueName": "C:\\Users\\fedpo\\Desktop\\Final actual\\Entidades\\Entidades.csproj",
|
||||
"projectName": "Entidades",
|
||||
"projectPath": "C:\\Users\\fedpo\\Downloads\\final actual\\final actual\\Entidades\\Entidades.csproj",
|
||||
"projectPath": "C:\\Users\\fedpo\\Desktop\\Final actual\\Entidades\\Entidades.csproj",
|
||||
"packagesPath": "C:\\Users\\fedpo\\.nuget\\packages\\",
|
||||
"outputPath": "C:\\Users\\fedpo\\Downloads\\final actual\\final actual\\Entidades\\obj\\",
|
||||
"outputPath": "C:\\Users\\fedpo\\Desktop\\Final actual\\Entidades\\obj\\",
|
||||
=======
|
||||
"C:\\Users\\fedpo\\Downloads\\Final actua2l\\Final actual\\Entidades\\Entidades.csproj": {
|
||||
"version": "1.0.0",
|
||||
"restore": {
|
||||
"projectUniqueName": "C:\\Users\\fedpo\\Downloads\\Final actua2l\\Final actual\\Entidades\\Entidades.csproj",
|
||||
"projectName": "Entidades",
|
||||
"projectPath": "C:\\Users\\fedpo\\Downloads\\Final actua2l\\Final actual\\Entidades\\Entidades.csproj",
|
||||
"packagesPath": "C:\\Users\\fedpo\\.nuget\\packages\\",
|
||||
"outputPath": "C:\\Users\\fedpo\\Downloads\\Final actua2l\\Final actual\\Entidades\\obj\\",
|
||||
>>>>>>> 88e614d538344c4aeb32449ffc15cff3993b7857
|
||||
"projectStyle": "PackageReference",
|
||||
"configFilePaths": [
|
||||
"C:\\Users\\fedpo\\AppData\\Roaming\\NuGet\\NuGet.Config",
|
||||
@@ -123,14 +156,25 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"C:\\Users\\fedpo\\Downloads\\final actual\\final actual\\Modelo\\Modelo.csproj": {
|
||||
<<<<<<< HEAD
|
||||
"C:\\Users\\fedpo\\Desktop\\Final actual\\Modelo\\Modelo.csproj": {
|
||||
"version": "1.0.0",
|
||||
"restore": {
|
||||
"projectUniqueName": "C:\\Users\\fedpo\\Downloads\\final actual\\final actual\\Modelo\\Modelo.csproj",
|
||||
"projectUniqueName": "C:\\Users\\fedpo\\Desktop\\Final actual\\Modelo\\Modelo.csproj",
|
||||
"projectName": "Modelo",
|
||||
"projectPath": "C:\\Users\\fedpo\\Downloads\\final actual\\final actual\\Modelo\\Modelo.csproj",
|
||||
"projectPath": "C:\\Users\\fedpo\\Desktop\\Final actual\\Modelo\\Modelo.csproj",
|
||||
"packagesPath": "C:\\Users\\fedpo\\.nuget\\packages\\",
|
||||
"outputPath": "C:\\Users\\fedpo\\Downloads\\final actual\\final actual\\Modelo\\obj\\",
|
||||
"outputPath": "C:\\Users\\fedpo\\Desktop\\Final actual\\Modelo\\obj\\",
|
||||
=======
|
||||
"C:\\Users\\fedpo\\Downloads\\Final actua2l\\Final actual\\Modelo\\Modelo.csproj": {
|
||||
"version": "1.0.0",
|
||||
"restore": {
|
||||
"projectUniqueName": "C:\\Users\\fedpo\\Downloads\\Final actua2l\\Final actual\\Modelo\\Modelo.csproj",
|
||||
"projectName": "Modelo",
|
||||
"projectPath": "C:\\Users\\fedpo\\Downloads\\Final actua2l\\Final actual\\Modelo\\Modelo.csproj",
|
||||
"packagesPath": "C:\\Users\\fedpo\\.nuget\\packages\\",
|
||||
"outputPath": "C:\\Users\\fedpo\\Downloads\\Final actua2l\\Final actual\\Modelo\\obj\\",
|
||||
>>>>>>> 88e614d538344c4aeb32449ffc15cff3993b7857
|
||||
"projectStyle": "PackageReference",
|
||||
"configFilePaths": [
|
||||
"C:\\Users\\fedpo\\AppData\\Roaming\\NuGet\\NuGet.Config",
|
||||
@@ -148,8 +192,13 @@
|
||||
"net6.0": {
|
||||
"targetAlias": "net6.0",
|
||||
"projectReferences": {
|
||||
"C:\\Users\\fedpo\\Downloads\\final actual\\final actual\\Entidades\\Entidades.csproj": {
|
||||
"projectPath": "C:\\Users\\fedpo\\Downloads\\final actual\\final actual\\Entidades\\Entidades.csproj"
|
||||
<<<<<<< HEAD
|
||||
"C:\\Users\\fedpo\\Desktop\\Final actual\\Entidades\\Entidades.csproj": {
|
||||
"projectPath": "C:\\Users\\fedpo\\Desktop\\Final actual\\Entidades\\Entidades.csproj"
|
||||
=======
|
||||
"C:\\Users\\fedpo\\Downloads\\Final actua2l\\Final actual\\Entidades\\Entidades.csproj": {
|
||||
"projectPath": "C:\\Users\\fedpo\\Downloads\\Final actua2l\\Final actual\\Entidades\\Entidades.csproj"
|
||||
>>>>>>> 88e614d538344c4aeb32449ffc15cff3993b7857
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,23 +0,0 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:4.0.30319.42000
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
using System;
|
||||
using System.Reflection;
|
||||
|
||||
[assembly: System.Reflection.AssemblyCompanyAttribute("Controladora")]
|
||||
[assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")]
|
||||
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")]
|
||||
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0")]
|
||||
[assembly: System.Reflection.AssemblyProductAttribute("Controladora")]
|
||||
[assembly: System.Reflection.AssemblyTitleAttribute("Controladora")]
|
||||
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]
|
||||
|
||||
// Generated by the MSBuild WriteCodeFragment class.
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
f121c5eeefa8c5e39430715ad45c0dbadc6c8ad0
|
||||
@@ -1,11 +0,0 @@
|
||||
is_global = true
|
||||
build_property.TargetFramework = net6.0
|
||||
build_property.TargetPlatformMinVersion =
|
||||
build_property.UsingMicrosoftNETSdkWeb =
|
||||
build_property.ProjectTypeGuids =
|
||||
build_property.InvariantGlobalization =
|
||||
build_property.PlatformNeutralAssembly =
|
||||
build_property.EnforceExtendedAnalyzerRules =
|
||||
build_property._SupportedPlatformList = Linux,macOS,Windows
|
||||
build_property.RootNamespace = Controladora
|
||||
build_property.ProjectDir = C:\Users\fedpo\Downloads\final actual\final actual\Controladora\
|
||||
@@ -1,5 +0,0 @@
|
||||
<<<<<<< HEAD
|
||||
07cbdde4e47ec2d3a6db548797ff84a15aa08946633217fe5ed64773b3cc8491
|
||||
=======
|
||||
a7a9c23e29aac78d8fc99e5e2578c73ffe3d4cba
|
||||
>>>>>>> 5b78d74e54350285696596720e82f5fbd99b4d02
|
||||
@@ -1,122 +1,3 @@
|
||||
C:\Users\Nacho\Desktop\verdadero\Controladora\bin\Debug\net6.0\Controladora.deps.json
|
||||
C:\Users\Nacho\Desktop\verdadero\Controladora\bin\Debug\net6.0\Controladora.dll
|
||||
C:\Users\Nacho\Desktop\verdadero\Controladora\bin\Debug\net6.0\Controladora.pdb
|
||||
C:\Users\Nacho\Desktop\verdadero\Controladora\obj\Debug\net6.0\Controladora.csproj.AssemblyReference.cache
|
||||
C:\Users\Nacho\Desktop\verdadero\Controladora\obj\Debug\net6.0\Controladora.GeneratedMSBuildEditorConfig.editorconfig
|
||||
C:\Users\Nacho\Desktop\verdadero\Controladora\obj\Debug\net6.0\Controladora.AssemblyInfoInputs.cache
|
||||
C:\Users\Nacho\Desktop\verdadero\Controladora\obj\Debug\net6.0\Controladora.AssemblyInfo.cs
|
||||
C:\Users\Nacho\Desktop\verdadero\Controladora\obj\Debug\net6.0\Controladora.csproj.CoreCompileInputs.cache
|
||||
C:\Users\Nacho\Desktop\verdadero\Controladora\obj\Debug\net6.0\Controladora.dll
|
||||
C:\Users\Nacho\Desktop\verdadero\Controladora\obj\Debug\net6.0\refint\Controladora.dll
|
||||
C:\Users\Nacho\Desktop\verdadero\Controladora\obj\Debug\net6.0\Controladora.pdb
|
||||
C:\Users\Nacho\Desktop\verdadero\Controladora\obj\Debug\net6.0\ref\Controladora.dll
|
||||
C:\Users\Nacho\Desktop\Final\Controladora\obj\Debug\net6.0\Controladora.dll
|
||||
C:\Users\Nacho\Desktop\Final\Controladora\obj\Debug\net6.0\refint\Controladora.dll
|
||||
C:\Users\Nacho\Desktop\Final\Controladora\obj\Debug\net6.0\Controladora.pdb
|
||||
C:\Users\Nacho\source\repos\Final\Controladora\obj\Debug\net6.0\Controladora.dll
|
||||
C:\Users\Nacho\source\repos\Final\Controladora\obj\Debug\net6.0\refint\Controladora.dll
|
||||
C:\Users\Nacho\source\repos\Final\Controladora\obj\Debug\net6.0\Controladora.pdb
|
||||
C:\Users\Nacho\Source\Repos\Final_OOP\Controladora\obj\Debug\net6.0\Controladora.dll
|
||||
C:\Users\Nacho\Source\Repos\Final_OOP\Controladora\obj\Debug\net6.0\refint\Controladora.dll
|
||||
C:\Users\Nacho\Source\Repos\Final_OOP\Controladora\obj\Debug\net6.0\Controladora.pdb
|
||||
C:\Users\Nacho\Source\Repos\Final_OOP\Controladora\bin\Debug\net6.0\Controladora.deps.json
|
||||
C:\Users\Nacho\Source\Repos\Final_OOP\Controladora\bin\Debug\net6.0\Controladora.dll
|
||||
C:\Users\Nacho\Source\Repos\Final_OOP\Controladora\bin\Debug\net6.0\Controladora.pdb
|
||||
C:\Users\Nacho\Source\Repos\Final_OOP\Controladora\bin\Debug\net6.0\Entidades.dll
|
||||
C:\Users\Nacho\Source\Repos\Final_OOP\Controladora\bin\Debug\net6.0\Modelo.dll
|
||||
C:\Users\Nacho\Source\Repos\Final_OOP\Controladora\bin\Debug\net6.0\Modelo.pdb
|
||||
C:\Users\Nacho\Source\Repos\Final_OOP\Controladora\bin\Debug\net6.0\Entidades.pdb
|
||||
C:\Users\Nacho\Source\Repos\Final_OOP\Controladora\obj\Debug\net6.0\Controladora.csproj.AssemblyReference.cache
|
||||
C:\Users\Nacho\Source\Repos\Final_OOP\Controladora\obj\Debug\net6.0\Controladora.GeneratedMSBuildEditorConfig.editorconfig
|
||||
C:\Users\Nacho\Source\Repos\Final_OOP\Controladora\obj\Debug\net6.0\Controladora.AssemblyInfoInputs.cache
|
||||
C:\Users\Nacho\Source\Repos\Final_OOP\Controladora\obj\Debug\net6.0\Controladora.AssemblyInfo.cs
|
||||
C:\Users\Nacho\Source\Repos\Final_OOP\Controladora\obj\Debug\net6.0\Controladora.csproj.CoreCompileInputs.cache
|
||||
C:\Users\Nacho\Source\Repos\Final_OOP\Controladora\obj\Debug\net6.0\Controla.1EE7A4DA.Up2Date
|
||||
C:\Users\Nacho\Source\Repos\Final_OOP\Controladora\obj\Debug\net6.0\ref\Controladora.dll
|
||||
C:\Users\fedpo\source\repos\Final_OOP\Controladora\bin\Debug\net6.0\Controladora.deps.json
|
||||
C:\Users\fedpo\source\repos\Final_OOP\Controladora\bin\Debug\net6.0\Controladora.dll
|
||||
C:\Users\fedpo\source\repos\Final_OOP\Controladora\bin\Debug\net6.0\Controladora.pdb
|
||||
C:\Users\fedpo\source\repos\Final_OOP\Controladora\bin\Debug\net6.0\Entidades.dll
|
||||
C:\Users\fedpo\source\repos\Final_OOP\Controladora\bin\Debug\net6.0\Modelo.dll
|
||||
C:\Users\fedpo\source\repos\Final_OOP\Controladora\bin\Debug\net6.0\Modelo.pdb
|
||||
C:\Users\fedpo\source\repos\Final_OOP\Controladora\bin\Debug\net6.0\Entidades.pdb
|
||||
C:\Users\fedpo\source\repos\Final_OOP\Controladora\obj\Debug\net6.0\Controladora.csproj.AssemblyReference.cache
|
||||
C:\Users\fedpo\source\repos\Final_OOP\Controladora\obj\Debug\net6.0\Controladora.GeneratedMSBuildEditorConfig.editorconfig
|
||||
C:\Users\fedpo\source\repos\Final_OOP\Controladora\obj\Debug\net6.0\Controladora.AssemblyInfoInputs.cache
|
||||
C:\Users\fedpo\source\repos\Final_OOP\Controladora\obj\Debug\net6.0\Controladora.AssemblyInfo.cs
|
||||
C:\Users\fedpo\source\repos\Final_OOP\Controladora\obj\Debug\net6.0\Controladora.csproj.CoreCompileInputs.cache
|
||||
C:\Users\fedpo\source\repos\Final_OOP\Controladora\obj\Debug\net6.0\Controladora.csproj.CopyComplete
|
||||
C:\Users\fedpo\source\repos\Final_OOP\Controladora\obj\Debug\net6.0\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\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
|
||||
C:\Users\fedpo\Downloads\Final\Final\Controladora\bin\Debug\net6.0\Controladora.deps.json
|
||||
C:\Users\fedpo\Downloads\Final\Final\Controladora\bin\Debug\net6.0\Controladora.dll
|
||||
C:\Users\fedpo\Downloads\Final\Final\Controladora\bin\Debug\net6.0\Controladora.pdb
|
||||
C:\Users\fedpo\Downloads\Final\Final\Controladora\bin\Debug\net6.0\Entidades.dll
|
||||
C:\Users\fedpo\Downloads\Final\Final\Controladora\bin\Debug\net6.0\Modelo.dll
|
||||
C:\Users\fedpo\Downloads\Final\Final\Controladora\bin\Debug\net6.0\Modelo.pdb
|
||||
C:\Users\fedpo\Downloads\Final\Final\Controladora\bin\Debug\net6.0\Entidades.pdb
|
||||
C:\Users\fedpo\Downloads\Final\Final\Controladora\obj\Debug\net6.0\Controladora.csproj.AssemblyReference.cache
|
||||
C:\Users\fedpo\Downloads\Final\Final\Controladora\obj\Debug\net6.0\Controladora.GeneratedMSBuildEditorConfig.editorconfig
|
||||
C:\Users\fedpo\Downloads\Final\Final\Controladora\obj\Debug\net6.0\Controladora.AssemblyInfoInputs.cache
|
||||
C:\Users\fedpo\Downloads\Final\Final\Controladora\obj\Debug\net6.0\Controladora.AssemblyInfo.cs
|
||||
C:\Users\fedpo\Downloads\Final\Final\Controladora\obj\Debug\net6.0\Controladora.csproj.CoreCompileInputs.cache
|
||||
C:\Users\fedpo\Downloads\Final\Final\Controladora\obj\Debug\net6.0\Controladora.csproj.CopyComplete
|
||||
C:\Users\fedpo\Downloads\Final\Final\Controladora\obj\Debug\net6.0\Controladora.dll
|
||||
C:\Users\fedpo\Downloads\Final\Final\Controladora\obj\Debug\net6.0\refint\Controladora.dll
|
||||
C:\Users\fedpo\Downloads\Final\Final\Controladora\obj\Debug\net6.0\Controladora.pdb
|
||||
C:\Users\fedpo\Downloads\Final\Final\Controladora\obj\Debug\net6.0\ref\Controladora.dll
|
||||
C:\Users\Nacho\Desktop\final actual\Controladora\bin\Debug\net6.0\Controladora.deps.json
|
||||
C:\Users\Nacho\Desktop\final actual\Controladora\bin\Debug\net6.0\Controladora.dll
|
||||
C:\Users\Nacho\Desktop\final actual\Controladora\bin\Debug\net6.0\Controladora.pdb
|
||||
C:\Users\Nacho\Desktop\final actual\Controladora\bin\Debug\net6.0\Entidades.dll
|
||||
C:\Users\Nacho\Desktop\final actual\Controladora\bin\Debug\net6.0\Modelo.dll
|
||||
C:\Users\Nacho\Desktop\final actual\Controladora\bin\Debug\net6.0\Modelo.pdb
|
||||
C:\Users\Nacho\Desktop\final actual\Controladora\bin\Debug\net6.0\Entidades.pdb
|
||||
C:\Users\Nacho\Desktop\final actual\Controladora\obj\Debug\net6.0\Controladora.csproj.AssemblyReference.cache
|
||||
C:\Users\Nacho\Desktop\final actual\Controladora\obj\Debug\net6.0\Controladora.GeneratedMSBuildEditorConfig.editorconfig
|
||||
C:\Users\Nacho\Desktop\final actual\Controladora\obj\Debug\net6.0\Controladora.AssemblyInfoInputs.cache
|
||||
C:\Users\Nacho\Desktop\final actual\Controladora\obj\Debug\net6.0\Controladora.AssemblyInfo.cs
|
||||
C:\Users\Nacho\Desktop\final actual\Controladora\obj\Debug\net6.0\Controladora.csproj.CoreCompileInputs.cache
|
||||
C:\Users\Nacho\Desktop\final actual\Controladora\obj\Debug\net6.0\Controla.1EE7A4DA.Up2Date
|
||||
C:\Users\Nacho\Desktop\final actual\Controladora\obj\Debug\net6.0\Controladora.dll
|
||||
C:\Users\Nacho\Desktop\final actual\Controladora\obj\Debug\net6.0\refint\Controladora.dll
|
||||
C:\Users\Nacho\Desktop\final actual\Controladora\obj\Debug\net6.0\Controladora.pdb
|
||||
C:\Users\Nacho\Desktop\final actual\Controladora\obj\Debug\net6.0\ref\Controladora.dll
|
||||
<<<<<<< HEAD
|
||||
=======
|
||||
C:\Users\fedpo\Downloads\final actual\final actual\Controladora\bin\Debug\net6.0\Controladora.deps.json
|
||||
C:\Users\fedpo\Downloads\final actual\final actual\Controladora\bin\Debug\net6.0\Controladora.dll
|
||||
C:\Users\fedpo\Downloads\final actual\final actual\Controladora\bin\Debug\net6.0\Controladora.pdb
|
||||
@@ -134,4 +15,37 @@ C:\Users\fedpo\Downloads\final actual\final actual\Controladora\obj\Debug\net6.0
|
||||
C:\Users\fedpo\Downloads\final actual\final actual\Controladora\obj\Debug\net6.0\refint\Controladora.dll
|
||||
C:\Users\fedpo\Downloads\final actual\final actual\Controladora\obj\Debug\net6.0\Controladora.pdb
|
||||
C:\Users\fedpo\Downloads\final actual\final actual\Controladora\obj\Debug\net6.0\ref\Controladora.dll
|
||||
>>>>>>> 5b78d74e54350285696596720e82f5fbd99b4d02
|
||||
C:\Users\Nacho\Desktop\Final actual\Controladora\bin\Debug\net6.0\Controladora.deps.json
|
||||
C:\Users\Nacho\Desktop\Final actual\Controladora\bin\Debug\net6.0\Controladora.dll
|
||||
C:\Users\Nacho\Desktop\Final actual\Controladora\bin\Debug\net6.0\Controladora.pdb
|
||||
C:\Users\Nacho\Desktop\Final actual\Controladora\bin\Debug\net6.0\Entidades.dll
|
||||
C:\Users\Nacho\Desktop\Final actual\Controladora\bin\Debug\net6.0\Modelo.dll
|
||||
C:\Users\Nacho\Desktop\Final actual\Controladora\bin\Debug\net6.0\Modelo.pdb
|
||||
C:\Users\Nacho\Desktop\Final actual\Controladora\bin\Debug\net6.0\Entidades.pdb
|
||||
C:\Users\Nacho\Desktop\Final actual\Controladora\obj\Debug\net6.0\Controladora.csproj.AssemblyReference.cache
|
||||
C:\Users\Nacho\Desktop\Final actual\Controladora\obj\Debug\net6.0\Controladora.GeneratedMSBuildEditorConfig.editorconfig
|
||||
C:\Users\Nacho\Desktop\Final actual\Controladora\obj\Debug\net6.0\Controladora.AssemblyInfoInputs.cache
|
||||
C:\Users\Nacho\Desktop\Final actual\Controladora\obj\Debug\net6.0\Controladora.AssemblyInfo.cs
|
||||
C:\Users\Nacho\Desktop\Final actual\Controladora\obj\Debug\net6.0\Controladora.csproj.CoreCompileInputs.cache
|
||||
C:\Users\Nacho\Desktop\Final actual\Controladora\obj\Debug\net6.0\Controla.1EE7A4DA.Up2Date
|
||||
C:\Users\Nacho\Desktop\Final actual\Controladora\obj\Debug\net6.0\Controladora.dll
|
||||
C:\Users\Nacho\Desktop\Final actual\Controladora\obj\Debug\net6.0\refint\Controladora.dll
|
||||
C:\Users\Nacho\Desktop\Final actual\Controladora\obj\Debug\net6.0\Controladora.pdb
|
||||
C:\Users\Nacho\Desktop\Final actual\Controladora\obj\Debug\net6.0\ref\Controladora.dll
|
||||
C:\Users\fedpo\Downloads\final actual\Controladora\bin\Debug\net6.0\Controladora.deps.json
|
||||
C:\Users\fedpo\Downloads\final actual\Controladora\bin\Debug\net6.0\Controladora.dll
|
||||
C:\Users\fedpo\Downloads\final actual\Controladora\bin\Debug\net6.0\Controladora.pdb
|
||||
C:\Users\fedpo\Downloads\final actual\Controladora\bin\Debug\net6.0\Entidades.dll
|
||||
C:\Users\fedpo\Downloads\final actual\Controladora\bin\Debug\net6.0\Modelo.dll
|
||||
C:\Users\fedpo\Downloads\final actual\Controladora\bin\Debug\net6.0\Modelo.pdb
|
||||
C:\Users\fedpo\Downloads\final actual\Controladora\bin\Debug\net6.0\Entidades.pdb
|
||||
C:\Users\fedpo\Downloads\final actual\Controladora\obj\Debug\net6.0\Controladora.csproj.AssemblyReference.cache
|
||||
C:\Users\fedpo\Downloads\final actual\Controladora\obj\Debug\net6.0\Controladora.GeneratedMSBuildEditorConfig.editorconfig
|
||||
C:\Users\fedpo\Downloads\final actual\Controladora\obj\Debug\net6.0\Controladora.AssemblyInfoInputs.cache
|
||||
C:\Users\fedpo\Downloads\final actual\Controladora\obj\Debug\net6.0\Controladora.AssemblyInfo.cs
|
||||
C:\Users\fedpo\Downloads\final actual\Controladora\obj\Debug\net6.0\Controladora.csproj.CoreCompileInputs.cache
|
||||
C:\Users\fedpo\Downloads\final actual\Controladora\obj\Debug\net6.0\Controladora.csproj.CopyComplete
|
||||
C:\Users\fedpo\Downloads\final actual\Controladora\obj\Debug\net6.0\Controladora.dll
|
||||
C:\Users\fedpo\Downloads\final actual\Controladora\obj\Debug\net6.0\refint\Controladora.dll
|
||||
C:\Users\fedpo\Downloads\final actual\Controladora\obj\Debug\net6.0\Controladora.pdb
|
||||
C:\Users\fedpo\Downloads\final actual\Controladora\obj\Debug\net6.0\ref\Controladora.dll
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -1,4 +0,0 @@
|
||||
// <autogenerated />
|
||||
using System;
|
||||
using System.Reflection;
|
||||
[assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETCoreApp,Version=v6.0", FrameworkDisplayName = ".NET 6.0")]
|
||||
@@ -1,23 +0,0 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// Este código fue generado por una herramienta.
|
||||
// Versión de runtime:4.0.30319.42000
|
||||
//
|
||||
// Los cambios en este archivo podrían causar un comportamiento incorrecto y se perderán si
|
||||
// se vuelve a generar el código.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
using System;
|
||||
using System.Reflection;
|
||||
|
||||
[assembly: System.Reflection.AssemblyCompanyAttribute("Controladora")]
|
||||
[assembly: System.Reflection.AssemblyConfigurationAttribute("Release")]
|
||||
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")]
|
||||
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+abfd18e86f40a98925507ec03c2e8832ee47a3eb")]
|
||||
[assembly: System.Reflection.AssemblyProductAttribute("Controladora")]
|
||||
[assembly: System.Reflection.AssemblyTitleAttribute("Controladora")]
|
||||
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]
|
||||
|
||||
// Generado por la clase WriteCodeFragment de MSBuild.
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
1300c7ac552248a2e20058b6f2d7f7eb38539ca91bc222d9d6bfd7bbcb24e9ab
|
||||
@@ -1,13 +0,0 @@
|
||||
is_global = true
|
||||
build_property.TargetFramework = net6.0
|
||||
build_property.TargetPlatformMinVersion =
|
||||
build_property.UsingMicrosoftNETSdkWeb =
|
||||
build_property.ProjectTypeGuids =
|
||||
build_property.InvariantGlobalization =
|
||||
build_property.PlatformNeutralAssembly =
|
||||
build_property.EnforceExtendedAnalyzerRules =
|
||||
build_property._SupportedPlatformList = Linux,macOS,Windows
|
||||
build_property.RootNamespace = Controladora
|
||||
build_property.ProjectDir = C:\Users\Nacho\source\repos\Final\Controladora\
|
||||
build_property.EnableComHosting =
|
||||
build_property.EnableGeneratedComInterfaceComImportInterop =
|
||||
@@ -1,8 +0,0 @@
|
||||
// <auto-generated/>
|
||||
global using global::System;
|
||||
global using global::System.Collections.Generic;
|
||||
global using global::System.IO;
|
||||
global using global::System.Linq;
|
||||
global using global::System.Net.Http;
|
||||
global using global::System.Threading;
|
||||
global using global::System.Threading.Tasks;
|
||||
Binary file not shown.
Binary file not shown.
@@ -51,11 +51,19 @@
|
||||
"project": {
|
||||
"version": "1.0.0",
|
||||
"restore": {
|
||||
"projectUniqueName": "C:\\Users\\fedpo\\Downloads\\final actual\\final actual\\Controladora\\Controladora.csproj",
|
||||
<<<<<<< HEAD
|
||||
"projectUniqueName": "C:\\Users\\fedpo\\Desktop\\Final actual\\Controladora\\Controladora.csproj",
|
||||
"projectName": "Controladora",
|
||||
"projectPath": "C:\\Users\\fedpo\\Downloads\\final actual\\final actual\\Controladora\\Controladora.csproj",
|
||||
"projectPath": "C:\\Users\\fedpo\\Desktop\\Final actual\\Controladora\\Controladora.csproj",
|
||||
"packagesPath": "C:\\Users\\fedpo\\.nuget\\packages\\",
|
||||
"outputPath": "C:\\Users\\fedpo\\Downloads\\final actual\\final actual\\Controladora\\obj\\",
|
||||
"outputPath": "C:\\Users\\fedpo\\Desktop\\Final actual\\Controladora\\obj\\",
|
||||
=======
|
||||
"projectUniqueName": "C:\\Users\\fedpo\\Downloads\\Final actua2l\\Final actual\\Controladora\\Controladora.csproj",
|
||||
"projectName": "Controladora",
|
||||
"projectPath": "C:\\Users\\fedpo\\Downloads\\Final actua2l\\Final actual\\Controladora\\Controladora.csproj",
|
||||
"packagesPath": "C:\\Users\\fedpo\\.nuget\\packages\\",
|
||||
"outputPath": "C:\\Users\\fedpo\\Downloads\\Final actua2l\\Final actual\\Controladora\\obj\\",
|
||||
>>>>>>> 88e614d538344c4aeb32449ffc15cff3993b7857
|
||||
"projectStyle": "PackageReference",
|
||||
"configFilePaths": [
|
||||
"C:\\Users\\fedpo\\AppData\\Roaming\\NuGet\\NuGet.Config",
|
||||
@@ -73,11 +81,19 @@
|
||||
"net6.0": {
|
||||
"targetAlias": "net6.0",
|
||||
"projectReferences": {
|
||||
"C:\\Users\\fedpo\\Downloads\\final actual\\final actual\\Entidades\\Entidades.csproj": {
|
||||
"projectPath": "C:\\Users\\fedpo\\Downloads\\final actual\\final actual\\Entidades\\Entidades.csproj"
|
||||
<<<<<<< HEAD
|
||||
"C:\\Users\\fedpo\\Desktop\\Final actual\\Entidades\\Entidades.csproj": {
|
||||
"projectPath": "C:\\Users\\fedpo\\Desktop\\Final actual\\Entidades\\Entidades.csproj"
|
||||
},
|
||||
"C:\\Users\\fedpo\\Downloads\\final actual\\final actual\\Modelo\\Modelo.csproj": {
|
||||
"projectPath": "C:\\Users\\fedpo\\Downloads\\final actual\\final actual\\Modelo\\Modelo.csproj"
|
||||
"C:\\Users\\fedpo\\Desktop\\Final actual\\Modelo\\Modelo.csproj": {
|
||||
"projectPath": "C:\\Users\\fedpo\\Desktop\\Final actual\\Modelo\\Modelo.csproj"
|
||||
=======
|
||||
"C:\\Users\\fedpo\\Downloads\\Final actua2l\\Final actual\\Entidades\\Entidades.csproj": {
|
||||
"projectPath": "C:\\Users\\fedpo\\Downloads\\Final actua2l\\Final actual\\Entidades\\Entidades.csproj"
|
||||
},
|
||||
"C:\\Users\\fedpo\\Downloads\\Final actua2l\\Final actual\\Modelo\\Modelo.csproj": {
|
||||
"projectPath": "C:\\Users\\fedpo\\Downloads\\Final actua2l\\Final actual\\Modelo\\Modelo.csproj"
|
||||
>>>>>>> 88e614d538344c4aeb32449ffc15cff3993b7857
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,8 +0,0 @@
|
||||
{
|
||||
"version": 2,
|
||||
"dgSpecHash": "AVYTA+Cdyhg6wCEQPUiY9Zgnvl4qcFZo9nD09bdg1F+72oerfmmuZj274FC2KL/pXGSF1iqxwV37ZtH0RMkuXw==",
|
||||
"success": true,
|
||||
"projectFilePath": "C:\\Users\\fedpo\\Downloads\\final actual\\final actual\\Controladora\\Controladora.csproj",
|
||||
"expectedPackageFiles": [],
|
||||
"logs": []
|
||||
}
|
||||
@@ -1,9 +1,13 @@
|
||||
namespace Entidades
|
||||
using System.ComponentModel;
|
||||
|
||||
namespace Entidades
|
||||
{
|
||||
public class Detalle <T> where T:Producto
|
||||
{
|
||||
public int Id { get; set; }
|
||||
|
||||
public int Cantidad { get; set; }
|
||||
|
||||
public T Producto { get; set; }
|
||||
}
|
||||
|
||||
|
||||
@@ -4,7 +4,6 @@ namespace Entidades
|
||||
public class DetalleFactura: Detalle<Producto>
|
||||
{
|
||||
public int IdFactura { get; set; }
|
||||
public double PrecioUnitario { get; set; }
|
||||
public double Subtotal { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,5 +4,29 @@ namespace Entidades
|
||||
public class DetalleOrdenDeCompra: Detalle<Producto>
|
||||
{
|
||||
public int IdOrdenDeCompra { get; set; }
|
||||
public Presupuesto presupuesto { get; set; }
|
||||
public double MontoCU { get; set; }
|
||||
|
||||
public int IdPresupuesto
|
||||
{
|
||||
get
|
||||
{
|
||||
return presupuesto.Id;
|
||||
}
|
||||
}
|
||||
public string NombreProducto
|
||||
{
|
||||
get
|
||||
{
|
||||
return Producto.Nombre;
|
||||
}
|
||||
}
|
||||
public double SubTotal
|
||||
{
|
||||
get
|
||||
{
|
||||
return MontoCU * Cantidad;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,10 +0,0 @@
|
||||
|
||||
namespace Entidades
|
||||
{
|
||||
public class DetallePedido : Detalle<Producto>
|
||||
{
|
||||
public int IdPedido { get; set; }
|
||||
public int CantidadPedido { get; set; }
|
||||
public List<Producto> Productos { get; set; } = new List<Producto>();
|
||||
}
|
||||
}
|
||||
@@ -1,9 +1,25 @@
|
||||
|
||||
using System.ComponentModel;
|
||||
|
||||
namespace Entidades
|
||||
{
|
||||
public class DetallePresupuesto: Detalle<Producto>
|
||||
{
|
||||
public int IdPresupuesto { get; set; }
|
||||
public double CostoUnitario { get; set; }
|
||||
|
||||
public double MontoCUPropuesto { get; set; }
|
||||
public string NombreDelProducto {
|
||||
get
|
||||
{
|
||||
return Producto.Nombre;
|
||||
}
|
||||
}
|
||||
|
||||
public double Subtotal {
|
||||
get
|
||||
{
|
||||
return MontoCUPropuesto * Cantidad;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
211
Entidades/Entidades.cd
Normal file
211
Entidades/Entidades.cd
Normal file
@@ -0,0 +1,211 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<ClassDiagram MajorVersion="1" MinorVersion="1">
|
||||
<Class Name="Entidades.Categoria">
|
||||
<Position X="2" Y="9.5" Width="1.5" />
|
||||
<TypeIdentifier>
|
||||
<HashCode>AAACAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAA=</HashCode>
|
||||
<FileName>Categoria.cs</FileName>
|
||||
</TypeIdentifier>
|
||||
</Class>
|
||||
<Class Name="Entidades.Cliente">
|
||||
<Position X="14.5" Y="0.5" Width="1.75" />
|
||||
<TypeIdentifier>
|
||||
<HashCode>AAAAQAAAAAAAAAAEACAAgABAAIAAABAAAAAAAAAAAAA=</HashCode>
|
||||
<FileName>Cliente.cs</FileName>
|
||||
</TypeIdentifier>
|
||||
</Class>
|
||||
<Class Name="Entidades.Detalle<T>">
|
||||
<Position X="10.75" Y="0.5" Width="1.5" />
|
||||
<TypeIdentifier>
|
||||
<HashCode>AAACAAEAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAA=</HashCode>
|
||||
<FileName>Detalle.cs</FileName>
|
||||
</TypeIdentifier>
|
||||
</Class>
|
||||
<Class Name="Entidades.DetalleFactura">
|
||||
<Position X="12.5" Y="2.25" Width="1.5" />
|
||||
<InheritanceLine Type="Entidades.Detalle<T>" ManuallyRouted="true" FixedFromPoint="true">
|
||||
<Path>
|
||||
<Point X="12.25" Y="1.375" />
|
||||
<Point X="13.25" Y="1.375" />
|
||||
<Point X="13.25" Y="2.25" />
|
||||
</Path>
|
||||
</InheritanceLine>
|
||||
<TypeIdentifier>
|
||||
<HashCode>AAAAAAAAAAAEAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=</HashCode>
|
||||
<FileName>DetalleFactura.cs</FileName>
|
||||
</TypeIdentifier>
|
||||
</Class>
|
||||
<Class Name="Entidades.DetalleOrdenDeCompra">
|
||||
<Position X="10" Y="2.75" Width="2" />
|
||||
<InheritanceLine Type="Entidades.Detalle<T>" ManuallyRouted="true" FixedFromPoint="true">
|
||||
<Path>
|
||||
<Point X="11.812" Y="1.988" />
|
||||
<Point X="11.812" Y="2.365" />
|
||||
<Point X="11" Y="2.365" />
|
||||
<Point X="11" Y="2.75" />
|
||||
</Path>
|
||||
</InheritanceLine>
|
||||
<TypeIdentifier>
|
||||
<HashCode>AAACAASAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAA=</HashCode>
|
||||
<FileName>DetalleOrdenDeCompra.cs</FileName>
|
||||
</TypeIdentifier>
|
||||
<ShowAsAssociation>
|
||||
<Property Name="presupuesto" />
|
||||
</ShowAsAssociation>
|
||||
</Class>
|
||||
<Class Name="Entidades.DetallePresupuesto">
|
||||
<Position X="6.25" Y="1.25" Width="1.75" />
|
||||
<InheritanceLine Type="Entidades.Detalle<T>" ManuallyRouted="true" FixedFromPoint="true">
|
||||
<Path>
|
||||
<Point X="10.75" Y="1.438" />
|
||||
<Point X="8" Y="1.438" />
|
||||
</Path>
|
||||
</InheritanceLine>
|
||||
<TypeIdentifier>
|
||||
<HashCode>AAAAAAAAAAAEAAAAAAAAEAAAQABAAAAAAAAAAAAAAAA=</HashCode>
|
||||
<FileName>DetallePresupuesto.cs</FileName>
|
||||
</TypeIdentifier>
|
||||
</Class>
|
||||
<Class Name="Entidades.Factura">
|
||||
<Position X="14.75" Y="4.5" Width="1.5" />
|
||||
<TypeIdentifier>
|
||||
<HashCode>AAACAAAAAAAQAAEAAACAAAACBAABQAAAAAAAAAAAAAA=</HashCode>
|
||||
<FileName>Factura.cs</FileName>
|
||||
</TypeIdentifier>
|
||||
<ShowAsAssociation>
|
||||
<Property Name="Cliente" />
|
||||
</ShowAsAssociation>
|
||||
<ShowAsCollectionAssociation>
|
||||
<Field Name="detalles" />
|
||||
</ShowAsCollectionAssociation>
|
||||
</Class>
|
||||
<Class Name="Entidades.Lote">
|
||||
<Position X="2" Y="0.75" Width="2" />
|
||||
<InheritanceLine Type="Entidades.Detalle<T>" FixedFromPoint="true">
|
||||
<Path>
|
||||
<Point X="10.75" Y="1" />
|
||||
<Point X="4" Y="1" />
|
||||
</Path>
|
||||
</InheritanceLine>
|
||||
<TypeIdentifier>
|
||||
<HashCode>AAAAAAAAAAAAAAEAAAAAAAAAAAAAABAAAAAAAAAAAAA=</HashCode>
|
||||
<FileName>Lote.cs</FileName>
|
||||
</TypeIdentifier>
|
||||
</Class>
|
||||
<Class Name="Entidades.OrdenDeCompra">
|
||||
<Position X="10" Y="5.25" Width="1.5" />
|
||||
<AssociationLine Name="detalles" Type="Entidades.DetalleOrdenDeCompra">
|
||||
<MemberNameLabel ManuallyPlaced="true">
|
||||
<Position X="-0.005" Y="1.175" />
|
||||
</MemberNameLabel>
|
||||
</AssociationLine>
|
||||
<TypeIdentifier>
|
||||
<HashCode>AAACAAAAAAAQABAAAAAAAAADBAABAAAAAAAAAAAAAAA=</HashCode>
|
||||
<FileName>OrdenDeCompra.cs</FileName>
|
||||
</TypeIdentifier>
|
||||
<ShowAsAssociation>
|
||||
<Property Name="Proveedor" />
|
||||
</ShowAsAssociation>
|
||||
<ShowAsCollectionAssociation>
|
||||
<Field Name="detalles" />
|
||||
</ShowAsCollectionAssociation>
|
||||
</Class>
|
||||
<Class Name="Entidades.Presupuesto">
|
||||
<Position X="7.25" Y="3.5" Width="1.5" />
|
||||
<AssociationLine Name="detalles" Type="Entidades.DetallePresupuesto" FixedFromPoint="true" FixedToPoint="true">
|
||||
<Path>
|
||||
<Point X="7.25" Y="4.062" />
|
||||
<Point X="6.875" Y="4.062" />
|
||||
<Point X="6.875" Y="3.06" />
|
||||
</Path>
|
||||
</AssociationLine>
|
||||
<TypeIdentifier>
|
||||
<HashCode>AAACAAAAAAAQAAEAAAAAAAADBAADABAAAAgAAAAAAAA=</HashCode>
|
||||
<FileName>Presupuesto.cs</FileName>
|
||||
</TypeIdentifier>
|
||||
<ShowAsAssociation>
|
||||
<Property Name="Proveedor" />
|
||||
</ShowAsAssociation>
|
||||
<ShowAsCollectionAssociation>
|
||||
<Field Name="detalles" />
|
||||
</ShowAsCollectionAssociation>
|
||||
</Class>
|
||||
<Class Name="Entidades.Producto">
|
||||
<Position X="4.25" Y="8.25" Width="1.75" />
|
||||
<Members>
|
||||
<Method Name="AñadirCategoria" Hidden="true" />
|
||||
<Field Name="categorias" Hidden="true" />
|
||||
<Method Name="EliminarCategoria" Hidden="true" />
|
||||
<Method Name="MostrarCategorias" Hidden="true" />
|
||||
</Members>
|
||||
<AssociationLine Name="proveedores" Type="Entidades.Proveedor" ManuallyRouted="true" FixedFromPoint="true">
|
||||
<Path>
|
||||
<Point X="6" Y="8.375" />
|
||||
<Point X="6.75" Y="8.375" />
|
||||
<Point X="6.75" Y="8.375" />
|
||||
<Point X="7" Y="8.375" />
|
||||
</Path>
|
||||
</AssociationLine>
|
||||
<TypeIdentifier>
|
||||
<HashCode>AAECAQAAAgAAQAAgAAAAgAAYAAQAABAAIAAAAAAAAAA=</HashCode>
|
||||
<FileName>Producto.cs</FileName>
|
||||
</TypeIdentifier>
|
||||
<ShowAsAssociation>
|
||||
<Property Name="Categoria" />
|
||||
</ShowAsAssociation>
|
||||
<ShowAsCollectionAssociation>
|
||||
<Field Name="proveedores" />
|
||||
</ShowAsCollectionAssociation>
|
||||
</Class>
|
||||
<Class Name="Entidades.Proveedor">
|
||||
<Position X="7" Y="6.75" Width="1.5" />
|
||||
<TypeIdentifier>
|
||||
<HashCode>AIAAQAAAAAAAAAAAACAAgAAAAAAAABAAAAAAAAAAAAA=</HashCode>
|
||||
<FileName>Proveedor.cs</FileName>
|
||||
</TypeIdentifier>
|
||||
</Class>
|
||||
<Class Name="Entidades.Remito">
|
||||
<Position X="0.5" Y="6.75" Width="2.25" />
|
||||
<TypeIdentifier>
|
||||
<HashCode>AAACAAAAAgAAAAAAAABAAAABACAAAAAAAAAAAAAAAAA=</HashCode>
|
||||
<FileName>Remito.cs</FileName>
|
||||
</TypeIdentifier>
|
||||
<ShowAsAssociation>
|
||||
<Property Name="Proveedor" />
|
||||
</ShowAsAssociation>
|
||||
<ShowAsCollectionAssociation>
|
||||
<Field Name="lotesDeProductosEntregados" />
|
||||
</ShowAsCollectionAssociation>
|
||||
</Class>
|
||||
<Class Name="Entidades.ProductoNoPercedero">
|
||||
<Position X="8.75" Y="8.75" Width="1.5" />
|
||||
<TypeIdentifier>
|
||||
<HashCode>AAAAAAAAAAAIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=</HashCode>
|
||||
<FileName>ProductoNoPercedero.cs</FileName>
|
||||
</TypeIdentifier>
|
||||
<ShowAsAssociation>
|
||||
<Property Name="TipoDeEnvase" />
|
||||
</ShowAsAssociation>
|
||||
</Class>
|
||||
<Class Name="Entidades.ProductoPercedero">
|
||||
<Position X="8.75" Y="10.25" Width="1.5" />
|
||||
<InheritanceLine Type="Entidades.Producto" FixedFromPoint="true">
|
||||
<Path>
|
||||
<Point X="6" Y="10.25" />
|
||||
<Point X="8.75" Y="10.25" />
|
||||
</Path>
|
||||
</InheritanceLine>
|
||||
<TypeIdentifier>
|
||||
<HashCode>AAAAAAAAAAAAAAAAAAAAAAgAAAAAAAAAAAAAAAAAAAE=</HashCode>
|
||||
<FileName>ProductoPercedero.cs</FileName>
|
||||
</TypeIdentifier>
|
||||
</Class>
|
||||
<Enum Name="Entidades.EnvaseTipo">
|
||||
<Position X="11" Y="8.5" Width="1.5" />
|
||||
<TypeIdentifier>
|
||||
<HashCode>AAAAAAAAAAAAAAAAAAAAAAAAAAAACAAAAAIEAAIAAAA=</HashCode>
|
||||
<FileName>EnvaseTipo.cs</FileName>
|
||||
</TypeIdentifier>
|
||||
</Enum>
|
||||
<Font Name="Segoe UI" Size="9" />
|
||||
</ClassDiagram>
|
||||
@@ -1,10 +1,17 @@
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Entidades
|
||||
{
|
||||
public enum EnvaseTipo
|
||||
{
|
||||
Plastico,
|
||||
Enlatado,
|
||||
Carton
|
||||
Carton,
|
||||
NoTiene
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,28 +1,10 @@
|
||||
|
||||
namespace Entidades
|
||||
{
|
||||
public class Lote
|
||||
public class Lote: Detalle<Producto>
|
||||
{
|
||||
public int Id { get; set; }
|
||||
public DateTime Fecha { get; set; }
|
||||
public Producto Producto { get; set; }
|
||||
public long CantidadDeProductos { get; set; }
|
||||
public bool Habilitado { get; set; }
|
||||
public string NombreProducto
|
||||
{
|
||||
get { return Producto?.Nombre ?? string.Empty; }
|
||||
}
|
||||
<<<<<<< HEAD
|
||||
public double PrecioUnitario
|
||||
{
|
||||
get { return Producto?.Precio ?? 0; }
|
||||
}
|
||||
public double Subtotal
|
||||
{
|
||||
get { return PrecioUnitario * CantidadDeProductos; }
|
||||
}
|
||||
=======
|
||||
>>>>>>> 5b78d74e54350285696596720e82f5fbd99b4d02
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using System.Collections.ObjectModel;
|
||||
using System.Security.Cryptography.X509Certificates;
|
||||
|
||||
namespace Entidades
|
||||
{
|
||||
@@ -24,5 +25,20 @@ namespace Entidades
|
||||
{
|
||||
return detalles.AsReadOnly();
|
||||
}
|
||||
|
||||
public double MontoTotal
|
||||
{
|
||||
get
|
||||
{
|
||||
return detalles.Sum(x => x.SubTotal);
|
||||
}
|
||||
}
|
||||
public string NombreProveedor
|
||||
{
|
||||
get
|
||||
{
|
||||
return Proveedor.Nombre;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,29 +0,0 @@
|
||||
using System.Collections.ObjectModel;
|
||||
|
||||
namespace Entidades
|
||||
{
|
||||
public class PedidoDePresupuesto
|
||||
{
|
||||
public int Id { get; set; }
|
||||
public DateTime Fecha { get; set; }
|
||||
private List<DetallePedido> detallesPedidos = new List<DetallePedido>();
|
||||
public Proveedor Proveedor { get; set; }
|
||||
|
||||
public void AñadirDetalle(DetallePedido detalle)
|
||||
{
|
||||
detallesPedidos.Add(detalle);
|
||||
}
|
||||
|
||||
public bool EliminarDetalle(DetallePedido detalle)
|
||||
{
|
||||
var aeliminar = detallesPedidos.Find(x => x.Id == detalle.Id);
|
||||
if (aeliminar == null) return false;
|
||||
return detallesPedidos.Remove(aeliminar);
|
||||
}
|
||||
|
||||
public ReadOnlyCollection<DetallePedido> MostrarDetalles()
|
||||
{
|
||||
return detallesPedidos.AsReadOnly();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -9,6 +9,15 @@ namespace Entidades
|
||||
public bool Habilitado { get; set; }
|
||||
public bool Aceptado { get; set; }
|
||||
public Proveedor Proveedor { get; set; }
|
||||
|
||||
public string ProveedorNombre
|
||||
{
|
||||
get
|
||||
{
|
||||
return Proveedor.Nombre;
|
||||
}
|
||||
}
|
||||
|
||||
private List<DetallePresupuesto> detalles = new List<DetallePresupuesto>();
|
||||
|
||||
public void AñadirDetalle(DetallePresupuesto det) {
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using System.Collections.ObjectModel;
|
||||
using System.ComponentModel;
|
||||
|
||||
namespace Entidades
|
||||
{
|
||||
@@ -8,7 +9,35 @@ namespace Entidades
|
||||
public string Nombre { get; set; }
|
||||
public double Precio { get; set; }
|
||||
public bool Habilitado { get; set; }
|
||||
public bool EsPerecedero { get; set; }
|
||||
[Browsable(false)]
|
||||
public Categoria Categoria { get; set; }
|
||||
|
||||
public string Cartegoria_
|
||||
{
|
||||
get
|
||||
{
|
||||
return Categoria.Descripcion;
|
||||
}
|
||||
}
|
||||
|
||||
public List<Proveedor> proveedores = new List<Proveedor>();
|
||||
|
||||
public void AñadirProveedor(Proveedor proveedor)
|
||||
{
|
||||
if(proveedor == null) return;
|
||||
proveedores.Add(proveedor);
|
||||
}
|
||||
public bool EliminarProveedor(Proveedor proveedor)
|
||||
{
|
||||
var pAEliminar = proveedores.FirstOrDefault(x => x.Cuit == proveedor.Cuit);
|
||||
if (pAEliminar == null) return false;
|
||||
return proveedores.Remove(pAEliminar);
|
||||
}
|
||||
public ReadOnlyCollection<Proveedor> ListarProveedores()
|
||||
{
|
||||
return proveedores.AsReadOnly();
|
||||
}
|
||||
private List<Categoria> categorias = new List<Categoria>();
|
||||
|
||||
public void AñadirCategoria(Categoria cat) {
|
||||
|
||||
19
Entidades/ProductoNoPercedero.cs
Normal file
19
Entidades/ProductoNoPercedero.cs
Normal file
@@ -0,0 +1,19 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Entidades
|
||||
{
|
||||
public class ProductoNoPercedero : Producto
|
||||
{
|
||||
public EnvaseTipo TipoDeEnvase { get; set; }
|
||||
|
||||
public ProductoNoPercedero()
|
||||
{
|
||||
EsPerecedero = false; // Indica que este producto no es perecedero
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
20
Entidades/ProductoPercedero.cs
Normal file
20
Entidades/ProductoPercedero.cs
Normal file
@@ -0,0 +1,20 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Entidades
|
||||
{
|
||||
public class ProductoPercedero : Producto
|
||||
{
|
||||
public int MesesHastaConsumoPreferente { get; set; }
|
||||
public int MesesHastaVencimiento { get; set; }
|
||||
|
||||
public ProductoPercedero()
|
||||
{
|
||||
EsPerecedero = true; // Indica que este producto es perecedero
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,23 +0,0 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:4.0.30319.42000
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
using System;
|
||||
using System.Reflection;
|
||||
|
||||
[assembly: System.Reflection.AssemblyCompanyAttribute("Entidades")]
|
||||
[assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")]
|
||||
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")]
|
||||
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0")]
|
||||
[assembly: System.Reflection.AssemblyProductAttribute("Entidades")]
|
||||
[assembly: System.Reflection.AssemblyTitleAttribute("Entidades")]
|
||||
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]
|
||||
|
||||
// Generated by the MSBuild WriteCodeFragment class.
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
1589bc3738d4d92e8df1687e356ae3d2c87cb333
|
||||
@@ -1,11 +0,0 @@
|
||||
is_global = true
|
||||
build_property.TargetFramework = net6.0
|
||||
build_property.TargetPlatformMinVersion =
|
||||
build_property.UsingMicrosoftNETSdkWeb =
|
||||
build_property.ProjectTypeGuids =
|
||||
build_property.InvariantGlobalization =
|
||||
build_property.PlatformNeutralAssembly =
|
||||
build_property.EnforceExtendedAnalyzerRules =
|
||||
build_property._SupportedPlatformList = Linux,macOS,Windows
|
||||
build_property.RootNamespace = Entidades
|
||||
build_property.ProjectDir = C:\Users\fedpo\Downloads\final actual\final actual\Entidades\
|
||||
@@ -1,17 +1,31 @@
|
||||
{
|
||||
"format": 1,
|
||||
"restore": {
|
||||
"C:\\Users\\fedpo\\Downloads\\final actual\\final actual\\Entidades\\Entidades.csproj": {}
|
||||
<<<<<<< HEAD
|
||||
"C:\\Users\\fedpo\\Desktop\\Final actual\\Entidades\\Entidades.csproj": {}
|
||||
},
|
||||
"projects": {
|
||||
"C:\\Users\\fedpo\\Downloads\\final actual\\final actual\\Entidades\\Entidades.csproj": {
|
||||
"C:\\Users\\fedpo\\Desktop\\Final actual\\Entidades\\Entidades.csproj": {
|
||||
"version": "1.0.0",
|
||||
"restore": {
|
||||
"projectUniqueName": "C:\\Users\\fedpo\\Downloads\\final actual\\final actual\\Entidades\\Entidades.csproj",
|
||||
"projectUniqueName": "C:\\Users\\fedpo\\Desktop\\Final actual\\Entidades\\Entidades.csproj",
|
||||
"projectName": "Entidades",
|
||||
"projectPath": "C:\\Users\\fedpo\\Downloads\\final actual\\final actual\\Entidades\\Entidades.csproj",
|
||||
"projectPath": "C:\\Users\\fedpo\\Desktop\\Final actual\\Entidades\\Entidades.csproj",
|
||||
"packagesPath": "C:\\Users\\fedpo\\.nuget\\packages\\",
|
||||
"outputPath": "C:\\Users\\fedpo\\Downloads\\final actual\\final actual\\Entidades\\obj\\",
|
||||
"outputPath": "C:\\Users\\fedpo\\Desktop\\Final actual\\Entidades\\obj\\",
|
||||
=======
|
||||
"C:\\Users\\fedpo\\Downloads\\Final actua2l\\Final actual\\Entidades\\Entidades.csproj": {}
|
||||
},
|
||||
"projects": {
|
||||
"C:\\Users\\fedpo\\Downloads\\Final actua2l\\Final actual\\Entidades\\Entidades.csproj": {
|
||||
"version": "1.0.0",
|
||||
"restore": {
|
||||
"projectUniqueName": "C:\\Users\\fedpo\\Downloads\\Final actua2l\\Final actual\\Entidades\\Entidades.csproj",
|
||||
"projectName": "Entidades",
|
||||
"projectPath": "C:\\Users\\fedpo\\Downloads\\Final actua2l\\Final actual\\Entidades\\Entidades.csproj",
|
||||
"packagesPath": "C:\\Users\\fedpo\\.nuget\\packages\\",
|
||||
"outputPath": "C:\\Users\\fedpo\\Downloads\\Final actua2l\\Final actual\\Entidades\\obj\\",
|
||||
>>>>>>> 88e614d538344c4aeb32449ffc15cff3993b7857
|
||||
"projectStyle": "PackageReference",
|
||||
"configFilePaths": [
|
||||
"C:\\Users\\fedpo\\AppData\\Roaming\\NuGet\\NuGet.Config",
|
||||
|
||||
@@ -13,11 +13,19 @@
|
||||
"project": {
|
||||
"version": "1.0.0",
|
||||
"restore": {
|
||||
"projectUniqueName": "C:\\Users\\fedpo\\Downloads\\final actual\\final actual\\Entidades\\Entidades.csproj",
|
||||
<<<<<<< HEAD
|
||||
"projectUniqueName": "C:\\Users\\fedpo\\Desktop\\Final actual\\Entidades\\Entidades.csproj",
|
||||
"projectName": "Entidades",
|
||||
"projectPath": "C:\\Users\\fedpo\\Downloads\\final actual\\final actual\\Entidades\\Entidades.csproj",
|
||||
"projectPath": "C:\\Users\\fedpo\\Desktop\\Final actual\\Entidades\\Entidades.csproj",
|
||||
"packagesPath": "C:\\Users\\fedpo\\.nuget\\packages\\",
|
||||
"outputPath": "C:\\Users\\fedpo\\Downloads\\final actual\\final actual\\Entidades\\obj\\",
|
||||
"outputPath": "C:\\Users\\fedpo\\Desktop\\Final actual\\Entidades\\obj\\",
|
||||
=======
|
||||
"projectUniqueName": "C:\\Users\\fedpo\\Downloads\\Final actua2l\\Final actual\\Entidades\\Entidades.csproj",
|
||||
"projectName": "Entidades",
|
||||
"projectPath": "C:\\Users\\fedpo\\Downloads\\Final actua2l\\Final actual\\Entidades\\Entidades.csproj",
|
||||
"packagesPath": "C:\\Users\\fedpo\\.nuget\\packages\\",
|
||||
"outputPath": "C:\\Users\\fedpo\\Downloads\\Final actua2l\\Final actual\\Entidades\\obj\\",
|
||||
>>>>>>> 88e614d538344c4aeb32449ffc15cff3993b7857
|
||||
"projectStyle": "PackageReference",
|
||||
"configFilePaths": [
|
||||
"C:\\Users\\fedpo\\AppData\\Roaming\\NuGet\\NuGet.Config",
|
||||
|
||||
@@ -1,8 +0,0 @@
|
||||
{
|
||||
"version": 2,
|
||||
"dgSpecHash": "xYCKCMKm+oXscuoQamJhNB9nRxekBQBuz6IDgUB/8WpDnH3Ts7NVTClR8NJpQF10id2fDRpsOygcKaFzlcHs+w==",
|
||||
"success": true,
|
||||
"projectFilePath": "C:\\Users\\fedpo\\Downloads\\final actual\\final actual\\Entidades\\Entidades.csproj",
|
||||
"expectedPackageFiles": [],
|
||||
"logs": []
|
||||
}
|
||||
Binary file not shown.
Binary file not shown.
@@ -1,36 +0,0 @@
|
||||
{
|
||||
"runtimeTarget": {
|
||||
"name": ".NETCoreApp,Version=v6.0",
|
||||
"signature": ""
|
||||
},
|
||||
"compilationOptions": {},
|
||||
"targets": {
|
||||
".NETCoreApp,Version=v6.0": {
|
||||
"Informes/1.0.0": {
|
||||
"dependencies": {
|
||||
"Entidades": "1.0.0"
|
||||
},
|
||||
"runtime": {
|
||||
"Informes.dll": {}
|
||||
}
|
||||
},
|
||||
"Entidades/1.0.0": {
|
||||
"runtime": {
|
||||
"Entidades.dll": {}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"libraries": {
|
||||
"Informes/1.0.0": {
|
||||
"type": "project",
|
||||
"serviceable": false,
|
||||
"sha512": ""
|
||||
},
|
||||
"Entidades/1.0.0": {
|
||||
"type": "project",
|
||||
"serviceable": false,
|
||||
"sha512": ""
|
||||
}
|
||||
}
|
||||
}
|
||||
Binary file not shown.
Binary file not shown.
@@ -1,23 +0,0 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:4.0.30319.42000
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
using System;
|
||||
using System.Reflection;
|
||||
|
||||
[assembly: System.Reflection.AssemblyCompanyAttribute("Informes")]
|
||||
[assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")]
|
||||
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")]
|
||||
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0")]
|
||||
[assembly: System.Reflection.AssemblyProductAttribute("Informes")]
|
||||
[assembly: System.Reflection.AssemblyTitleAttribute("Informes")]
|
||||
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]
|
||||
|
||||
// Generated by the MSBuild WriteCodeFragment class.
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
55f9793ce92bee586e65f5b38a3a7676261de34c
|
||||
@@ -1,11 +0,0 @@
|
||||
is_global = true
|
||||
build_property.TargetFramework = net6.0
|
||||
build_property.TargetPlatformMinVersion =
|
||||
build_property.UsingMicrosoftNETSdkWeb =
|
||||
build_property.ProjectTypeGuids =
|
||||
build_property.InvariantGlobalization =
|
||||
build_property.PlatformNeutralAssembly =
|
||||
build_property.EnforceExtendedAnalyzerRules =
|
||||
build_property._SupportedPlatformList = Linux,macOS,Windows
|
||||
build_property.RootNamespace = Informes
|
||||
build_property.ProjectDir = C:\Users\fedpo\Downloads\final actual\final actual\Informes\
|
||||
Binary file not shown.
Binary file not shown.
@@ -1 +0,0 @@
|
||||
59ca0345c28b4ca3e61ae3f6ff36103ebf42ff8f
|
||||
@@ -13,3 +13,33 @@ C:\Users\fedpo\Downloads\final actual\final actual\Informes\obj\Debug\net6.0\Inf
|
||||
C:\Users\fedpo\Downloads\final actual\final actual\Informes\obj\Debug\net6.0\refint\Informes.dll
|
||||
C:\Users\fedpo\Downloads\final actual\final actual\Informes\obj\Debug\net6.0\Informes.pdb
|
||||
C:\Users\fedpo\Downloads\final actual\final actual\Informes\obj\Debug\net6.0\ref\Informes.dll
|
||||
C:\Users\Nacho\Desktop\Final actual\Informes\bin\Debug\net6.0\Informes.deps.json
|
||||
C:\Users\Nacho\Desktop\Final actual\Informes\bin\Debug\net6.0\Informes.dll
|
||||
C:\Users\Nacho\Desktop\Final actual\Informes\bin\Debug\net6.0\Informes.pdb
|
||||
C:\Users\Nacho\Desktop\Final actual\Informes\bin\Debug\net6.0\Entidades.dll
|
||||
C:\Users\Nacho\Desktop\Final actual\Informes\bin\Debug\net6.0\Entidades.pdb
|
||||
C:\Users\Nacho\Desktop\Final actual\Informes\obj\Debug\net6.0\Informes.csproj.AssemblyReference.cache
|
||||
C:\Users\Nacho\Desktop\Final actual\Informes\obj\Debug\net6.0\Informes.GeneratedMSBuildEditorConfig.editorconfig
|
||||
C:\Users\Nacho\Desktop\Final actual\Informes\obj\Debug\net6.0\Informes.AssemblyInfoInputs.cache
|
||||
C:\Users\Nacho\Desktop\Final actual\Informes\obj\Debug\net6.0\Informes.AssemblyInfo.cs
|
||||
C:\Users\Nacho\Desktop\Final actual\Informes\obj\Debug\net6.0\Informes.csproj.CoreCompileInputs.cache
|
||||
C:\Users\Nacho\Desktop\Final actual\Informes\obj\Debug\net6.0\Informes.csproj.Up2Date
|
||||
C:\Users\Nacho\Desktop\Final actual\Informes\obj\Debug\net6.0\Informes.dll
|
||||
C:\Users\Nacho\Desktop\Final actual\Informes\obj\Debug\net6.0\refint\Informes.dll
|
||||
C:\Users\Nacho\Desktop\Final actual\Informes\obj\Debug\net6.0\Informes.pdb
|
||||
C:\Users\Nacho\Desktop\Final actual\Informes\obj\Debug\net6.0\ref\Informes.dll
|
||||
C:\Users\fedpo\Downloads\final actual\Informes\bin\Debug\net6.0\Informes.deps.json
|
||||
C:\Users\fedpo\Downloads\final actual\Informes\bin\Debug\net6.0\Informes.dll
|
||||
C:\Users\fedpo\Downloads\final actual\Informes\bin\Debug\net6.0\Informes.pdb
|
||||
C:\Users\fedpo\Downloads\final actual\Informes\bin\Debug\net6.0\Entidades.dll
|
||||
C:\Users\fedpo\Downloads\final actual\Informes\bin\Debug\net6.0\Entidades.pdb
|
||||
C:\Users\fedpo\Downloads\final actual\Informes\obj\Debug\net6.0\Informes.csproj.AssemblyReference.cache
|
||||
C:\Users\fedpo\Downloads\final actual\Informes\obj\Debug\net6.0\Informes.GeneratedMSBuildEditorConfig.editorconfig
|
||||
C:\Users\fedpo\Downloads\final actual\Informes\obj\Debug\net6.0\Informes.AssemblyInfoInputs.cache
|
||||
C:\Users\fedpo\Downloads\final actual\Informes\obj\Debug\net6.0\Informes.AssemblyInfo.cs
|
||||
C:\Users\fedpo\Downloads\final actual\Informes\obj\Debug\net6.0\Informes.csproj.CoreCompileInputs.cache
|
||||
C:\Users\fedpo\Downloads\final actual\Informes\obj\Debug\net6.0\Informes.csproj.CopyComplete
|
||||
C:\Users\fedpo\Downloads\final actual\Informes\obj\Debug\net6.0\Informes.dll
|
||||
C:\Users\fedpo\Downloads\final actual\Informes\obj\Debug\net6.0\refint\Informes.dll
|
||||
C:\Users\fedpo\Downloads\final actual\Informes\obj\Debug\net6.0\Informes.pdb
|
||||
C:\Users\fedpo\Downloads\final actual\Informes\obj\Debug\net6.0\ref\Informes.dll
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -1,17 +1,31 @@
|
||||
{
|
||||
"format": 1,
|
||||
"restore": {
|
||||
"C:\\Users\\fedpo\\Downloads\\final actual\\final actual\\Informes\\Informes.csproj": {}
|
||||
<<<<<<< HEAD
|
||||
"C:\\Users\\fedpo\\Desktop\\Final actual\\Informes\\Informes.csproj": {}
|
||||
},
|
||||
"projects": {
|
||||
"C:\\Users\\fedpo\\Downloads\\final actual\\final actual\\Entidades\\Entidades.csproj": {
|
||||
"C:\\Users\\fedpo\\Desktop\\Final actual\\Entidades\\Entidades.csproj": {
|
||||
"version": "1.0.0",
|
||||
"restore": {
|
||||
"projectUniqueName": "C:\\Users\\fedpo\\Downloads\\final actual\\final actual\\Entidades\\Entidades.csproj",
|
||||
"projectUniqueName": "C:\\Users\\fedpo\\Desktop\\Final actual\\Entidades\\Entidades.csproj",
|
||||
"projectName": "Entidades",
|
||||
"projectPath": "C:\\Users\\fedpo\\Downloads\\final actual\\final actual\\Entidades\\Entidades.csproj",
|
||||
"projectPath": "C:\\Users\\fedpo\\Desktop\\Final actual\\Entidades\\Entidades.csproj",
|
||||
"packagesPath": "C:\\Users\\fedpo\\.nuget\\packages\\",
|
||||
"outputPath": "C:\\Users\\fedpo\\Downloads\\final actual\\final actual\\Entidades\\obj\\",
|
||||
"outputPath": "C:\\Users\\fedpo\\Desktop\\Final actual\\Entidades\\obj\\",
|
||||
=======
|
||||
"C:\\Users\\fedpo\\Downloads\\Final actua2l\\Final actual\\Informes\\Informes.csproj": {}
|
||||
},
|
||||
"projects": {
|
||||
"C:\\Users\\fedpo\\Downloads\\Final actua2l\\Final actual\\Entidades\\Entidades.csproj": {
|
||||
"version": "1.0.0",
|
||||
"restore": {
|
||||
"projectUniqueName": "C:\\Users\\fedpo\\Downloads\\Final actua2l\\Final actual\\Entidades\\Entidades.csproj",
|
||||
"projectName": "Entidades",
|
||||
"projectPath": "C:\\Users\\fedpo\\Downloads\\Final actua2l\\Final actual\\Entidades\\Entidades.csproj",
|
||||
"packagesPath": "C:\\Users\\fedpo\\.nuget\\packages\\",
|
||||
"outputPath": "C:\\Users\\fedpo\\Downloads\\Final actua2l\\Final actual\\Entidades\\obj\\",
|
||||
>>>>>>> 88e614d538344c4aeb32449ffc15cff3993b7857
|
||||
"projectStyle": "PackageReference",
|
||||
"configFilePaths": [
|
||||
"C:\\Users\\fedpo\\AppData\\Roaming\\NuGet\\NuGet.Config",
|
||||
@@ -60,14 +74,25 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"C:\\Users\\fedpo\\Downloads\\final actual\\final actual\\Informes\\Informes.csproj": {
|
||||
<<<<<<< HEAD
|
||||
"C:\\Users\\fedpo\\Desktop\\Final actual\\Informes\\Informes.csproj": {
|
||||
"version": "1.0.0",
|
||||
"restore": {
|
||||
"projectUniqueName": "C:\\Users\\fedpo\\Downloads\\final actual\\final actual\\Informes\\Informes.csproj",
|
||||
"projectUniqueName": "C:\\Users\\fedpo\\Desktop\\Final actual\\Informes\\Informes.csproj",
|
||||
"projectName": "Informes",
|
||||
"projectPath": "C:\\Users\\fedpo\\Downloads\\final actual\\final actual\\Informes\\Informes.csproj",
|
||||
"projectPath": "C:\\Users\\fedpo\\Desktop\\Final actual\\Informes\\Informes.csproj",
|
||||
"packagesPath": "C:\\Users\\fedpo\\.nuget\\packages\\",
|
||||
"outputPath": "C:\\Users\\fedpo\\Downloads\\final actual\\final actual\\Informes\\obj\\",
|
||||
"outputPath": "C:\\Users\\fedpo\\Desktop\\Final actual\\Informes\\obj\\",
|
||||
=======
|
||||
"C:\\Users\\fedpo\\Downloads\\Final actua2l\\Final actual\\Informes\\Informes.csproj": {
|
||||
"version": "1.0.0",
|
||||
"restore": {
|
||||
"projectUniqueName": "C:\\Users\\fedpo\\Downloads\\Final actua2l\\Final actual\\Informes\\Informes.csproj",
|
||||
"projectName": "Informes",
|
||||
"projectPath": "C:\\Users\\fedpo\\Downloads\\Final actua2l\\Final actual\\Informes\\Informes.csproj",
|
||||
"packagesPath": "C:\\Users\\fedpo\\.nuget\\packages\\",
|
||||
"outputPath": "C:\\Users\\fedpo\\Downloads\\Final actua2l\\Final actual\\Informes\\obj\\",
|
||||
>>>>>>> 88e614d538344c4aeb32449ffc15cff3993b7857
|
||||
"projectStyle": "PackageReference",
|
||||
"configFilePaths": [
|
||||
"C:\\Users\\fedpo\\AppData\\Roaming\\NuGet\\NuGet.Config",
|
||||
@@ -85,8 +110,13 @@
|
||||
"net6.0": {
|
||||
"targetAlias": "net6.0",
|
||||
"projectReferences": {
|
||||
"C:\\Users\\fedpo\\Downloads\\final actual\\final actual\\Entidades\\Entidades.csproj": {
|
||||
"projectPath": "C:\\Users\\fedpo\\Downloads\\final actual\\final actual\\Entidades\\Entidades.csproj"
|
||||
<<<<<<< HEAD
|
||||
"C:\\Users\\fedpo\\Desktop\\Final actual\\Entidades\\Entidades.csproj": {
|
||||
"projectPath": "C:\\Users\\fedpo\\Desktop\\Final actual\\Entidades\\Entidades.csproj"
|
||||
=======
|
||||
"C:\\Users\\fedpo\\Downloads\\Final actua2l\\Final actual\\Entidades\\Entidades.csproj": {
|
||||
"projectPath": "C:\\Users\\fedpo\\Downloads\\Final actua2l\\Final actual\\Entidades\\Entidades.csproj"
|
||||
>>>>>>> 88e614d538344c4aeb32449ffc15cff3993b7857
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -32,11 +32,19 @@
|
||||
"project": {
|
||||
"version": "1.0.0",
|
||||
"restore": {
|
||||
"projectUniqueName": "C:\\Users\\fedpo\\Downloads\\final actual\\final actual\\Informes\\Informes.csproj",
|
||||
<<<<<<< HEAD
|
||||
"projectUniqueName": "C:\\Users\\fedpo\\Desktop\\Final actual\\Informes\\Informes.csproj",
|
||||
"projectName": "Informes",
|
||||
"projectPath": "C:\\Users\\fedpo\\Downloads\\final actual\\final actual\\Informes\\Informes.csproj",
|
||||
"projectPath": "C:\\Users\\fedpo\\Desktop\\Final actual\\Informes\\Informes.csproj",
|
||||
"packagesPath": "C:\\Users\\fedpo\\.nuget\\packages\\",
|
||||
"outputPath": "C:\\Users\\fedpo\\Downloads\\final actual\\final actual\\Informes\\obj\\",
|
||||
"outputPath": "C:\\Users\\fedpo\\Desktop\\Final actual\\Informes\\obj\\",
|
||||
=======
|
||||
"projectUniqueName": "C:\\Users\\fedpo\\Downloads\\Final actua2l\\Final actual\\Informes\\Informes.csproj",
|
||||
"projectName": "Informes",
|
||||
"projectPath": "C:\\Users\\fedpo\\Downloads\\Final actua2l\\Final actual\\Informes\\Informes.csproj",
|
||||
"packagesPath": "C:\\Users\\fedpo\\.nuget\\packages\\",
|
||||
"outputPath": "C:\\Users\\fedpo\\Downloads\\Final actua2l\\Final actual\\Informes\\obj\\",
|
||||
>>>>>>> 88e614d538344c4aeb32449ffc15cff3993b7857
|
||||
"projectStyle": "PackageReference",
|
||||
"configFilePaths": [
|
||||
"C:\\Users\\fedpo\\AppData\\Roaming\\NuGet\\NuGet.Config",
|
||||
@@ -54,8 +62,13 @@
|
||||
"net6.0": {
|
||||
"targetAlias": "net6.0",
|
||||
"projectReferences": {
|
||||
"C:\\Users\\fedpo\\Downloads\\final actual\\final actual\\Entidades\\Entidades.csproj": {
|
||||
"projectPath": "C:\\Users\\fedpo\\Downloads\\final actual\\final actual\\Entidades\\Entidades.csproj"
|
||||
<<<<<<< HEAD
|
||||
"C:\\Users\\fedpo\\Desktop\\Final actual\\Entidades\\Entidades.csproj": {
|
||||
"projectPath": "C:\\Users\\fedpo\\Desktop\\Final actual\\Entidades\\Entidades.csproj"
|
||||
=======
|
||||
"C:\\Users\\fedpo\\Downloads\\Final actua2l\\Final actual\\Entidades\\Entidades.csproj": {
|
||||
"projectPath": "C:\\Users\\fedpo\\Downloads\\Final actua2l\\Final actual\\Entidades\\Entidades.csproj"
|
||||
>>>>>>> 88e614d538344c4aeb32449ffc15cff3993b7857
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,8 +0,0 @@
|
||||
{
|
||||
"version": 2,
|
||||
"dgSpecHash": "INVcMeeXX3RoJw93Ye8x1Z2zKXKisJfXRKwLszX9TOBmcSCPTpBbhbgBcrnpGdxF2t/KPFVRZ2CzsnGvpyudOQ==",
|
||||
"success": true,
|
||||
"projectFilePath": "C:\\Users\\fedpo\\Downloads\\final actual\\final actual\\Informes\\Informes.csproj",
|
||||
"expectedPackageFiles": [],
|
||||
"logs": []
|
||||
}
|
||||
@@ -6,11 +6,6 @@ namespace Modelo
|
||||
{
|
||||
public override bool Add(Cliente t)
|
||||
{
|
||||
if (ExistePorCuit(t.Cuit))
|
||||
{
|
||||
throw new InvalidOperationException($"El Cliente con el CUIT {t.Cuit} ya existe.");
|
||||
}
|
||||
|
||||
bool ret = false;
|
||||
try
|
||||
{
|
||||
@@ -33,8 +28,6 @@ namespace Modelo
|
||||
override public bool Mod(Cliente t)
|
||||
{
|
||||
bool ret = false;
|
||||
|
||||
|
||||
try
|
||||
{
|
||||
var clienteAModificar = almacen.FindIndex(x => x.Cuit == t.Cuit);
|
||||
@@ -61,7 +54,7 @@ namespace Modelo
|
||||
var clienteAEliminar = almacen.Find(x => x.Cuit == t.Cuit);
|
||||
if (clienteAEliminar != null)
|
||||
{
|
||||
almacen.Remove(clienteAEliminar);
|
||||
clienteAEliminar.Habilitado = false;
|
||||
ret = true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,6 +4,7 @@ namespace Modelo
|
||||
{
|
||||
public sealed class RepositorioLote : RepositorioBase<Lote, RepositorioLote>
|
||||
{
|
||||
|
||||
override public bool Add(Lote t)
|
||||
{
|
||||
bool ret = false;
|
||||
@@ -21,6 +22,23 @@ namespace Modelo
|
||||
return ret;
|
||||
}
|
||||
|
||||
public bool Add(Remito rem)
|
||||
{
|
||||
if (rem.MostrarLotes().Count <= 0) return true;
|
||||
var ret = false;
|
||||
try
|
||||
{
|
||||
foreach (var detalle in rem.MostrarLotes())
|
||||
{
|
||||
ret = Add(detalle);
|
||||
}
|
||||
}catch (Exception)
|
||||
{
|
||||
throw;
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
override public bool Mod(Lote t)
|
||||
{
|
||||
bool ret = false;
|
||||
@@ -51,7 +69,7 @@ namespace Modelo
|
||||
var loteAEliminar = almacen.Find(x => x.Id == t.Id);
|
||||
if (loteAEliminar != null)
|
||||
{
|
||||
almacen.Remove(loteAEliminar);
|
||||
loteAEliminar.Habilitado = false;
|
||||
ret = true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,72 +0,0 @@
|
||||
using System.Collections.ObjectModel;
|
||||
using Entidades;
|
||||
|
||||
namespace Modelo
|
||||
{
|
||||
public sealed class RepositorioPedidoDePresupuesto : RepositorioBase<PedidoDePresupuesto, RepositorioPedidoDePresupuesto>
|
||||
{
|
||||
override public bool Add(PedidoDePresupuesto t)
|
||||
{
|
||||
bool ret = false;
|
||||
|
||||
try
|
||||
{
|
||||
almacen.Add(t);
|
||||
ret = true;
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
throw;
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
override public bool Mod(PedidoDePresupuesto t)
|
||||
{
|
||||
bool ret = false;
|
||||
|
||||
try
|
||||
{
|
||||
var pedidoAModificar = almacen.FindIndex(x => x.Id == t.Id);
|
||||
if (pedidoAModificar > -1)
|
||||
{
|
||||
almacen[pedidoAModificar] = t;
|
||||
ret = true;
|
||||
}
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
throw;
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
override public bool Del(PedidoDePresupuesto t)
|
||||
{
|
||||
bool ret = false;
|
||||
|
||||
try
|
||||
{
|
||||
var pedidoAEliminar = almacen.Find(x => x.Id == t.Id);
|
||||
if (pedidoAEliminar != null)
|
||||
{
|
||||
almacen.Remove(pedidoAEliminar);
|
||||
ret = true;
|
||||
}
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
throw;
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
public ReadOnlyCollection<DetallePedido> MostrarDetalles(PedidoDePresupuesto pedido)
|
||||
{
|
||||
return pedido.MostrarDetalles();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -11,12 +11,17 @@ namespace Modelo
|
||||
|
||||
try
|
||||
{
|
||||
almacen.Add(t);
|
||||
ret = true;
|
||||
// Verifica si ya existe un presupuesto con el mismo ID
|
||||
if (!ExistePorId(t.Id))
|
||||
{
|
||||
almacen.Add(t);
|
||||
ret = true;
|
||||
}
|
||||
}
|
||||
catch (Exception)
|
||||
catch (Exception ex)
|
||||
{
|
||||
throw;
|
||||
// Maneja o registra la excepción
|
||||
Console.WriteLine($"Error al agregar presupuesto: {ex.Message}");
|
||||
}
|
||||
|
||||
return ret;
|
||||
@@ -31,19 +36,42 @@ namespace Modelo
|
||||
var presupuestoAModificar = almacen.FindIndex(x => x.Id == t.Id);
|
||||
if (presupuestoAModificar > -1)
|
||||
{
|
||||
|
||||
almacen[presupuestoAModificar] = t;
|
||||
ret = true;
|
||||
}
|
||||
}
|
||||
catch (Exception)
|
||||
catch (Exception ex)
|
||||
{
|
||||
throw;
|
||||
// Maneja o registra la excepción
|
||||
Console.WriteLine($"Error al modificar presupuesto: {ex.Message}");
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
public bool ExistePorId(int id)
|
||||
{
|
||||
// Asegúrate de que `almacen` es la lista correcta
|
||||
return almacen.Any(p => p.Id == id);
|
||||
}
|
||||
|
||||
public bool AceptarPresupuesto(Presupuesto t)
|
||||
{
|
||||
bool ret = false;
|
||||
try
|
||||
{
|
||||
var presupuestoAModificar = almacen.FindIndex(x => x.Id == t.Id);
|
||||
almacen[presupuestoAModificar].Aceptado = true;
|
||||
ret = true;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
// Maneja o registra la excepción
|
||||
Console.WriteLine($"Error al modificar presupuesto: {ex.Message}");
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
override public bool Del(Presupuesto t)
|
||||
{
|
||||
bool ret = false;
|
||||
@@ -53,22 +81,22 @@ namespace Modelo
|
||||
var presupuestoAEliminar = almacen.Find(x => x.Id == t.Id);
|
||||
if (presupuestoAEliminar != null)
|
||||
{
|
||||
almacen.Remove(presupuestoAEliminar);
|
||||
presupuestoAEliminar.Habilitado = false;
|
||||
ret = true;
|
||||
}
|
||||
}
|
||||
catch (Exception)
|
||||
catch (Exception ex)
|
||||
{
|
||||
throw;
|
||||
// Maneja o registra la excepción
|
||||
Console.WriteLine($"Error al eliminar presupuesto: {ex.Message}");
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
public ReadOnlyCollection<DetallePresupuesto> MostrarDetalles(Presupuesto presupuesto)
|
||||
{
|
||||
return presupuesto.MostrarDetalles();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -47,7 +47,7 @@ namespace Modelo
|
||||
{
|
||||
var AEliminar = almacen.Find(x => x.Id == t.Id);
|
||||
if (AEliminar == null) return ret;
|
||||
almacen.Remove(AEliminar);
|
||||
AEliminar.Habilitado = false;
|
||||
ret = true;
|
||||
}
|
||||
catch (Exception)
|
||||
|
||||
@@ -52,7 +52,7 @@ namespace Modelo
|
||||
var proveedorAEliminar = almacen.Find(x => x.Cuit == t.Cuit);
|
||||
if (proveedorAEliminar != null)
|
||||
{
|
||||
almacen.Remove(proveedorAEliminar);
|
||||
proveedorAEliminar.Habilitado = false;
|
||||
ret = true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,23 +0,0 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:4.0.30319.42000
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
using System;
|
||||
using System.Reflection;
|
||||
|
||||
[assembly: System.Reflection.AssemblyCompanyAttribute("Modelo")]
|
||||
[assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")]
|
||||
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")]
|
||||
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0")]
|
||||
[assembly: System.Reflection.AssemblyProductAttribute("Modelo")]
|
||||
[assembly: System.Reflection.AssemblyTitleAttribute("Modelo")]
|
||||
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]
|
||||
|
||||
// Generated by the MSBuild WriteCodeFragment class.
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
96d0d59bfa69a3c27ef653a551fb81c45157d195
|
||||
@@ -1,11 +0,0 @@
|
||||
is_global = true
|
||||
build_property.TargetFramework = net6.0
|
||||
build_property.TargetPlatformMinVersion =
|
||||
build_property.UsingMicrosoftNETSdkWeb =
|
||||
build_property.ProjectTypeGuids =
|
||||
build_property.InvariantGlobalization =
|
||||
build_property.PlatformNeutralAssembly =
|
||||
build_property.EnforceExtendedAnalyzerRules =
|
||||
build_property._SupportedPlatformList = Linux,macOS,Windows
|
||||
build_property.RootNamespace = Modelo
|
||||
build_property.ProjectDir = C:\Users\fedpo\Downloads\final actual\final actual\Modelo\
|
||||
Binary file not shown.
@@ -1,17 +1,31 @@
|
||||
{
|
||||
"format": 1,
|
||||
"restore": {
|
||||
"C:\\Users\\fedpo\\Downloads\\final actual\\final actual\\Modelo\\Modelo.csproj": {}
|
||||
<<<<<<< HEAD
|
||||
"C:\\Users\\fedpo\\Desktop\\Final actual\\Modelo\\Modelo.csproj": {}
|
||||
},
|
||||
"projects": {
|
||||
"C:\\Users\\fedpo\\Downloads\\final actual\\final actual\\Entidades\\Entidades.csproj": {
|
||||
"C:\\Users\\fedpo\\Desktop\\Final actual\\Entidades\\Entidades.csproj": {
|
||||
"version": "1.0.0",
|
||||
"restore": {
|
||||
"projectUniqueName": "C:\\Users\\fedpo\\Downloads\\final actual\\final actual\\Entidades\\Entidades.csproj",
|
||||
"projectUniqueName": "C:\\Users\\fedpo\\Desktop\\Final actual\\Entidades\\Entidades.csproj",
|
||||
"projectName": "Entidades",
|
||||
"projectPath": "C:\\Users\\fedpo\\Downloads\\final actual\\final actual\\Entidades\\Entidades.csproj",
|
||||
"projectPath": "C:\\Users\\fedpo\\Desktop\\Final actual\\Entidades\\Entidades.csproj",
|
||||
"packagesPath": "C:\\Users\\fedpo\\.nuget\\packages\\",
|
||||
"outputPath": "C:\\Users\\fedpo\\Downloads\\final actual\\final actual\\Entidades\\obj\\",
|
||||
"outputPath": "C:\\Users\\fedpo\\Desktop\\Final actual\\Entidades\\obj\\",
|
||||
=======
|
||||
"C:\\Users\\fedpo\\Downloads\\Final actua2l\\Final actual\\Modelo\\Modelo.csproj": {}
|
||||
},
|
||||
"projects": {
|
||||
"C:\\Users\\fedpo\\Downloads\\Final actua2l\\Final actual\\Entidades\\Entidades.csproj": {
|
||||
"version": "1.0.0",
|
||||
"restore": {
|
||||
"projectUniqueName": "C:\\Users\\fedpo\\Downloads\\Final actua2l\\Final actual\\Entidades\\Entidades.csproj",
|
||||
"projectName": "Entidades",
|
||||
"projectPath": "C:\\Users\\fedpo\\Downloads\\Final actua2l\\Final actual\\Entidades\\Entidades.csproj",
|
||||
"packagesPath": "C:\\Users\\fedpo\\.nuget\\packages\\",
|
||||
"outputPath": "C:\\Users\\fedpo\\Downloads\\Final actua2l\\Final actual\\Entidades\\obj\\",
|
||||
>>>>>>> 88e614d538344c4aeb32449ffc15cff3993b7857
|
||||
"projectStyle": "PackageReference",
|
||||
"configFilePaths": [
|
||||
"C:\\Users\\fedpo\\AppData\\Roaming\\NuGet\\NuGet.Config",
|
||||
@@ -60,14 +74,25 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"C:\\Users\\fedpo\\Downloads\\final actual\\final actual\\Modelo\\Modelo.csproj": {
|
||||
<<<<<<< HEAD
|
||||
"C:\\Users\\fedpo\\Desktop\\Final actual\\Modelo\\Modelo.csproj": {
|
||||
"version": "1.0.0",
|
||||
"restore": {
|
||||
"projectUniqueName": "C:\\Users\\fedpo\\Downloads\\final actual\\final actual\\Modelo\\Modelo.csproj",
|
||||
"projectUniqueName": "C:\\Users\\fedpo\\Desktop\\Final actual\\Modelo\\Modelo.csproj",
|
||||
"projectName": "Modelo",
|
||||
"projectPath": "C:\\Users\\fedpo\\Downloads\\final actual\\final actual\\Modelo\\Modelo.csproj",
|
||||
"projectPath": "C:\\Users\\fedpo\\Desktop\\Final actual\\Modelo\\Modelo.csproj",
|
||||
"packagesPath": "C:\\Users\\fedpo\\.nuget\\packages\\",
|
||||
"outputPath": "C:\\Users\\fedpo\\Downloads\\final actual\\final actual\\Modelo\\obj\\",
|
||||
"outputPath": "C:\\Users\\fedpo\\Desktop\\Final actual\\Modelo\\obj\\",
|
||||
=======
|
||||
"C:\\Users\\fedpo\\Downloads\\Final actua2l\\Final actual\\Modelo\\Modelo.csproj": {
|
||||
"version": "1.0.0",
|
||||
"restore": {
|
||||
"projectUniqueName": "C:\\Users\\fedpo\\Downloads\\Final actua2l\\Final actual\\Modelo\\Modelo.csproj",
|
||||
"projectName": "Modelo",
|
||||
"projectPath": "C:\\Users\\fedpo\\Downloads\\Final actua2l\\Final actual\\Modelo\\Modelo.csproj",
|
||||
"packagesPath": "C:\\Users\\fedpo\\.nuget\\packages\\",
|
||||
"outputPath": "C:\\Users\\fedpo\\Downloads\\Final actua2l\\Final actual\\Modelo\\obj\\",
|
||||
>>>>>>> 88e614d538344c4aeb32449ffc15cff3993b7857
|
||||
"projectStyle": "PackageReference",
|
||||
"configFilePaths": [
|
||||
"C:\\Users\\fedpo\\AppData\\Roaming\\NuGet\\NuGet.Config",
|
||||
@@ -85,8 +110,13 @@
|
||||
"net6.0": {
|
||||
"targetAlias": "net6.0",
|
||||
"projectReferences": {
|
||||
"C:\\Users\\fedpo\\Downloads\\final actual\\final actual\\Entidades\\Entidades.csproj": {
|
||||
"projectPath": "C:\\Users\\fedpo\\Downloads\\final actual\\final actual\\Entidades\\Entidades.csproj"
|
||||
<<<<<<< HEAD
|
||||
"C:\\Users\\fedpo\\Desktop\\Final actual\\Entidades\\Entidades.csproj": {
|
||||
"projectPath": "C:\\Users\\fedpo\\Desktop\\Final actual\\Entidades\\Entidades.csproj"
|
||||
=======
|
||||
"C:\\Users\\fedpo\\Downloads\\Final actua2l\\Final actual\\Entidades\\Entidades.csproj": {
|
||||
"projectPath": "C:\\Users\\fedpo\\Downloads\\Final actua2l\\Final actual\\Entidades\\Entidades.csproj"
|
||||
>>>>>>> 88e614d538344c4aeb32449ffc15cff3993b7857
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -32,11 +32,19 @@
|
||||
"project": {
|
||||
"version": "1.0.0",
|
||||
"restore": {
|
||||
"projectUniqueName": "C:\\Users\\fedpo\\Downloads\\final actual\\final actual\\Modelo\\Modelo.csproj",
|
||||
<<<<<<< HEAD
|
||||
"projectUniqueName": "C:\\Users\\fedpo\\Desktop\\Final actual\\Modelo\\Modelo.csproj",
|
||||
"projectName": "Modelo",
|
||||
"projectPath": "C:\\Users\\fedpo\\Downloads\\final actual\\final actual\\Modelo\\Modelo.csproj",
|
||||
"projectPath": "C:\\Users\\fedpo\\Desktop\\Final actual\\Modelo\\Modelo.csproj",
|
||||
"packagesPath": "C:\\Users\\fedpo\\.nuget\\packages\\",
|
||||
"outputPath": "C:\\Users\\fedpo\\Downloads\\final actual\\final actual\\Modelo\\obj\\",
|
||||
"outputPath": "C:\\Users\\fedpo\\Desktop\\Final actual\\Modelo\\obj\\",
|
||||
=======
|
||||
"projectUniqueName": "C:\\Users\\fedpo\\Downloads\\Final actua2l\\Final actual\\Modelo\\Modelo.csproj",
|
||||
"projectName": "Modelo",
|
||||
"projectPath": "C:\\Users\\fedpo\\Downloads\\Final actua2l\\Final actual\\Modelo\\Modelo.csproj",
|
||||
"packagesPath": "C:\\Users\\fedpo\\.nuget\\packages\\",
|
||||
"outputPath": "C:\\Users\\fedpo\\Downloads\\Final actua2l\\Final actual\\Modelo\\obj\\",
|
||||
>>>>>>> 88e614d538344c4aeb32449ffc15cff3993b7857
|
||||
"projectStyle": "PackageReference",
|
||||
"configFilePaths": [
|
||||
"C:\\Users\\fedpo\\AppData\\Roaming\\NuGet\\NuGet.Config",
|
||||
@@ -54,8 +62,13 @@
|
||||
"net6.0": {
|
||||
"targetAlias": "net6.0",
|
||||
"projectReferences": {
|
||||
"C:\\Users\\fedpo\\Downloads\\final actual\\final actual\\Entidades\\Entidades.csproj": {
|
||||
"projectPath": "C:\\Users\\fedpo\\Downloads\\final actual\\final actual\\Entidades\\Entidades.csproj"
|
||||
<<<<<<< HEAD
|
||||
"C:\\Users\\fedpo\\Desktop\\Final actual\\Entidades\\Entidades.csproj": {
|
||||
"projectPath": "C:\\Users\\fedpo\\Desktop\\Final actual\\Entidades\\Entidades.csproj"
|
||||
=======
|
||||
"C:\\Users\\fedpo\\Downloads\\Final actua2l\\Final actual\\Entidades\\Entidades.csproj": {
|
||||
"projectPath": "C:\\Users\\fedpo\\Downloads\\Final actua2l\\Final actual\\Entidades\\Entidades.csproj"
|
||||
>>>>>>> 88e614d538344c4aeb32449ffc15cff3993b7857
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,8 +0,0 @@
|
||||
{
|
||||
"version": 2,
|
||||
"dgSpecHash": "fmo2HUMoIdls9H8hGKaMGhIa7cJfQvw6whWqbWRluFrLP21caNqa5sNL0+c6k3hgxAvgJ8kJuQlkGFoq8UfLog==",
|
||||
"success": true,
|
||||
"projectFilePath": "C:\\Users\\fedpo\\Downloads\\final actual\\final actual\\Modelo\\Modelo.csproj",
|
||||
"expectedPackageFiles": [],
|
||||
"logs": []
|
||||
}
|
||||
72
Vista/AddCategoria.Designer.cs
generated
72
Vista/AddCategoria.Designer.cs
generated
@@ -28,24 +28,24 @@
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
button2 = new Button();
|
||||
btnCancelar = new Button();
|
||||
label1 = new Label();
|
||||
label2 = new Label();
|
||||
numericUpDown1 = new NumericUpDown();
|
||||
numid = new NumericUpDown();
|
||||
textBox1 = new TextBox();
|
||||
button1 = new Button();
|
||||
((System.ComponentModel.ISupportInitialize)numericUpDown1).BeginInit();
|
||||
btnAceptar = new Button();
|
||||
((System.ComponentModel.ISupportInitialize)numid).BeginInit();
|
||||
SuspendLayout();
|
||||
//
|
||||
// button2
|
||||
// btnCancelar
|
||||
//
|
||||
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;
|
||||
btnCancelar.Location = new Point(146, 97);
|
||||
btnCancelar.Name = "btnCancelar";
|
||||
btnCancelar.Size = new Size(75, 23);
|
||||
btnCancelar.TabIndex = 1;
|
||||
btnCancelar.Text = "Cancelar";
|
||||
btnCancelar.UseVisualStyleBackColor = true;
|
||||
btnCancelar.Click += button2_Click;
|
||||
//
|
||||
// label1
|
||||
//
|
||||
@@ -65,13 +65,13 @@
|
||||
label2.TabIndex = 3;
|
||||
label2.Text = "Descripcion";
|
||||
//
|
||||
// numericUpDown1
|
||||
// numid
|
||||
//
|
||||
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;
|
||||
numid.Location = new Point(101, 23);
|
||||
numid.Maximum = new decimal(new int[] { 1215752191, 23, 0, 0 });
|
||||
numid.Name = "numid";
|
||||
numid.Size = new Size(120, 23);
|
||||
numid.TabIndex = 4;
|
||||
//
|
||||
// textBox1
|
||||
//
|
||||
@@ -80,40 +80,42 @@
|
||||
textBox1.Size = new Size(120, 23);
|
||||
textBox1.TabIndex = 5;
|
||||
//
|
||||
// button1
|
||||
// btnAceptar
|
||||
//
|
||||
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;
|
||||
btnAceptar.Location = new Point(12, 97);
|
||||
btnAceptar.Name = "btnAceptar";
|
||||
btnAceptar.Size = new Size(75, 23);
|
||||
btnAceptar.TabIndex = 6;
|
||||
btnAceptar.Text = "Aceptar";
|
||||
btnAceptar.UseVisualStyleBackColor = true;
|
||||
btnAceptar.Click += button1_Click;
|
||||
//
|
||||
// AddCategoria
|
||||
//
|
||||
AcceptButton = btnAceptar;
|
||||
AutoScaleDimensions = new SizeF(7F, 15F);
|
||||
AutoScaleMode = AutoScaleMode.Font;
|
||||
ClientSize = new Size(278, 235);
|
||||
Controls.Add(button1);
|
||||
CancelButton = btnCancelar;
|
||||
ClientSize = new Size(247, 128);
|
||||
Controls.Add(btnAceptar);
|
||||
Controls.Add(textBox1);
|
||||
Controls.Add(numericUpDown1);
|
||||
Controls.Add(numid);
|
||||
Controls.Add(label2);
|
||||
Controls.Add(label1);
|
||||
Controls.Add(button2);
|
||||
Controls.Add(btnCancelar);
|
||||
Name = "AddCategoria";
|
||||
Text = "Form1";
|
||||
((System.ComponentModel.ISupportInitialize)numericUpDown1).EndInit();
|
||||
Text = "Añadir Categoria";
|
||||
((System.ComponentModel.ISupportInitialize)numid).EndInit();
|
||||
ResumeLayout(false);
|
||||
PerformLayout();
|
||||
}
|
||||
|
||||
#endregion
|
||||
private Button button2;
|
||||
private Button btnCancelar;
|
||||
private Label label1;
|
||||
private Label label2;
|
||||
private NumericUpDown numericUpDown1;
|
||||
private NumericUpDown numid;
|
||||
private TextBox textBox1;
|
||||
private Button button1;
|
||||
private Button btnAceptar;
|
||||
}
|
||||
}
|
||||
@@ -18,6 +18,7 @@ namespace Vista
|
||||
public AddCategoria()
|
||||
{
|
||||
InitializeComponent();
|
||||
CargarDatos();
|
||||
}
|
||||
|
||||
private void button2_Click(object sender, EventArgs e)
|
||||
@@ -27,11 +28,8 @@ namespace Vista
|
||||
}
|
||||
private void CargarDatos()
|
||||
{
|
||||
if (categoria != null)
|
||||
{
|
||||
textBox1.Text = categoria.Descripcion;
|
||||
numericUpDown1.Value = categoria.Id;
|
||||
}
|
||||
numid.Value = ControladoraCategorias.Instance.Listar().Max(x => x.Id + 1);
|
||||
numid.Enabled = false;
|
||||
}
|
||||
|
||||
private bool ValidarDatos()
|
||||
@@ -44,7 +42,7 @@ namespace Vista
|
||||
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))
|
||||
if (categoria == null && ControladoraCategorias.Instance.Listar().Any(c => c.Id == (int)numid.Value))
|
||||
{
|
||||
devolucion += "Ya existe una categoría con el mismo ID\n";
|
||||
}
|
||||
@@ -71,7 +69,7 @@ namespace Vista
|
||||
{
|
||||
categoria = new Categoria
|
||||
{
|
||||
Id = (int)numericUpDown1.Value,
|
||||
Id = (int)numid.Value,
|
||||
Descripcion = textBox1.Text
|
||||
};
|
||||
|
||||
@@ -80,7 +78,7 @@ namespace Vista
|
||||
else
|
||||
{
|
||||
categoria.Descripcion = textBox1.Text;
|
||||
categoria.Id = (int)numericUpDown1.Value; // Solo si quieres permitir modificaciones del ID
|
||||
categoria.Id = (int)numid.Value; // Solo si quieres permitir modificaciones del ID
|
||||
|
||||
msg = ControladoraCategorias.Instance.Modificar(categoria);
|
||||
}
|
||||
|
||||
@@ -85,6 +85,7 @@ namespace Vista
|
||||
Direccion = txtDireccion.Text,
|
||||
Apellido = txtApellido.Text,
|
||||
Correo = txtCorreo.Text,
|
||||
Habilitado = true
|
||||
|
||||
};
|
||||
|
||||
|
||||
36
Vista/FrmClientes.Designer.cs
generated
36
Vista/FrmClientes.Designer.cs
generated
@@ -32,9 +32,9 @@
|
||||
BtnEliminar = new Button();
|
||||
groupBox1 = new GroupBox();
|
||||
BtnAceptar = new Button();
|
||||
dataGridView1 = new DataGridView();
|
||||
dgvCliente = new DataGridView();
|
||||
groupBox1.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)dataGridView1).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)dgvCliente).BeginInit();
|
||||
SuspendLayout();
|
||||
//
|
||||
// BtnModificar
|
||||
@@ -60,7 +60,7 @@
|
||||
// groupBox1
|
||||
//
|
||||
groupBox1.Controls.Add(BtnAceptar);
|
||||
groupBox1.Controls.Add(dataGridView1);
|
||||
groupBox1.Controls.Add(dgvCliente);
|
||||
groupBox1.Controls.Add(BtnEliminar);
|
||||
groupBox1.Controls.Add(BtnModificar);
|
||||
groupBox1.Location = new Point(12, 2);
|
||||
@@ -79,20 +79,20 @@
|
||||
BtnAceptar.UseVisualStyleBackColor = true;
|
||||
BtnAceptar.Click += BtnAceptar_Click;
|
||||
//
|
||||
// dataGridView1
|
||||
// dgvCliente
|
||||
//
|
||||
dataGridView1.AllowUserToAddRows = false;
|
||||
dataGridView1.AllowUserToDeleteRows = false;
|
||||
dataGridView1.AutoSizeColumnsMode = DataGridViewAutoSizeColumnsMode.Fill;
|
||||
dataGridView1.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.AutoSize;
|
||||
dataGridView1.Location = new Point(6, 22);
|
||||
dataGridView1.MultiSelect = false;
|
||||
dataGridView1.Name = "dataGridView1";
|
||||
dataGridView1.ReadOnly = true;
|
||||
dataGridView1.RowTemplate.Height = 25;
|
||||
dataGridView1.SelectionMode = DataGridViewSelectionMode.FullRowSelect;
|
||||
dataGridView1.Size = new Size(737, 235);
|
||||
dataGridView1.TabIndex = 3;
|
||||
dgvCliente.AllowUserToAddRows = false;
|
||||
dgvCliente.AllowUserToDeleteRows = false;
|
||||
dgvCliente.AutoSizeColumnsMode = DataGridViewAutoSizeColumnsMode.Fill;
|
||||
dgvCliente.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.AutoSize;
|
||||
dgvCliente.Location = new Point(6, 22);
|
||||
dgvCliente.MultiSelect = false;
|
||||
dgvCliente.Name = "dgvCliente";
|
||||
dgvCliente.ReadOnly = true;
|
||||
dgvCliente.RowTemplate.Height = 25;
|
||||
dgvCliente.SelectionMode = DataGridViewSelectionMode.FullRowSelect;
|
||||
dgvCliente.Size = new Size(737, 235);
|
||||
dgvCliente.TabIndex = 3;
|
||||
//
|
||||
// FrmClientes
|
||||
//
|
||||
@@ -104,7 +104,7 @@
|
||||
Text = "Clientes";
|
||||
WindowState = FormWindowState.Maximized;
|
||||
groupBox1.ResumeLayout(false);
|
||||
((System.ComponentModel.ISupportInitialize)dataGridView1).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)dgvCliente).EndInit();
|
||||
ResumeLayout(false);
|
||||
}
|
||||
|
||||
@@ -112,7 +112,7 @@
|
||||
private Button BtnModificar;
|
||||
private Button BtnEliminar;
|
||||
private GroupBox groupBox1;
|
||||
private DataGridView dataGridView1;
|
||||
private DataGridView dgvCliente;
|
||||
private Button BtnAceptar;
|
||||
}
|
||||
}
|
||||
@@ -14,8 +14,8 @@ namespace Vista
|
||||
private void ActualizarGrilla()
|
||||
{
|
||||
|
||||
dataGridView1.DataSource = null;
|
||||
dataGridView1.DataSource = ControladoraClientes.Instance.Listar();
|
||||
dgvCliente.DataSource = null;
|
||||
dgvCliente.DataSource = ControladoraClientes.Instance.Listar();
|
||||
}
|
||||
|
||||
private void BtnAceptar_Click(object sender, EventArgs e)
|
||||
@@ -27,7 +27,7 @@ namespace Vista
|
||||
|
||||
private void BtnModificar_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (dataGridView1.SelectedRows.Count < 1)
|
||||
if (dgvCliente.SelectedRows.Count < 1)
|
||||
{
|
||||
MessageBox.Show("Seleccione una linea para modificar");
|
||||
return;
|
||||
@@ -35,11 +35,11 @@ namespace Vista
|
||||
|
||||
Cliente cliente = new Cliente()
|
||||
{
|
||||
Nombre = dataGridView1.SelectedRows[0].Cells["Nombre"].Value.ToString(),
|
||||
Cuit = (Int64)dataGridView1.SelectedRows[0].Cells["Cuit"].Value,
|
||||
Apellido = dataGridView1.SelectedRows[0].Cells["Apellido"].Value.ToString(),
|
||||
Direccion = dataGridView1.SelectedRows[0].Cells["Direccion"].Value.ToString(),
|
||||
Correo = dataGridView1.SelectedRows[0].Cells["Correo"].Value.ToString(),
|
||||
Nombre = dgvCliente.SelectedRows[0].Cells["Nombre"].Value.ToString(),
|
||||
Cuit = (Int64)dgvCliente.SelectedRows[0].Cells["Cuit"].Value,
|
||||
Apellido = dgvCliente.SelectedRows[0].Cells["Apellido"].Value.ToString(),
|
||||
Direccion = dgvCliente.SelectedRows[0].Cells["Direccion"].Value.ToString(),
|
||||
Correo = dgvCliente.SelectedRows[0].Cells["Correo"].Value.ToString(),
|
||||
};
|
||||
|
||||
var formModificar = new FrmCliente(cliente);
|
||||
@@ -49,13 +49,13 @@ namespace Vista
|
||||
|
||||
private void BtnEliminar_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (dataGridView1.SelectedRows.Count < 0)
|
||||
if (dgvCliente.SelectedRows.Count < 0)
|
||||
{
|
||||
MessageBox.Show("Seleccione una linea para eliminar");
|
||||
return;
|
||||
}
|
||||
|
||||
foreach (DataGridViewRow Fila in dataGridView1.SelectedRows)
|
||||
foreach (DataGridViewRow Fila in dgvCliente.SelectedRows)
|
||||
{ // itera por un loop y elimina las lineas seleccionadas 1 a la vez.
|
||||
string devolucion = ControladoraClientes.Instance.Eliminar(long.Parse(Fila.Cells["Cuit"].Value.ToString()));
|
||||
MessageBox.Show(devolucion);
|
||||
@@ -64,5 +64,5 @@ namespace Vista
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
<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="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>
|
||||
|
||||
208
Vista/FrmFactura.Designer.cs
generated
208
Vista/FrmFactura.Designer.cs
generated
@@ -28,8 +28,8 @@
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
button1 = new Button();
|
||||
button2 = new Button();
|
||||
btnAceptar = new Button();
|
||||
btnCancelar = new Button();
|
||||
numid = new NumericUpDown();
|
||||
label1 = new Label();
|
||||
numtotal = new NumericUpDown();
|
||||
@@ -38,41 +38,44 @@
|
||||
label3 = new Label();
|
||||
label4 = new Label();
|
||||
cmbCliente = new ComboBox();
|
||||
dataGridView1 = new DataGridView();
|
||||
dataGridView2 = new DataGridView();
|
||||
numericUpDown1 = new NumericUpDown();
|
||||
dgvProductos = new DataGridView();
|
||||
dgvDetalles = new DataGridView();
|
||||
numCantidad = new NumericUpDown();
|
||||
Unidades = new Label();
|
||||
button3 = new Button();
|
||||
btnAddDetalle = new Button();
|
||||
label5 = new Label();
|
||||
label6 = new Label();
|
||||
btnEliminar = new Button();
|
||||
((System.ComponentModel.ISupportInitialize)numid).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)numtotal).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)dataGridView1).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)dataGridView2).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)numericUpDown1).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)dgvProductos).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)dgvDetalles).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)numCantidad).BeginInit();
|
||||
SuspendLayout();
|
||||
//
|
||||
// button1
|
||||
// btnAceptar
|
||||
//
|
||||
button1.Location = new Point(12, 367);
|
||||
button1.Name = "button1";
|
||||
button1.Size = new Size(113, 46);
|
||||
button1.TabIndex = 0;
|
||||
button1.Text = "Aceptar";
|
||||
button1.UseVisualStyleBackColor = true;
|
||||
button1.Click += button1_Click;
|
||||
btnAceptar.Location = new Point(12, 395);
|
||||
btnAceptar.Name = "btnAceptar";
|
||||
btnAceptar.Size = new Size(82, 26);
|
||||
btnAceptar.TabIndex = 0;
|
||||
btnAceptar.Text = "Aceptar";
|
||||
btnAceptar.UseVisualStyleBackColor = true;
|
||||
btnAceptar.Click += btnAceptar_Click;
|
||||
//
|
||||
// button2
|
||||
// btnCancelar
|
||||
//
|
||||
button2.Location = new Point(172, 367);
|
||||
button2.Name = "button2";
|
||||
button2.Size = new Size(115, 46);
|
||||
button2.TabIndex = 1;
|
||||
button2.Text = "Cancelar";
|
||||
button2.UseVisualStyleBackColor = true;
|
||||
button2.Click += button2_Click;
|
||||
btnCancelar.Location = new Point(873, 395);
|
||||
btnCancelar.Name = "btnCancelar";
|
||||
btnCancelar.Size = new Size(80, 26);
|
||||
btnCancelar.TabIndex = 1;
|
||||
btnCancelar.Text = "Cancelar";
|
||||
btnCancelar.UseVisualStyleBackColor = true;
|
||||
btnCancelar.Click += btnCerrar_Click;
|
||||
//
|
||||
// numid
|
||||
//
|
||||
numid.Location = new Point(97, 26);
|
||||
numid.Location = new Point(60, 14);
|
||||
numid.Maximum = new decimal(new int[] { 1215752191, 23, 0, 0 });
|
||||
numid.Name = "numid";
|
||||
numid.Size = new Size(120, 23);
|
||||
@@ -81,7 +84,7 @@
|
||||
// label1
|
||||
//
|
||||
label1.AutoSize = true;
|
||||
label1.Location = new Point(69, 34);
|
||||
label1.Location = new Point(32, 22);
|
||||
label1.Name = "label1";
|
||||
label1.Size = new Size(18, 15);
|
||||
label1.TabIndex = 3;
|
||||
@@ -90,7 +93,7 @@
|
||||
// numtotal
|
||||
//
|
||||
numtotal.Enabled = false;
|
||||
numtotal.Location = new Point(97, 57);
|
||||
numtotal.Location = new Point(60, 45);
|
||||
numtotal.Maximum = new decimal(new int[] { 1215752191, 23, 0, 0 });
|
||||
numtotal.Name = "numtotal";
|
||||
numtotal.ReadOnly = true;
|
||||
@@ -100,7 +103,7 @@
|
||||
// label2
|
||||
//
|
||||
label2.AutoSize = true;
|
||||
label2.Location = new Point(59, 65);
|
||||
label2.Location = new Point(22, 53);
|
||||
label2.Name = "label2";
|
||||
label2.Size = new Size(32, 15);
|
||||
label2.TabIndex = 5;
|
||||
@@ -108,16 +111,15 @@
|
||||
//
|
||||
// datepick
|
||||
//
|
||||
datepick.Location = new Point(97, 88);
|
||||
datepick.Location = new Point(60, 76);
|
||||
datepick.Name = "datepick";
|
||||
datepick.Size = new Size(120, 23);
|
||||
datepick.TabIndex = 6;
|
||||
datepick.ValueChanged += datepick_ValueChanged;
|
||||
//
|
||||
// label3
|
||||
//
|
||||
label3.AutoSize = true;
|
||||
label3.Location = new Point(49, 94);
|
||||
label3.Location = new Point(12, 82);
|
||||
label3.Name = "label3";
|
||||
label3.Size = new Size(38, 15);
|
||||
label3.TabIndex = 7;
|
||||
@@ -126,7 +128,7 @@
|
||||
// label4
|
||||
//
|
||||
label4.AutoSize = true;
|
||||
label4.Location = new Point(49, 124);
|
||||
label4.Location = new Point(12, 112);
|
||||
label4.Name = "label4";
|
||||
label4.Size = new Size(44, 15);
|
||||
label4.TabIndex = 8;
|
||||
@@ -136,69 +138,106 @@
|
||||
//
|
||||
cmbCliente.DropDownStyle = ComboBoxStyle.DropDownList;
|
||||
cmbCliente.FormattingEnabled = true;
|
||||
cmbCliente.Location = new Point(99, 121);
|
||||
cmbCliente.Location = new Point(62, 109);
|
||||
cmbCliente.Name = "cmbCliente";
|
||||
cmbCliente.Size = new Size(121, 23);
|
||||
cmbCliente.TabIndex = 10;
|
||||
//
|
||||
// dataGridView1
|
||||
// dgvProductos
|
||||
//
|
||||
dataGridView1.AutoSizeColumnsMode = DataGridViewAutoSizeColumnsMode.Fill;
|
||||
dataGridView1.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.AutoSize;
|
||||
dataGridView1.Location = new Point(290, 12);
|
||||
dataGridView1.Name = "dataGridView1";
|
||||
dataGridView1.RowTemplate.Height = 25;
|
||||
dataGridView1.SelectionMode = DataGridViewSelectionMode.FullRowSelect;
|
||||
dataGridView1.Size = new Size(324, 318);
|
||||
dataGridView1.TabIndex = 11;
|
||||
dgvProductos.AllowUserToAddRows = false;
|
||||
dgvProductos.AllowUserToDeleteRows = false;
|
||||
dgvProductos.AutoSizeColumnsMode = DataGridViewAutoSizeColumnsMode.Fill;
|
||||
dgvProductos.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.AutoSize;
|
||||
dgvProductos.EditMode = DataGridViewEditMode.EditProgrammatically;
|
||||
dgvProductos.Location = new Point(237, 30);
|
||||
dgvProductos.Name = "dgvProductos";
|
||||
dgvProductos.RowTemplate.Height = 25;
|
||||
dgvProductos.SelectionMode = DataGridViewSelectionMode.FullRowSelect;
|
||||
dgvProductos.Size = new Size(350, 318);
|
||||
dgvProductos.TabIndex = 11;
|
||||
//
|
||||
// dataGridView2
|
||||
// dgvDetalles
|
||||
//
|
||||
dataGridView2.AutoSizeColumnsMode = DataGridViewAutoSizeColumnsMode.Fill;
|
||||
dataGridView2.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.AutoSize;
|
||||
dataGridView2.Location = new Point(674, 12);
|
||||
dataGridView2.Name = "dataGridView2";
|
||||
dataGridView2.RowTemplate.Height = 25;
|
||||
dataGridView2.SelectionMode = DataGridViewSelectionMode.FullRowSelect;
|
||||
dataGridView2.Size = new Size(290, 336);
|
||||
dataGridView2.TabIndex = 12;
|
||||
dgvDetalles.AllowUserToAddRows = false;
|
||||
dgvDetalles.AllowUserToDeleteRows = false;
|
||||
dgvDetalles.AutoSizeColumnsMode = DataGridViewAutoSizeColumnsMode.Fill;
|
||||
dgvDetalles.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.AutoSize;
|
||||
dgvDetalles.EditMode = DataGridViewEditMode.EditProgrammatically;
|
||||
dgvDetalles.Location = new Point(593, 30);
|
||||
dgvDetalles.Name = "dgvDetalles";
|
||||
dgvDetalles.RowTemplate.Height = 25;
|
||||
dgvDetalles.SelectionMode = DataGridViewSelectionMode.FullRowSelect;
|
||||
dgvDetalles.Size = new Size(360, 318);
|
||||
dgvDetalles.TabIndex = 12;
|
||||
//
|
||||
// numericUpDown1
|
||||
// numCantidad
|
||||
//
|
||||
numericUpDown1.Location = new Point(494, 359);
|
||||
numericUpDown1.Name = "numericUpDown1";
|
||||
numericUpDown1.Size = new Size(120, 23);
|
||||
numericUpDown1.TabIndex = 13;
|
||||
numCantidad.Location = new Point(309, 354);
|
||||
numCantidad.Name = "numCantidad";
|
||||
numCantidad.Size = new Size(120, 23);
|
||||
numCantidad.TabIndex = 13;
|
||||
//
|
||||
// Unidades
|
||||
//
|
||||
Unidades.AutoSize = true;
|
||||
Unidades.Location = new Point(420, 367);
|
||||
Unidades.Location = new Point(235, 362);
|
||||
Unidades.Name = "Unidades";
|
||||
Unidades.Size = new Size(56, 15);
|
||||
Unidades.TabIndex = 14;
|
||||
Unidades.Text = "Unidades";
|
||||
//
|
||||
// button3
|
||||
// btnAddDetalle
|
||||
//
|
||||
button3.Location = new Point(420, 390);
|
||||
button3.Name = "button3";
|
||||
button3.Size = new Size(194, 36);
|
||||
button3.TabIndex = 15;
|
||||
button3.Text = "Añadir";
|
||||
button3.UseVisualStyleBackColor = true;
|
||||
button3.Click += button3_Click;
|
||||
btnAddDetalle.Location = new Point(235, 385);
|
||||
btnAddDetalle.Name = "btnAddDetalle";
|
||||
btnAddDetalle.Size = new Size(80, 31);
|
||||
btnAddDetalle.TabIndex = 15;
|
||||
btnAddDetalle.Text = "Añadir";
|
||||
btnAddDetalle.UseVisualStyleBackColor = true;
|
||||
btnAddDetalle.Click += btnAddDetalle_Click;
|
||||
//
|
||||
// label5
|
||||
//
|
||||
label5.AutoSize = true;
|
||||
label5.Location = new Point(593, 9);
|
||||
label5.Name = "label5";
|
||||
label5.Size = new Size(48, 15);
|
||||
label5.TabIndex = 16;
|
||||
label5.Text = "Detalles";
|
||||
//
|
||||
// label6
|
||||
//
|
||||
label6.AutoSize = true;
|
||||
label6.Location = new Point(237, 5);
|
||||
label6.Name = "label6";
|
||||
label6.Size = new Size(61, 15);
|
||||
label6.TabIndex = 17;
|
||||
label6.Text = "Productos";
|
||||
//
|
||||
// btnEliminar
|
||||
//
|
||||
btnEliminar.Location = new Point(321, 385);
|
||||
btnEliminar.Name = "btnEliminar";
|
||||
btnEliminar.Size = new Size(80, 31);
|
||||
btnEliminar.TabIndex = 18;
|
||||
btnEliminar.Text = "Eliminar";
|
||||
btnEliminar.UseVisualStyleBackColor = true;
|
||||
btnEliminar.Click += btnEliminar_Click;
|
||||
//
|
||||
// FrmFactura
|
||||
//
|
||||
AutoScaleDimensions = new SizeF(7F, 15F);
|
||||
AutoScaleMode = AutoScaleMode.Font;
|
||||
ClientSize = new Size(976, 450);
|
||||
Controls.Add(button3);
|
||||
ClientSize = new Size(965, 428);
|
||||
Controls.Add(btnEliminar);
|
||||
Controls.Add(label6);
|
||||
Controls.Add(label5);
|
||||
Controls.Add(btnAddDetalle);
|
||||
Controls.Add(Unidades);
|
||||
Controls.Add(numericUpDown1);
|
||||
Controls.Add(dataGridView2);
|
||||
Controls.Add(dataGridView1);
|
||||
Controls.Add(numCantidad);
|
||||
Controls.Add(dgvDetalles);
|
||||
Controls.Add(dgvProductos);
|
||||
Controls.Add(cmbCliente);
|
||||
Controls.Add(label4);
|
||||
Controls.Add(label3);
|
||||
@@ -207,23 +246,23 @@
|
||||
Controls.Add(numtotal);
|
||||
Controls.Add(label1);
|
||||
Controls.Add(numid);
|
||||
Controls.Add(button2);
|
||||
Controls.Add(button1);
|
||||
Controls.Add(btnCancelar);
|
||||
Controls.Add(btnAceptar);
|
||||
Name = "FrmFactura";
|
||||
Text = "Form1";
|
||||
Text = "Agregar Factura";
|
||||
((System.ComponentModel.ISupportInitialize)numid).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)numtotal).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)dataGridView1).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)dataGridView2).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)numericUpDown1).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)dgvProductos).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)dgvDetalles).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)numCantidad).EndInit();
|
||||
ResumeLayout(false);
|
||||
PerformLayout();
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private Button button1;
|
||||
private Button button2;
|
||||
private Button btnAceptar;
|
||||
private Button btnCancelar;
|
||||
private NumericUpDown numid;
|
||||
private Label label1;
|
||||
private NumericUpDown numtotal;
|
||||
@@ -232,10 +271,13 @@
|
||||
private Label label3;
|
||||
private Label label4;
|
||||
private ComboBox cmbCliente;
|
||||
private DataGridView dataGridView1;
|
||||
private DataGridView dataGridView2;
|
||||
private NumericUpDown numericUpDown1;
|
||||
private DataGridView dgvProductos;
|
||||
private DataGridView dgvDetalles;
|
||||
private NumericUpDown numCantidad;
|
||||
private Label Unidades;
|
||||
private Button button3;
|
||||
private Button btnAddDetalle;
|
||||
private Label label5;
|
||||
private Label label6;
|
||||
private Button btnEliminar;
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,5 @@
|
||||
using Controladora;
|
||||
using Entidades;
|
||||
using Modelo;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.ObjectModel;
|
||||
@@ -16,134 +15,76 @@ namespace Vista
|
||||
{
|
||||
public partial class FrmFactura : Form
|
||||
{
|
||||
private Factura factura;
|
||||
private Cliente clienteSeleccionado;
|
||||
private List<Lote> carrito; // Lista para almacenar los lotes en el carrito
|
||||
|
||||
public FrmFactura(Factura? factura = null)
|
||||
private Factura factura = new Factura();
|
||||
private int detalleid;
|
||||
public FrmFactura()
|
||||
{
|
||||
InitializeComponent();
|
||||
ConfigurarDataGridView();
|
||||
ConfigurarDataGridViewCarrito(); // Nueva configuración del DataGridView para el carrito
|
||||
ActualizarGrilla();
|
||||
CargarClientes();
|
||||
carrito = new List<Lote>(); // Inicializar la lista del carrito
|
||||
|
||||
cmbCliente.SelectedIndexChanged += comboBox1_SelectedIndexChanged;
|
||||
|
||||
// Para el primer control NumericUpDown
|
||||
numid.Maximum = int.MaxValue; // Esto permitirá IDs muy grandes
|
||||
|
||||
// Para el segundo control NumericUpDown
|
||||
numtotal.Maximum = decimal.MaxValue; // Esto permitirá totales muy grandes
|
||||
numtotal.Enabled = false; // Deshabilitar el control para que no se pueda modificar
|
||||
|
||||
// Configurar NumericUpDown para unidades
|
||||
numericUpDown1.Maximum = int.MaxValue; // Configurar el máximo valor permitido
|
||||
CargarDatos();
|
||||
|
||||
cmbCliente.DisplayMember = "Cliente";
|
||||
cmbCliente.SelectedIndex = -1;
|
||||
|
||||
if (factura != null)
|
||||
{
|
||||
this.factura = factura;
|
||||
this.Text = "Modificar Factura";
|
||||
CargarDatos();
|
||||
}
|
||||
else
|
||||
{
|
||||
this.Text = "Agregar Factura";
|
||||
}
|
||||
}
|
||||
|
||||
private void ConfigurarDataGridView()
|
||||
private void ActualizarGrilla()
|
||||
{
|
||||
dataGridView1.AutoGenerateColumns = false;
|
||||
dgvProductos.DataSource = null;
|
||||
dgvProductos.DataSource = ControladoraProductos.Instance.Listar();
|
||||
|
||||
dgvDetalles.AutoGenerateColumns = false;
|
||||
|
||||
// Definir las columnas manualmente
|
||||
dataGridView1.Columns.Add(new DataGridViewTextBoxColumn
|
||||
dgvDetalles.Columns.Add(new DataGridViewTextBoxColumn
|
||||
{
|
||||
DataPropertyName = "Id",
|
||||
HeaderText = "ID",
|
||||
DataPropertyName = "Id", // Usa la propiedad NombreProducto
|
||||
HeaderText = "Id",
|
||||
Name = "Id"
|
||||
});
|
||||
dataGridView1.Columns.Add(new DataGridViewTextBoxColumn
|
||||
dgvDetalles.Columns.Add(new DataGridViewTextBoxColumn
|
||||
{
|
||||
DataPropertyName = "Nombre",
|
||||
HeaderText = "Nombre",
|
||||
Name = "Nombre"
|
||||
});
|
||||
dataGridView1.Columns.Add(new DataGridViewTextBoxColumn
|
||||
{
|
||||
DataPropertyName = "Precio",
|
||||
HeaderText = "Precio",
|
||||
Name = "Precio"
|
||||
});
|
||||
}
|
||||
|
||||
private void ConfigurarDataGridViewCarrito()
|
||||
{
|
||||
dataGridView2.AutoGenerateColumns = false;
|
||||
|
||||
// Definir las columnas manualmente
|
||||
dataGridView2.Columns.Add(new DataGridViewTextBoxColumn
|
||||
{
|
||||
DataPropertyName = "NombreProducto", // Usa la propiedad NombreProducto
|
||||
DataPropertyName = "Producto", // Usa la propiedad NombreProducto
|
||||
HeaderText = "Producto",
|
||||
Name = "Producto"
|
||||
});
|
||||
dataGridView2.Columns.Add(new DataGridViewTextBoxColumn
|
||||
dgvDetalles.Columns.Add(new DataGridViewTextBoxColumn
|
||||
{
|
||||
DataPropertyName = "CantidadDeProductos",
|
||||
HeaderText = "Cantidad",
|
||||
Name = "CantidadDeProductos"
|
||||
});
|
||||
dgvDetalles.Columns.Add(new DataGridViewTextBoxColumn
|
||||
{
|
||||
DataPropertyName = "PrecioUnitario",
|
||||
HeaderText = "PrecioUnitario"
|
||||
});
|
||||
dgvDetalles.Columns.Add(new DataGridViewTextBoxColumn
|
||||
{
|
||||
DataPropertyName = "Subtotal",
|
||||
HeaderText = "Subtotal"
|
||||
});
|
||||
|
||||
// Asignar la lista de lotes al DataGridView
|
||||
dataGridView2.DataSource = carrito;
|
||||
}
|
||||
|
||||
|
||||
private void ActualizarGrilla()
|
||||
{
|
||||
dataGridView1.DataSource = null;
|
||||
dataGridView1.DataSource = ControladoraProductos.Instance.Listar();
|
||||
}
|
||||
|
||||
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
|
||||
cmbCliente.DataSource = clientes;
|
||||
|
||||
// Establecer la propiedad para mostrar el nombre del cliente en el ComboBox
|
||||
cmbCliente.DisplayMember = "NombreCompleto";
|
||||
}
|
||||
|
||||
private void comboBox1_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
clienteSeleccionado = (Cliente)cmbCliente.SelectedItem;
|
||||
}
|
||||
|
||||
private void CargarDatos()
|
||||
{
|
||||
numid.Value = factura.Id;
|
||||
numtotal.Value = (decimal)factura.Total;
|
||||
datepick.Value = factura.Fecha;
|
||||
// Asignar la lista de clientes como origen de datos para el ComboBox
|
||||
cmbCliente.DataSource = ControladoraClientes.Instance.Listar();
|
||||
|
||||
// Asignar el cliente seleccionado en el ComboBox
|
||||
if (factura.Cliente != null)
|
||||
{
|
||||
cmbCliente.SelectedItem = factura.Cliente;
|
||||
}
|
||||
// Establecer la propiedad para mostrar el nombre del cliente en el ComboBox
|
||||
cmbCliente.DisplayMember = "NombreCompleto";
|
||||
|
||||
var listdetalle = ControladoraFacturas.Instance.Listar();
|
||||
numid.Value = (listdetalle.Count > 0) ?
|
||||
listdetalle.Max(x => x.Id + 1) :
|
||||
0;
|
||||
|
||||
numid.Enabled = false; // Deshabilitar el control para que no se pueda modificar
|
||||
|
||||
numtotal.Enabled = false; // Deshabilitar el control para que no se pueda modificar
|
||||
|
||||
// Recuperar los lotes asociados a la factura y actualizar el DataGridView
|
||||
carrito = ControladoraLotes.Instance.ListarPorFacturaId(factura.Id).ToList() ?? new List<Lote>();
|
||||
|
||||
dataGridView2.DataSource = null;
|
||||
dataGridView2.DataSource = carrito;
|
||||
// var listaDetalles = ControladoraFacturas.Instance.ListarDetallesFactura(factura);
|
||||
|
||||
// Actualizar el total
|
||||
ActualizarTotal();
|
||||
@@ -153,9 +94,9 @@ namespace Vista
|
||||
{
|
||||
// Recalcular el total de la factura
|
||||
decimal total = 0;
|
||||
foreach (var lote in carrito)
|
||||
foreach (var detalle in factura.MostrarDetalles())
|
||||
{
|
||||
total += (decimal)(lote.Producto.Precio * lote.CantidadDeProductos);
|
||||
total += (decimal)(detalle.Producto.Precio * detalle.Cantidad);
|
||||
}
|
||||
numtotal.Value = total;
|
||||
}
|
||||
@@ -165,7 +106,7 @@ namespace Vista
|
||||
string devolucion = "";
|
||||
|
||||
if (string.IsNullOrEmpty(numid.Text)) devolucion += "El ID no puede ser nulo o vacío\n";
|
||||
if (clienteSeleccionado == null) devolucion += "Debe seleccionar un cliente\n";
|
||||
if (cmbCliente.SelectedIndex == -1) devolucion += "Debe seleccionar un cliente\n";
|
||||
|
||||
if (devolucion == "")
|
||||
{
|
||||
@@ -178,153 +119,120 @@ namespace Vista
|
||||
}
|
||||
}
|
||||
|
||||
private void button1_Click(object sender, EventArgs e)
|
||||
private void btnAceptar_Click(object sender, EventArgs e)
|
||||
{
|
||||
// Validar los datos antes de continuar
|
||||
if (ValidarDatos())
|
||||
{
|
||||
try
|
||||
factura.Total = Convert.ToDouble(numtotal.Value);
|
||||
factura.Fecha = datepick.Value;
|
||||
factura.Id = Convert.ToInt32(numid.Value);
|
||||
factura.Cliente = ControladoraClientes.Instance.Listar().First(x => x.NombreCompleto == cmbCliente.SelectedValue.ToString());
|
||||
|
||||
string mensaje = ControladoraFacturas.Instance.Añadir(factura);
|
||||
MessageBox.Show(mensaje, "Información", MessageBoxButtons.OK, MessageBoxIcon.Information);
|
||||
Close();
|
||||
}
|
||||
}
|
||||
|
||||
private void btnAddDetalle_Click(object sender, EventArgs e)
|
||||
{
|
||||
// Validar los datos antes de crear el detalle
|
||||
if (ValidarDatosdetalle()) return;
|
||||
if (dgvProductos.SelectedRows.Count > 0)
|
||||
{
|
||||
foreach (DataGridViewRow selectedRow in dgvProductos.SelectedRows)
|
||||
{
|
||||
// Verificar si la ID de la factura ya está en uso
|
||||
if (RepositorioFactura.Instance.ExistePorId((int)numid.Value) && factura == null)
|
||||
Producto producto = (Producto)selectedRow.DataBoundItem;
|
||||
var checkcolicion = factura.MostrarDetalles().Count(x => x.Producto.Id == producto.Id);
|
||||
if (checkcolicion != 0)
|
||||
{
|
||||
MessageBox.Show("La ID de la factura ya está en uso. Por favor, elija una ID diferente.", "ID en Uso", MessageBoxButtons.OK, MessageBoxIcon.Warning);
|
||||
MessageBox.Show("El Producto ya fue cargado");
|
||||
return;
|
||||
}
|
||||
|
||||
if (factura == null)
|
||||
factura.AñadirDetalle(new DetalleFactura
|
||||
{
|
||||
// Crear una nueva factura con los datos proporcionados
|
||||
factura = new Factura
|
||||
{
|
||||
Id = (int)numid.Value,
|
||||
Total = (double)numtotal.Value,
|
||||
Fecha = datepick.Value,
|
||||
Cliente = (Cliente)cmbCliente.SelectedItem
|
||||
};
|
||||
// Agregar la factura a la colección
|
||||
ControladoraFacturas.Instance.Añadir(factura);
|
||||
|
||||
// Guardar los lotes asociados a la factura
|
||||
foreach (var lote in carrito)
|
||||
{
|
||||
lote.Id = factura.Id; // Usar la ID de la factura
|
||||
lote.Fecha = factura.Fecha; // Usar la fecha de la factura
|
||||
ControladoraLotes.Instance.Añadir(lote);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// Actualizar los datos de la factura existente
|
||||
factura.Id = (int)numid.Value;
|
||||
factura.Total = (double)numtotal.Value;
|
||||
factura.Fecha = datepick.Value;
|
||||
factura.Cliente = (Cliente)cmbCliente.SelectedItem;
|
||||
// Modificar la factura en la colección
|
||||
ControladoraFacturas.Instance.Modificar(factura);
|
||||
|
||||
// Actualizar los lotes asociados a la factura
|
||||
ControladoraLotes.Instance.EliminarPorFacturaId(factura.Id); // Eliminar lotes antiguos
|
||||
foreach (var lote in carrito)
|
||||
{
|
||||
lote.Id = factura.Id; // Usar la ID de la factura
|
||||
lote.Fecha = factura.Fecha; // Usar la fecha de la factura
|
||||
ControladoraLotes.Instance.Añadir(lote);
|
||||
}
|
||||
}
|
||||
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);
|
||||
Id = int.Parse(detalleid++.ToString()),
|
||||
Cantidad = (int)numCantidad.Value,
|
||||
IdFactura = factura.Id,
|
||||
Producto = ControladoraProductos.Instance.Listar().First(x => x.Id == producto.Id),
|
||||
Subtotal = producto.Precio * Convert.ToInt32(numCantidad.Value),
|
||||
});
|
||||
ActualizarGrillaDetalles();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private void button2_Click(object sender, EventArgs e)
|
||||
private void ActualizarGrillaDetalles()
|
||||
{
|
||||
this.Close();
|
||||
}
|
||||
|
||||
|
||||
|
||||
private void button3_Click(object sender, EventArgs e)
|
||||
{
|
||||
// Validar los datos antes de crear el lote
|
||||
if (ValidarDatos() && ValidarDatosLote())
|
||||
var detalles = factura.MostrarDetalles();
|
||||
dgvDetalles.DataSource = null;
|
||||
if (detalles.Any())
|
||||
{
|
||||
// Verifica si hay una fila seleccionada en el DataGridView
|
||||
if (dataGridView1.CurrentRow != null)
|
||||
var loteDatos = detalles.Select(detalle => new
|
||||
{
|
||||
// Deshabilitar los controles para ID, fecha, y cliente
|
||||
numid.Enabled = false;
|
||||
datepick.Enabled = false;
|
||||
cmbCliente.Enabled = false;
|
||||
Id = detalle.Id,
|
||||
Producto = detalle.Producto.Nombre,
|
||||
CantidadDeProductos = detalle.Cantidad,
|
||||
Subtotal = detalle.Subtotal,
|
||||
PrecioUnitario = detalle.Producto.Precio,
|
||||
}).ToList();
|
||||
|
||||
// Crear un nuevo lote con los datos proporcionados
|
||||
var lote = new Lote
|
||||
{
|
||||
Id = (int)numid.Value, // Usar la misma ID que la de la factura
|
||||
Fecha = datepick.Value, // Usar la misma fecha que la de la factura
|
||||
Producto = (Producto)dataGridView1.CurrentRow.DataBoundItem,
|
||||
CantidadDeProductos = (long)numericUpDown1.Value, // Usar el valor de unidades del NumericUpDown
|
||||
Habilitado = true // Asignar un valor por defecto o según tus necesidades
|
||||
};
|
||||
|
||||
// Añadir el lote al carrito
|
||||
carrito.Add(lote);
|
||||
|
||||
// Actualizar el total de la factura
|
||||
ActualizarTotal();
|
||||
|
||||
// Actualizar el DataGridView para reflejar los cambios
|
||||
dataGridView2.DataSource = null;
|
||||
dataGridView2.DataSource = carrito;
|
||||
}
|
||||
else
|
||||
{
|
||||
// Mostrar un mensaje si no se ha seleccionado ninguna fila
|
||||
MessageBox.Show("Por favor, seleccione un producto en el carrito antes de añadir.", "Selección Requerida", MessageBoxButtons.OK, MessageBoxIcon.Warning);
|
||||
}
|
||||
dgvDetalles.DataSource = loteDatos;
|
||||
numtotal.Value = (Decimal)loteDatos.Sum(x => x.Subtotal);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
// Función actualizada para validar los datos del lote
|
||||
private bool ValidarDatosLote()
|
||||
// metodo para validar los datos del detalle
|
||||
private bool ValidarDatosdetalle()
|
||||
{
|
||||
string devolucion = "";
|
||||
|
||||
// Validar la selección del producto
|
||||
if (dataGridView1.CurrentRow == null)
|
||||
if (dgvProductos.CurrentRow == null)
|
||||
devolucion += "Debe seleccionar un producto para añadir al lote\n";
|
||||
|
||||
// Validar la cantidad de productos
|
||||
if (numericUpDown1.Value <= 0)
|
||||
if (numCantidad.Value <= 0)
|
||||
devolucion += "La cantidad de productos debe ser mayor que cero\n";
|
||||
|
||||
if (devolucion == "")
|
||||
{
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
else
|
||||
{
|
||||
MessageBox.Show(devolucion, "Errores de Validación", MessageBoxButtons.OK, MessageBoxIcon.Warning);
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
private void datepick_ValueChanged(object sender, EventArgs e)
|
||||
private void btnCerrar_Click(object sender, EventArgs e)
|
||||
{
|
||||
this.Close();
|
||||
}
|
||||
|
||||
private void btnEliminar_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (dgvDetalles.SelectedRows.Count > 0)
|
||||
{
|
||||
foreach (DataGridViewRow selectedRow in dgvDetalles.SelectedRows)
|
||||
{
|
||||
DetalleFactura det = new DetalleFactura
|
||||
{
|
||||
Id = Convert.ToInt32(selectedRow.Cells["Id"].Value),
|
||||
};
|
||||
var detalleAborrar = factura.MostrarDetalles().First(x => x.Id == det.Id);
|
||||
factura.EliminarDetalle(detalleAborrar);
|
||||
ActualizarGrillaDetalles();
|
||||
detalleid--;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
MessageBox.Show("Por favor, selecciona una fila para eliminar Proveedor del producto.");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -18,7 +18,7 @@
|
||||
<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="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>
|
||||
|
||||
94
Vista/FrmFacturas.Designer.cs
generated
94
Vista/FrmFacturas.Designer.cs
generated
@@ -29,18 +29,22 @@
|
||||
private void InitializeComponent()
|
||||
{
|
||||
groupBox1 = new GroupBox();
|
||||
dataGridView2 = new DataGridView();
|
||||
dataGridView1 = new DataGridView();
|
||||
label2 = new Label();
|
||||
label1 = new Label();
|
||||
dgvDetalles = new DataGridView();
|
||||
dgvFacturas = new DataGridView();
|
||||
BtnAdd = new Button();
|
||||
groupBox1.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)dataGridView2).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)dataGridView1).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)dgvDetalles).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)dgvFacturas).BeginInit();
|
||||
SuspendLayout();
|
||||
//
|
||||
// groupBox1
|
||||
//
|
||||
groupBox1.Controls.Add(dataGridView2);
|
||||
groupBox1.Controls.Add(dataGridView1);
|
||||
groupBox1.Controls.Add(label2);
|
||||
groupBox1.Controls.Add(label1);
|
||||
groupBox1.Controls.Add(dgvDetalles);
|
||||
groupBox1.Controls.Add(dgvFacturas);
|
||||
groupBox1.Controls.Add(BtnAdd);
|
||||
groupBox1.Location = new Point(12, 12);
|
||||
groupBox1.Name = "groupBox1";
|
||||
@@ -48,34 +52,57 @@
|
||||
groupBox1.TabIndex = 5;
|
||||
groupBox1.TabStop = false;
|
||||
//
|
||||
// dataGridView2
|
||||
// label2
|
||||
//
|
||||
dataGridView2.AutoSizeColumnsMode = DataGridViewAutoSizeColumnsMode.Fill;
|
||||
dataGridView2.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.AutoSize;
|
||||
dataGridView2.Location = new Point(623, 0);
|
||||
dataGridView2.Name = "dataGridView2";
|
||||
dataGridView2.RowTemplate.Height = 25;
|
||||
dataGridView2.SelectionMode = DataGridViewSelectionMode.FullRowSelect;
|
||||
dataGridView2.Size = new Size(384, 426);
|
||||
dataGridView2.TabIndex = 4;
|
||||
label2.AutoSize = true;
|
||||
label2.Location = new Point(6, 19);
|
||||
label2.Name = "label2";
|
||||
label2.Size = new Size(46, 15);
|
||||
label2.TabIndex = 6;
|
||||
label2.Text = "Factura";
|
||||
//
|
||||
// dataGridView1
|
||||
// label1
|
||||
//
|
||||
dataGridView1.AutoSizeColumnsMode = DataGridViewAutoSizeColumnsMode.Fill;
|
||||
dataGridView1.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.AutoSize;
|
||||
dataGridView1.Location = new Point(6, 16);
|
||||
dataGridView1.Name = "dataGridView1";
|
||||
dataGridView1.RowTemplate.Height = 25;
|
||||
dataGridView1.SelectionMode = DataGridViewSelectionMode.FullRowSelect;
|
||||
dataGridView1.Size = new Size(508, 241);
|
||||
dataGridView1.TabIndex = 3;
|
||||
dataGridView1.CellBorderStyleChanged += dataGridView1_CellBorderStyleChanged;
|
||||
dataGridView1.CellClick += dataGridView1_CellClick;
|
||||
dataGridView1.CellContentClick += dataGridView1_CellContentClick;
|
||||
label1.AutoSize = true;
|
||||
label1.Location = new Point(520, 19);
|
||||
label1.Name = "label1";
|
||||
label1.Size = new Size(48, 15);
|
||||
label1.TabIndex = 5;
|
||||
label1.Text = "Detalles";
|
||||
//
|
||||
// dgvDetalles
|
||||
//
|
||||
dgvDetalles.AllowUserToAddRows = false;
|
||||
dgvDetalles.AllowUserToDeleteRows = false;
|
||||
dgvDetalles.AutoSizeColumnsMode = DataGridViewAutoSizeColumnsMode.Fill;
|
||||
dgvDetalles.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.AutoSize;
|
||||
dgvDetalles.EditMode = DataGridViewEditMode.EditProgrammatically;
|
||||
dgvDetalles.ImeMode = ImeMode.On;
|
||||
dgvDetalles.Location = new Point(520, 40);
|
||||
dgvDetalles.Name = "dgvDetalles";
|
||||
dgvDetalles.RowTemplate.Height = 25;
|
||||
dgvDetalles.SelectionMode = DataGridViewSelectionMode.FullRowSelect;
|
||||
dgvDetalles.Size = new Size(384, 241);
|
||||
dgvDetalles.TabIndex = 4;
|
||||
//
|
||||
// dgvFacturas
|
||||
//
|
||||
dgvFacturas.AllowUserToAddRows = false;
|
||||
dgvFacturas.AllowUserToDeleteRows = false;
|
||||
dgvFacturas.AutoSizeColumnsMode = DataGridViewAutoSizeColumnsMode.Fill;
|
||||
dgvFacturas.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.AutoSize;
|
||||
dgvFacturas.EditMode = DataGridViewEditMode.EditProgrammatically;
|
||||
dgvFacturas.Location = new Point(6, 40);
|
||||
dgvFacturas.Name = "dgvFacturas";
|
||||
dgvFacturas.RowTemplate.Height = 25;
|
||||
dgvFacturas.SelectionMode = DataGridViewSelectionMode.FullRowSelect;
|
||||
dgvFacturas.Size = new Size(508, 241);
|
||||
dgvFacturas.TabIndex = 3;
|
||||
dgvFacturas.CellClick += dgvFacturas_CellClick;
|
||||
//
|
||||
// BtnAdd
|
||||
//
|
||||
BtnAdd.Location = new Point(6, 299);
|
||||
BtnAdd.Location = new Point(6, 287);
|
||||
BtnAdd.Name = "BtnAdd";
|
||||
BtnAdd.Size = new Size(75, 23);
|
||||
BtnAdd.TabIndex = 0;
|
||||
@@ -93,16 +120,19 @@
|
||||
Text = "Ventas";
|
||||
WindowState = FormWindowState.Maximized;
|
||||
groupBox1.ResumeLayout(false);
|
||||
((System.ComponentModel.ISupportInitialize)dataGridView2).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)dataGridView1).EndInit();
|
||||
groupBox1.PerformLayout();
|
||||
((System.ComponentModel.ISupportInitialize)dgvDetalles).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)dgvFacturas).EndInit();
|
||||
ResumeLayout(false);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private GroupBox groupBox1;
|
||||
private DataGridView dataGridView1;
|
||||
private DataGridView dgvFacturas;
|
||||
private Button BtnAdd;
|
||||
private DataGridView dataGridView2;
|
||||
private DataGridView dgvDetalles;
|
||||
private Label label2;
|
||||
private Label label1;
|
||||
}
|
||||
}
|
||||
@@ -10,14 +10,13 @@ namespace Vista
|
||||
public FrmFacturas()
|
||||
{
|
||||
InitializeComponent();
|
||||
ConfigurarDataGridViewDetalle();
|
||||
ActualizarGrilla();
|
||||
dataGridView1.CellClick += dataGridView1_CellClick;
|
||||
ConfigurarDataGridView2();
|
||||
}
|
||||
private void ActualizarGrilla()
|
||||
{
|
||||
dataGridView1.DataSource = null;
|
||||
dataGridView1.DataSource = ControladoraFacturas.Instance.Listar();
|
||||
dgvFacturas.DataSource = null;
|
||||
dgvFacturas.DataSource = ControladoraFacturas.Instance.Listar();
|
||||
}
|
||||
private void BtnAdd_Click(object sender, EventArgs e)
|
||||
{
|
||||
@@ -26,64 +25,60 @@ namespace Vista
|
||||
ActualizarGrilla();
|
||||
}
|
||||
|
||||
private void dataGridView1_CellBorderStyleChanged(object sender, EventArgs e)
|
||||
private void ConfigurarDataGridViewDetalle()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
private void dataGridView1_CellContentClick(object sender, DataGridViewCellEventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
private void ConfigurarDataGridView2()
|
||||
{
|
||||
dataGridView2.AutoGenerateColumns = false;
|
||||
dataGridView2.Columns.Add(new DataGridViewTextBoxColumn
|
||||
dgvDetalles.AutoGenerateColumns = false;
|
||||
dgvDetalles.Columns.Add(new DataGridViewTextBoxColumn
|
||||
{
|
||||
DataPropertyName = "Producto",
|
||||
HeaderText = "Producto"
|
||||
HeaderText = "Producto",
|
||||
Name = "Producto"
|
||||
});
|
||||
dataGridView2.Columns.Add(new DataGridViewTextBoxColumn
|
||||
dgvDetalles.Columns.Add(new DataGridViewTextBoxColumn
|
||||
{
|
||||
DataPropertyName = "Cantidad",
|
||||
HeaderText = "Cantidad"
|
||||
HeaderText = "Cantidad",
|
||||
Name = "Cantidad"
|
||||
|
||||
});
|
||||
|
||||
dataGridView2.Columns.Add(new DataGridViewTextBoxColumn
|
||||
dgvDetalles.Columns.Add(new DataGridViewTextBoxColumn
|
||||
{
|
||||
DataPropertyName = "PrecioUnitario",
|
||||
HeaderText = "PrecioUnitariod"
|
||||
HeaderText = "PrecioUnitario",
|
||||
Name = "PrecioUnitario"
|
||||
});
|
||||
dataGridView2.Columns.Add(new DataGridViewTextBoxColumn
|
||||
dgvDetalles.Columns.Add(new DataGridViewTextBoxColumn
|
||||
{
|
||||
DataPropertyName = "Subtotal",
|
||||
HeaderText = "Subtotal"
|
||||
HeaderText = "Subtotal",
|
||||
Name = "Subtotal"
|
||||
});
|
||||
}
|
||||
private void ActualizarGrillaLotes(ReadOnlyCollection<Lote> lotes)
|
||||
private void ActualizarGrillaDetalles(ReadOnlyCollection<DetalleFactura> detalles)
|
||||
{
|
||||
dataGridView2.DataSource = null;
|
||||
if (lotes.Any())
|
||||
dgvDetalles.DataSource = null;
|
||||
if (detalles.Any())
|
||||
{
|
||||
var loteDatos = lotes.Select(lote => new
|
||||
var loteDatos = detalles.Select(detalle => new
|
||||
{
|
||||
Producto = lote.NombreProducto,
|
||||
Cantidad = lote.CantidadDeProductos,
|
||||
Subtotal = lote.Subtotal,
|
||||
PrecioUnitario = lote.PrecioUnitario,
|
||||
Producto = detalle.Producto.Nombre,
|
||||
Cantidad = detalle.Cantidad,
|
||||
Subtotal = detalle.Subtotal,
|
||||
PrecioUnitario = detalle.Producto.Precio,
|
||||
}).ToList();
|
||||
|
||||
dataGridView2.DataSource = loteDatos;
|
||||
dgvDetalles.DataSource = loteDatos;
|
||||
}
|
||||
}
|
||||
private void dataGridView1_CellClick(object sender, DataGridViewCellEventArgs e)
|
||||
private void dgvFacturas_CellClick(object sender, DataGridViewCellEventArgs e)
|
||||
{
|
||||
if (e.RowIndex >= 0)
|
||||
{
|
||||
var selectedFactura = (Factura)dataGridView1.Rows[e.RowIndex].DataBoundItem;
|
||||
var lotes = ControladoraLotes.Instance.ListarPorFacturaId(selectedFactura.Id);
|
||||
ActualizarGrillaLotes(lotes);
|
||||
var selectedFactura = (Factura)dgvFacturas.Rows[e.RowIndex].DataBoundItem;
|
||||
var detalles = ControladoraFacturas.Instance.ListarDetallesFactura(selectedFactura);
|
||||
ActualizarGrillaDetalles(detalles);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
<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="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>
|
||||
|
||||
271
Vista/FrmOrdenDeCompra.Designer.cs
generated
271
Vista/FrmOrdenDeCompra.Designer.cs
generated
@@ -28,73 +28,250 @@
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
groupBox1 = new GroupBox();
|
||||
dataGridView1 = new DataGridView();
|
||||
BtnAdd = new Button();
|
||||
BtnEliminar = new Button();
|
||||
groupBox1.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)dataGridView1).BeginInit();
|
||||
label1 = new Label();
|
||||
dgvPresupuesto = new DataGridView();
|
||||
dgvDetalle = new DataGridView();
|
||||
label2 = new Label();
|
||||
numId = new NumericUpDown();
|
||||
ID = new Label();
|
||||
btnAddProducto = new Button();
|
||||
dgvOrdendeCompra = new DataGridView();
|
||||
label3 = new Label();
|
||||
btnAceptar = new Button();
|
||||
btnCerrar = new Button();
|
||||
btnrmPresupuesto = new Button();
|
||||
label4 = new Label();
|
||||
dgvProveedor = new DataGridView();
|
||||
label5 = new Label();
|
||||
numTotal = new NumericUpDown();
|
||||
((System.ComponentModel.ISupportInitialize)dgvPresupuesto).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)dgvDetalle).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)numId).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)dgvOrdendeCompra).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)dgvProveedor).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)numTotal).BeginInit();
|
||||
SuspendLayout();
|
||||
//
|
||||
// groupBox1
|
||||
// label1
|
||||
//
|
||||
groupBox1.Controls.Add(dataGridView1);
|
||||
groupBox1.Controls.Add(BtnAdd);
|
||||
groupBox1.Controls.Add(BtnEliminar);
|
||||
groupBox1.Location = new Point(12, 3);
|
||||
groupBox1.Name = "groupBox1";
|
||||
groupBox1.Size = new Size(776, 351);
|
||||
groupBox1.TabIndex = 4;
|
||||
groupBox1.TabStop = false;
|
||||
label1.AutoSize = true;
|
||||
label1.Location = new Point(443, 7);
|
||||
label1.Name = "label1";
|
||||
label1.Size = new Size(77, 15);
|
||||
label1.TabIndex = 17;
|
||||
label1.Text = "Presupuestos";
|
||||
//
|
||||
// dataGridView1
|
||||
// dgvPresupuesto
|
||||
//
|
||||
dataGridView1.AutoSizeColumnsMode = DataGridViewAutoSizeColumnsMode.DisplayedCells;
|
||||
dataGridView1.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.AutoSize;
|
||||
dataGridView1.Location = new Point(6, 22);
|
||||
dataGridView1.Name = "dataGridView1";
|
||||
dataGridView1.RowTemplate.Height = 25;
|
||||
dataGridView1.Size = new Size(550, 235);
|
||||
dataGridView1.TabIndex = 3;
|
||||
dgvPresupuesto.AllowUserToAddRows = false;
|
||||
dgvPresupuesto.AllowUserToDeleteRows = false;
|
||||
dgvPresupuesto.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.AutoSize;
|
||||
dgvPresupuesto.EditMode = DataGridViewEditMode.EditProgrammatically;
|
||||
dgvPresupuesto.Location = new Point(443, 25);
|
||||
dgvPresupuesto.MultiSelect = false;
|
||||
dgvPresupuesto.Name = "dgvPresupuesto";
|
||||
dgvPresupuesto.RowTemplate.Height = 25;
|
||||
dgvPresupuesto.SelectionMode = DataGridViewSelectionMode.FullRowSelect;
|
||||
dgvPresupuesto.Size = new Size(347, 283);
|
||||
dgvPresupuesto.TabIndex = 16;
|
||||
dgvPresupuesto.CellClick += dgvPresupuesto_CellClick;
|
||||
//
|
||||
// BtnAdd
|
||||
// dgvDetalle
|
||||
//
|
||||
BtnAdd.Location = new Point(6, 302);
|
||||
BtnAdd.Name = "BtnAdd";
|
||||
BtnAdd.Size = new Size(75, 23);
|
||||
BtnAdd.TabIndex = 0;
|
||||
BtnAdd.Text = "Añadir";
|
||||
BtnAdd.UseVisualStyleBackColor = true;
|
||||
BtnAdd.Click += BtnAdd_Click;
|
||||
dgvDetalle.AllowUserToAddRows = false;
|
||||
dgvDetalle.AllowUserToDeleteRows = false;
|
||||
dgvDetalle.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.AutoSize;
|
||||
dgvDetalle.EditMode = DataGridViewEditMode.EditProgrammatically;
|
||||
dgvDetalle.Location = new Point(796, 25);
|
||||
dgvDetalle.MultiSelect = false;
|
||||
dgvDetalle.Name = "dgvDetalle";
|
||||
dgvDetalle.RowTemplate.Height = 25;
|
||||
dgvDetalle.SelectionMode = DataGridViewSelectionMode.FullRowSelect;
|
||||
dgvDetalle.Size = new Size(376, 283);
|
||||
dgvDetalle.TabIndex = 19;
|
||||
//
|
||||
// BtnEliminar
|
||||
// label2
|
||||
//
|
||||
BtnEliminar.Location = new Point(215, 302);
|
||||
BtnEliminar.Name = "BtnEliminar";
|
||||
BtnEliminar.Size = new Size(75, 23);
|
||||
BtnEliminar.TabIndex = 2;
|
||||
BtnEliminar.Text = "Eliminar";
|
||||
BtnEliminar.UseVisualStyleBackColor = true;
|
||||
label2.AutoSize = true;
|
||||
label2.Location = new Point(796, 7);
|
||||
label2.Name = "label2";
|
||||
label2.Size = new Size(43, 15);
|
||||
label2.TabIndex = 18;
|
||||
label2.Text = "Detalle";
|
||||
//
|
||||
// numId
|
||||
//
|
||||
numId.Location = new Point(42, 25);
|
||||
numId.Maximum = new decimal(new int[] { 1410065407, 2, 0, 0 });
|
||||
numId.Name = "numId";
|
||||
numId.Size = new Size(120, 23);
|
||||
numId.TabIndex = 21;
|
||||
//
|
||||
// ID
|
||||
//
|
||||
ID.AutoSize = true;
|
||||
ID.Location = new Point(18, 27);
|
||||
ID.Name = "ID";
|
||||
ID.Size = new Size(18, 15);
|
||||
ID.TabIndex = 20;
|
||||
ID.Text = "ID";
|
||||
//
|
||||
// btnAddProducto
|
||||
//
|
||||
btnAddProducto.Location = new Point(442, 314);
|
||||
btnAddProducto.Name = "btnAddProducto";
|
||||
btnAddProducto.Size = new Size(144, 29);
|
||||
btnAddProducto.TabIndex = 22;
|
||||
btnAddProducto.Text = "Añadir Presupuesto";
|
||||
btnAddProducto.UseVisualStyleBackColor = true;
|
||||
btnAddProducto.Click += btnAddProducto_Click;
|
||||
//
|
||||
// dgvOrdendeCompra
|
||||
//
|
||||
dgvOrdendeCompra.AllowUserToAddRows = false;
|
||||
dgvOrdendeCompra.AllowUserToDeleteRows = false;
|
||||
dgvOrdendeCompra.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.AutoSize;
|
||||
dgvOrdendeCompra.EditMode = DataGridViewEditMode.EditProgrammatically;
|
||||
dgvOrdendeCompra.Location = new Point(18, 69);
|
||||
dgvOrdendeCompra.Name = "dgvOrdendeCompra";
|
||||
dgvOrdendeCompra.RowTemplate.Height = 25;
|
||||
dgvOrdendeCompra.SelectionMode = DataGridViewSelectionMode.FullRowSelect;
|
||||
dgvOrdendeCompra.Size = new Size(387, 294);
|
||||
dgvOrdendeCompra.TabIndex = 23;
|
||||
//
|
||||
// label3
|
||||
//
|
||||
label3.AutoSize = true;
|
||||
label3.Location = new Point(18, 51);
|
||||
label3.Name = "label3";
|
||||
label3.Size = new Size(146, 15);
|
||||
label3.TabIndex = 24;
|
||||
label3.Text = "Detalles Orden de Compra";
|
||||
//
|
||||
// btnAceptar
|
||||
//
|
||||
btnAceptar.Location = new Point(18, 372);
|
||||
btnAceptar.Name = "btnAceptar";
|
||||
btnAceptar.Size = new Size(75, 23);
|
||||
btnAceptar.TabIndex = 25;
|
||||
btnAceptar.Text = "Aceptar";
|
||||
btnAceptar.UseVisualStyleBackColor = true;
|
||||
btnAceptar.Click += btnAceptar_Click;
|
||||
//
|
||||
// btnCerrar
|
||||
//
|
||||
btnCerrar.Location = new Point(330, 375);
|
||||
btnCerrar.Name = "btnCerrar";
|
||||
btnCerrar.Size = new Size(75, 23);
|
||||
btnCerrar.TabIndex = 26;
|
||||
btnCerrar.Text = "Cerrar";
|
||||
btnCerrar.UseVisualStyleBackColor = true;
|
||||
btnCerrar.Click += btnCerrar_Click;
|
||||
//
|
||||
// btnrmPresupuesto
|
||||
//
|
||||
btnrmPresupuesto.Location = new Point(592, 314);
|
||||
btnrmPresupuesto.Name = "btnrmPresupuesto";
|
||||
btnrmPresupuesto.Size = new Size(144, 29);
|
||||
btnrmPresupuesto.TabIndex = 27;
|
||||
btnrmPresupuesto.Text = "Eliminar Presupuesto";
|
||||
btnrmPresupuesto.UseVisualStyleBackColor = true;
|
||||
btnrmPresupuesto.Click += btnrmPresupuesto_Click;
|
||||
//
|
||||
// label4
|
||||
//
|
||||
label4.AutoSize = true;
|
||||
label4.Location = new Point(443, 348);
|
||||
label4.Name = "label4";
|
||||
label4.Size = new Size(61, 15);
|
||||
label4.TabIndex = 28;
|
||||
label4.Text = "Proveedor";
|
||||
//
|
||||
// dgvProveedor
|
||||
//
|
||||
dgvProveedor.AllowUserToAddRows = false;
|
||||
dgvProveedor.AllowUserToDeleteRows = false;
|
||||
dgvProveedor.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.AutoSize;
|
||||
dgvProveedor.EditMode = DataGridViewEditMode.EditProgrammatically;
|
||||
dgvProveedor.Location = new Point(443, 366);
|
||||
dgvProveedor.MultiSelect = false;
|
||||
dgvProveedor.Name = "dgvProveedor";
|
||||
dgvProveedor.RowTemplate.Height = 25;
|
||||
dgvProveedor.SelectionMode = DataGridViewSelectionMode.FullRowSelect;
|
||||
dgvProveedor.Size = new Size(347, 143);
|
||||
dgvProveedor.TabIndex = 29;
|
||||
dgvProveedor.CellClick += dgvProveedor_CellClick;
|
||||
//
|
||||
// label5
|
||||
//
|
||||
label5.AutoSize = true;
|
||||
label5.Location = new Point(177, 29);
|
||||
label5.Name = "label5";
|
||||
label5.Size = new Size(32, 15);
|
||||
label5.TabIndex = 30;
|
||||
label5.Text = "Total";
|
||||
//
|
||||
// numTotal
|
||||
//
|
||||
numTotal.Enabled = false;
|
||||
numTotal.Location = new Point(215, 25);
|
||||
numTotal.Maximum = new decimal(new int[] { 1410065407, 2, 0, 0 });
|
||||
numTotal.Name = "numTotal";
|
||||
numTotal.Size = new Size(120, 23);
|
||||
numTotal.TabIndex = 31;
|
||||
//
|
||||
// FrmOrdenDeCompra
|
||||
//
|
||||
AcceptButton = btnAceptar;
|
||||
AutoScaleDimensions = new SizeF(7F, 15F);
|
||||
AutoScaleMode = AutoScaleMode.Font;
|
||||
ClientSize = new Size(800, 450);
|
||||
Controls.Add(groupBox1);
|
||||
CancelButton = btnCerrar;
|
||||
ClientSize = new Size(1194, 527);
|
||||
Controls.Add(numTotal);
|
||||
Controls.Add(label5);
|
||||
Controls.Add(dgvProveedor);
|
||||
Controls.Add(label4);
|
||||
Controls.Add(btnrmPresupuesto);
|
||||
Controls.Add(btnCerrar);
|
||||
Controls.Add(btnAceptar);
|
||||
Controls.Add(label3);
|
||||
Controls.Add(dgvOrdendeCompra);
|
||||
Controls.Add(btnAddProducto);
|
||||
Controls.Add(numId);
|
||||
Controls.Add(ID);
|
||||
Controls.Add(dgvDetalle);
|
||||
Controls.Add(label2);
|
||||
Controls.Add(label1);
|
||||
Controls.Add(dgvPresupuesto);
|
||||
Name = "FrmOrdenDeCompra";
|
||||
Text = "OrdenDeCompra";
|
||||
WindowState = FormWindowState.Maximized;
|
||||
groupBox1.ResumeLayout(false);
|
||||
((System.ComponentModel.ISupportInitialize)dataGridView1).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)dgvPresupuesto).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)dgvDetalle).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)numId).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)dgvOrdendeCompra).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)dgvProveedor).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)numTotal).EndInit();
|
||||
ResumeLayout(false);
|
||||
PerformLayout();
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private GroupBox groupBox1;
|
||||
private DataGridView dataGridView1;
|
||||
private Button BtnAdd;
|
||||
private Button BtnEliminar;
|
||||
private Label label1;
|
||||
private DataGridView dgvPresupuesto;
|
||||
private DataGridView dgvDetalle;
|
||||
private Label label2;
|
||||
private NumericUpDown numId;
|
||||
private Label ID;
|
||||
private Button btnAddProducto;
|
||||
private DataGridView dgvOrdendeCompra;
|
||||
private Label label3;
|
||||
private Button btnAceptar;
|
||||
private Button btnCerrar;
|
||||
private Button btnrmPresupuesto;
|
||||
private Label label4;
|
||||
private DataGridView dgvProveedor;
|
||||
private Label label5;
|
||||
private NumericUpDown numTotal;
|
||||
}
|
||||
}
|
||||
@@ -1,4 +1,6 @@
|
||||
using System;
|
||||
using Controladora;
|
||||
using Entidades;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Data;
|
||||
@@ -12,14 +14,192 @@ namespace Vista
|
||||
{
|
||||
public partial class FrmOrdenDeCompra : Form
|
||||
{
|
||||
private OrdenDeCompra orden = new OrdenDeCompra();
|
||||
private List<DetalleOrdenDeCompra> detalles = new List<DetalleOrdenDeCompra>();
|
||||
private int detalleid = 0;
|
||||
public FrmOrdenDeCompra()
|
||||
{
|
||||
InitializeComponent();
|
||||
CargarDatos();
|
||||
}
|
||||
|
||||
private void BtnAdd_Click(object sender, EventArgs e)
|
||||
private void CargarDatos()
|
||||
{
|
||||
var listaOrden = ControladoraOrdenDeCompras.Instance.Listar();
|
||||
numId.Value = (listaOrden.Count > 0) ?
|
||||
listaOrden.Max(x => x.Id + 1) :
|
||||
0;
|
||||
numId.Enabled = false;
|
||||
|
||||
//Asegúrate de que solo las columnas que deseas mostrar están visibles
|
||||
foreach (DataGridViewColumn column in dgvPresupuesto.Columns)
|
||||
{
|
||||
column.Visible = column.Name == "Id" || column.Name == "Fecha" || column.Name == "ProveedorNombre";
|
||||
}
|
||||
|
||||
dgvProveedor.DataSource = null;
|
||||
dgvProveedor.DataSource = ControladoraProveedores.Instance.Listar();
|
||||
|
||||
}
|
||||
|
||||
private void btnAddProducto_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (dgvPresupuesto.SelectedRows.Count > 0)
|
||||
{
|
||||
dgvProveedor.Enabled = false;
|
||||
foreach (DataGridViewRow selectedRow in dgvPresupuesto.SelectedRows)
|
||||
{
|
||||
Presupuesto? pres = new Presupuesto
|
||||
{
|
||||
Id = Convert.ToInt32(selectedRow.Cells["Id"].Value.ToString()),
|
||||
};
|
||||
pres = ControladoraPresupuestos.Instance.MostrarPresupuestoPorId(pres);
|
||||
|
||||
if (pres == null)
|
||||
{
|
||||
MessageBox.Show("No existe Presupuesto por ese Id");
|
||||
return;
|
||||
}
|
||||
|
||||
var listadetalle = ControladoraPresupuestos.Instance.ListarDetalles(pres);
|
||||
|
||||
foreach (var detalle in listadetalle)
|
||||
{
|
||||
|
||||
orden.AñadirDetalle(new DetalleOrdenDeCompra
|
||||
{
|
||||
Cantidad = detalle.Cantidad,
|
||||
Id = detalleid++,
|
||||
IdOrdenDeCompra = Convert.ToInt32(numId.Value),
|
||||
MontoCU = detalle.MontoCUPropuesto,
|
||||
Producto = detalle.Producto,
|
||||
presupuesto = pres,
|
||||
});
|
||||
}
|
||||
|
||||
dgvOrdendeCompra.DataSource = null;
|
||||
dgvOrdendeCompra.DataSource = orden.MostrarDetalles();
|
||||
foreach (DataGridViewColumn column in dgvOrdendeCompra.Columns)
|
||||
{
|
||||
column.Visible = column.Name == "IdPresupuesto" || column.Name == "NombreProducto" || column.Name == "MontoCU"
|
||||
|| column.Name == "Cantidad"|| column.Name == "SubTotal";
|
||||
}
|
||||
numTotal.Value = Convert.ToDecimal(orden.MontoTotal);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
MessageBox.Show("Por favor, selecciona una fila para añadir Proveedor al producto.");
|
||||
}
|
||||
}
|
||||
|
||||
private void dgvPresupuesto_CellClick(object sender, DataGridViewCellEventArgs e)
|
||||
{
|
||||
// Verifica si hay filas seleccionadas en dgvPresupuesto
|
||||
if (dgvPresupuesto.SelectedRows.Count == 0) return;
|
||||
|
||||
// Recupera el ID del presupuesto seleccionado
|
||||
int presupuestoId = Convert.ToInt32(dgvPresupuesto.SelectedRows[0].Cells["Id"].Value.ToString());
|
||||
var presupuesto = new Presupuesto
|
||||
{
|
||||
Id = presupuestoId,
|
||||
};
|
||||
|
||||
// Obtén los detalles del presupuesto usando el método de la controladora
|
||||
var detallesPresupuesto = ControladoraPresupuestos.Instance.ListarDetalles(presupuesto);
|
||||
|
||||
// Crea una lista para mostrar el proveedor y los detalles del presupuesto
|
||||
var proveedorYDetalles = detallesPresupuesto.Select(d => new
|
||||
{
|
||||
|
||||
d.NombreDelProducto,
|
||||
d.MontoCUPropuesto,
|
||||
d.Cantidad,
|
||||
d.Subtotal
|
||||
}).ToList();
|
||||
|
||||
// Asigna la lista de proveedor y detalles al DataSource de dgvProveedor
|
||||
dgvDetalle.DataSource = null;
|
||||
dgvDetalle.DataSource = proveedorYDetalles;
|
||||
|
||||
foreach (DataGridViewColumn column in dgvDetalle.Columns)
|
||||
{
|
||||
column.Visible = column.Name == "NombreDelProducto" || column.Name == "MontoCUPropuesto"
|
||||
|| column.Name == "Cantidad" || column.Name == "Subtotal";
|
||||
}
|
||||
}
|
||||
|
||||
private void btnCerrar_Click(object sender, EventArgs e)
|
||||
{
|
||||
this.Close();
|
||||
}
|
||||
|
||||
private bool Validaciones()
|
||||
{
|
||||
string ret = "";
|
||||
if (numId.Value < 0) ret += "El numero de Id es invalido\n";
|
||||
|
||||
if (orden.MostrarDetalles().Count == 0) ret += "No hay detalles en la orden de compra\n";
|
||||
|
||||
if (ret == "")
|
||||
{
|
||||
return false;
|
||||
}
|
||||
MessageBox.Show(ret);
|
||||
return true;
|
||||
}
|
||||
private void btnAceptar_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (Validaciones()) return;
|
||||
|
||||
orden.Id = Convert.ToInt32(numId.Value);
|
||||
orden.Proveedor = (Proveedor)dgvProveedor.SelectedRows[0].DataBoundItem;
|
||||
string msg = ControladoraOrdenDeCompras.Instance.Añadir(orden);
|
||||
MessageBox.Show(msg);
|
||||
this.Close();
|
||||
}
|
||||
|
||||
private void dgvProveedor_CellClick(object sender, DataGridViewCellEventArgs e)
|
||||
{
|
||||
if (dgvProveedor.SelectedRows.Count == 0) return;
|
||||
|
||||
var selectedRow = dgvProveedor.SelectedRows[0];
|
||||
var proveedor = new Proveedor
|
||||
{
|
||||
Cuit = Convert.ToInt32(selectedRow.Cells["Cuit"].Value),
|
||||
};
|
||||
|
||||
var presupuestos = ControladoraPresupuestos.Instance.ListarPresupuestosPorProveedor(proveedor);
|
||||
|
||||
dgvPresupuesto.DataSource = null;
|
||||
dgvPresupuesto.DataSource = presupuestos;
|
||||
|
||||
foreach (DataGridViewColumn column in dgvPresupuesto.Columns)
|
||||
{
|
||||
column.Visible = column.Name == "Id" || column.Name == "Fecha"
|
||||
|| column.Name == "ProveedorNombre";
|
||||
}
|
||||
}
|
||||
|
||||
private void btnrmPresupuesto_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (dgvOrdendeCompra.SelectedRows.Count == 0) return;
|
||||
var selectedRow = dgvOrdendeCompra.SelectedRows[0];
|
||||
|
||||
var presupuesto = new Presupuesto
|
||||
{
|
||||
Id = Convert.ToInt32(selectedRow.Cells["IdPresupuesto"].Value.ToString()),
|
||||
};
|
||||
|
||||
var listaAEliminar = orden.MostrarDetalles().Where(x => x.IdPresupuesto == presupuesto.Id).ToList();
|
||||
foreach (var detalle in listaAEliminar)
|
||||
{
|
||||
orden.EliminarDetalle(detalle);
|
||||
}
|
||||
|
||||
dgvOrdendeCompra.DataSource = null;
|
||||
dgvOrdendeCompra.DataSource = orden.MostrarDetalles();
|
||||
numTotal.Value = Convert.ToDecimal(orden.MontoTotal);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
<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="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>
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user