コード例 #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 PreciosForm_Load(object sender, EventArgs e)
        {
            AcceptButton = btnGuardar;

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

            btnGuardar.Click            += BtnGuardar_Click;
            grvPrecios.SelectionChanged += GrvRecetas_SelectionChanged;;
            grvPrecios.CellEnter        += GrvRecetas_CellEnter;
            CargarUnidades();
            CargarPrecios();
            LimpiarFormulario();

            contexto.RegistrarEvento(Resources.PreciosForm_Ingreso);
        }