예제 #1
0
        void OrdenesVentaForm_Load(object sender, EventArgs e)
        {
            AcceptButton = btnGuardar;

            contexto             = ContextoPresentacion.Instancia;
            localidadesBL        = new LocalidadesBL(contexto.Negocio);
            clientesBL           = new ClientesBL(contexto.Negocio, localidadesBL);
            ingredientesBL       = new IngredientesBL(contexto.Negocio);
            precioIngredientesBL = new PreciosIngredientesBL(contexto.Negocio);
            recetasBL            = new RecetasBL(contexto.Negocio, precioIngredientesBL);
            ordenesVentaBL       = new OrdenesVentaBL(contexto.Negocio, recetasBL, clientesBL);
            facturasBL           = new FacturasBL(contexto.Negocio, ordenesVentaBL);
            ordenesCompraBL      = new OrdenesCompraBL(contexto.Negocio, ordenesVentaBL, ingredientesBL);

            btnGuardar.Click            += BtnGuardar_Click;
            btnCalcularPrecio.Click     += BtnCalcularPrecio_Click;
            grvPedidos.SelectionChanged += GrvPedidos_SelectionChanged;
            grvPedidos.CellEnter        += GrvPedidos_CellEnter;
            CargarClientes();
            CargarRecetas();
            CargarOrdenesVenta();
            LimpiarFormulario();

            contexto.RegistrarEvento(Resources.OrdenesVentaForm_Ingreso);
        }
예제 #2
0
        void RecetasForm_Load(object sender, EventArgs e)
        {
            AcceptButton = btnVer;

            contexto = ContextoPresentacion.Instancia;
            preciosIngredientesBL = new PreciosIngredientesBL(contexto.Negocio);
            recetasBL             = new RecetasBL(contexto.Negocio, preciosIngredientesBL);

            btnGuardar.Click            += BtnGuardar_Click;
            btnVer.Click                += BtnVer_Click;;
            grvRecetas.SelectionChanged += GrvRecetas_SelectionChanged;;
            grvRecetas.CellEnter        += GrvRecetas_CellEnter;
            CargarRecetas();
            LimpiarFormulario();

            contexto.RegistrarEvento(Resources.RecetasForm_Ingreso);
        }
예제 #3
0
        void FacturasForm_Load(object sender, EventArgs e)
        {
            AcceptButton = btnCobrada;

            contexto             = ContextoPresentacion.Instancia;
            localidadesBL        = new LocalidadesBL(contexto.Negocio);
            clientesBL           = new ClientesBL(contexto.Negocio, localidadesBL);
            precioIngredientesBL = new PreciosIngredientesBL(contexto.Negocio);
            recetasBL            = new RecetasBL(contexto.Negocio, precioIngredientesBL);
            ordenesVentaBL       = new OrdenesVentaBL(contexto.Negocio, recetasBL, clientesBL);
            facturasBL           = new FacturasBL(contexto.Negocio, ordenesVentaBL);

            btnCobrada.Click             += BtnCobrada_Click;
            grvFacturas.SelectionChanged += GrvFacturas_SelectionChanged;
            grvFacturas.CellEnter        += GrvFacturas_CellEnter;
            CargarFacturas();
            LimpiarFormulario();

            contexto.RegistrarEvento(Resources.FacturasForm_Ingreso);
        }
예제 #4
0
        void PedidosForm_Load(object sender, EventArgs e)
        {
            AcceptButton = btnFiltrar;

            contexto             = ContextoPresentacion.Instancia;
            localidadesBL        = new LocalidadesBL(contexto.Negocio);
            clientesBL           = new ClientesBL(contexto.Negocio, localidadesBL);
            precioIngredientesBL = new PreciosIngredientesBL(contexto.Negocio);
            recetasBL            = new RecetasBL(contexto.Negocio, precioIngredientesBL);
            ordenesVentaBL       = new OrdenesVentaBL(contexto.Negocio, recetasBL, clientesBL);

            btnFiltrar.Click += BtnFiltrar_Click;
            btnRecetas.Click += BtnRecetas_Click;

            CargarClientes();
            CargarPedidos();
            LimpiarFormulario();

            contexto.RegistrarEvento(Resources.PedidosForm_Ingreso);
        }