This repository has been archived on 2024-08-10. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
Final_OOP/Vista/Program.cs

117 lines
3.7 KiB
C#

using Controladora;
using Entidades;
namespace Vista
{
internal static class Program
{
/// <summary>
/// The main entry point for the application.
/// </summary>
[STAThread]
static void Main()
{
// To customize application configuration such as set high DPI settings or default font,
// see https://aka.ms/applicationconfiguration.
PrecargarDatos();
ApplicationConfiguration.Initialize();
Application.Run(new PantallaPrincipal());
}
private static void PrecargarDatos()
{
Proveedor proveedor = new Proveedor
{
Cuit = 157618923,
Direccion = "La Rioja 6412",
Nombre = "Outlet Riojano",
Habilitado = true,
RazonSocial = "Vende Ropa"
};
ControladoraProveedores.Instance.Añadir(proveedor);
Proveedor proveedor2 = new Proveedor
{
Cuit = 357618653,
Direccion = "San Martin 2261",
Nombre = "Arrollito Deport",
Habilitado = true,
RazonSocial = "Vende Ropa Deportiva"
};
ControladoraProveedores.Instance.Añadir(proveedor2);
ControladoraClientes.Instance.Añadir(new Cliente{
Cuit = 23453659239,
Apellido = "Polidoro",
Nombre = "Federico",
Correo = "federico.nicolas.polidoro@gmail.com",
Direccion = "nose",
Habilitado = true
});
ControladoraClientes.Instance.Añadir(new Cliente{
Cuit = 17385912736,
Apellido = "Diana",
Nombre = "Ignacio",
Correo = "Ignaciodiana@gmail.com",
Direccion = "nose",
Habilitado = true
});
ControladoraCategorias.Instance.Añadir(new Entidades.Categoria{
Id = 1,
Descripcion = "Indumentaria"
});
ControladoraCategorias.Instance.Añadir(new Entidades.Categoria
{
Id = 2,
Descripcion = "Perfumeria"
});
Producto producto = new Producto
{
Id = 1,
Categoria = ControladoraCategorias.Instance.Listar()[0],
Habilitado = true,
Nombre = "Pantalones Vaqueros",
Precio = 2000.2
};
producto.AñadirProveedor(proveedor);
ControladoraProductos.Instance.Añadir(producto);
Presupuesto presupuesto = new Presupuesto
{
Id = 1,
Aceptado = false,
Habilitado = true,
Fecha = DateTime.Now,
Proveedor = proveedor,
};
presupuesto.AñadirDetalle(new DetallePresupuesto
{
Id = 1,
Cantidad = 2,
IdPresupuesto = 1,
MontoCUPropuesto = 1000,
Producto = producto,
});
ControladoraPresupuestos.Instance.Añadir(presupuesto);
OrdenDeCompra orden = new OrdenDeCompra
{
Id = 1,
Proveedor = proveedor,
};
orden.AñadirDetalle(new DetalleOrdenDeCompra
{
Id= 1,
Cantidad= 2,
IdOrdenDeCompra = 1,
MontoCU = 1000,
Producto = producto,
});
ControladoraOrdenDeCompras.Instance.Añadir(orden);
}
}
}