Example #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);
        }
Example #2
0
        void Inicializar()
        {
            this.CargarLenguaje();

            InitializeComponent();

            contexto = ContextoPresentacion.Instancia;

            Text = Resources.InicioForm_Titulo;
            tsAdministrar.Text    = Resources.InicioForm_Menu_Administrar_Titulo;
            tsiClientes.Text      = Resources.InicioForm_Menu_Administrar_Clientes;
            tsiProveedores.Text   = Resources.InicioForm_Menu_Administrar_Proveedores;
            tsiEmpleados.Text     = Resources.InicioForm_Menu_Administrar_Empleados;
            tsiUsuarios.Text      = Resources.InicioForm_Menu_Administrar_Usuarios;
            tsCocina.Text         = Resources.InicioForm_Menu_Cocina_Titulo;
            tsiPedidosCocina.Text = Resources.InicioForm_Menu_Cocina_Pedidos;
            tsiRecetas.Text       = Resources.InicioForm_Menu_Cocina_Recetas;
            tsiPrecios.Text       = Resources.InicioForm_Menu_Cocina_Precios;
            tsVentas.Text         = Resources.InicioForm_Menu_Ventas_Titulo;
            tsiPedidos.Text       = Resources.InicioForm_Menu_Ventas_Pedidos;
            tsiFacturas.Text      = Resources.InicioForm_Menu_Ventas_Facturas;
            tsCompras.Text        = Resources.InicioForm_Menu_Compras_Titulo;
            tsiOrdenesCompra.Text = Resources.InicioForm_Menu_Compras_Ordenes;
            tsiOrdenesPago.Text   = Resources.InicioForm_Menu_Compras_Pagos;
            tsOpciones.Text       = Resources.InicioForm_Menu_Opciones_Titulo;
            tsiBitacora.Text      = Resources.InicioForm_Menu_Opciones_Bitacora;
            tsiLenguaje.Text      = Resources.InicioForm_Menu_Opciones_Lenguaje;
            tsiEspaniol.Text      = Resources.InicioForm_Menu_Opciones_Espaniol;
            tsiIngles.Text        = Resources.InicioForm_Menu_Opciones_Ingles;
            tsiDatos.Text         = Resources.InicioForm_Menu_Opciones_Datos_Titulo;
            tsiBackup.Text        = Resources.InicioForm_Menu_Opciones_Datos_Backup;
            tsiRestaurar.Text     = Resources.InicioForm_Menu_Opciones_Datos_Restaurar;
            tsiSalir.Text         = Resources.InicioForm_Menu_Opciones_Salir;

            tsiClientes.Click      += TsiClientes_Click;
            tsiProveedores.Click   += TsiProveedores_Click;
            tsiEmpleados.Click     += TsiEmpleados_Click;
            tsiUsuarios.Click      += TsiUsuarios_Click;
            tsiPedidosCocina.Click += TsiPedidosCocina_Click;
            tsiRecetas.Click       += TsiRecetas_Click;
            tsiPrecios.Click       += TsiPrecios_Click;
            tsiPedidos.Click       += TsiPedidos_Click;
            tsiFacturas.Click      += TsiFacturas_Click;
            tsiOrdenesCompra.Click += TsiOrdenesCompra_Click;
            tsiOrdenesPago.Click   += TsiOrdenesPago_Click;
            tsiBitacora.Click      += TsiBitacora_Click;
            tsiEspaniol.Click      += TsiEspaniol_Click;
            tsiIngles.Click        += TsiIngles_Click;
            tsiBackup.Click        += TsiBackup_Click;
            tsiRestaurar.Click     += TsiRestaurar_Click;
            tsiSalir.Click         += TsSalir_Click;
        }
Example #3
0
        void BienvenidaForm_Load(object sender, System.EventArgs e)
        {
            //Dispara la inicializacion de los contextos y de los datos
            ContextoPresentacion contexto = ContextoPresentacion.Instancia;

            //Esperamos 3 segundos para que la pantalla de presentacion se quede un instante
            Timer temporizador = new Timer
            {
                Interval = 3000
            };

            temporizador.Tick += Temporizador_Tick;
            temporizador.Start();
        }
Example #4
0
        void LoginForm_Load(object sender, EventArgs e)
        {
            AcceptButton = btnIngresar;

            contexto   = ContextoPresentacion.Instancia;
            usuariosBL = new UsuariosBL(contexto.Negocio);

            lblNuevoPassword.Visible = false;
            txtNuevoPassword.Visible = false;
            btnIngresar.Click       += BtnIngresar_Click;
            btnCancelar.Click       += BtnCancelar_Click;

            LimpiarFormulario();

            contexto.RegistrarEvento(Resources.LoginForm_Ingreso);
        }
Example #5
0
        void UsuariosForm_Load(object sender, EventArgs e)
        {
            AcceptButton = btnGuardar;

            contexto   = ContextoPresentacion.Instancia;
            usuariosBL = new UsuariosBL(contexto.Negocio);

            btnGuardar.Click             += BtnGuardar_Click;
            grvUsuarios.SelectionChanged += GrvUsuarios_SelectionChanged;
            grvUsuarios.CellEnter        += GrvUsuarios_CellEnter;
            CargarPerfiles();
            CargarUsuarios();
            LimpiarFormulario();

            contexto.RegistrarEvento(Resources.UsuariosForm_Ingreso);
        }
Example #6
0
        void BitacoraForm_Load(object sender, EventArgs e)
        {
            AcceptButton = btnFiltrar;

            contexto   = ContextoPresentacion.Instancia;
            usuariosBL = new UsuariosBL(ContextoNegocio.Instancia);
            bitacoraBL = new BitacoraBL(ContextoNegocio.Instancia, usuariosBL);

            btnFiltrar.Click += BtnFiltrar_Click;
            CargarTipos();
            CargarUsuarios();
            CargarBitacora();
            LimpiarFormulario();

            contexto.RegistrarEvento(Resources.BitacoraForm_Ingreso);
        }
Example #7
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);
        }
Example #8
0
        void EmpleadosForm_Load(object sender, EventArgs e)
        {
            AcceptButton = btnGuardar;

            contexto      = ContextoPresentacion.Instancia;
            localidadesBL = new LocalidadesBL(contexto.Negocio);
            empleadosBL   = new EmpleadosBL(contexto.Negocio, localidadesBL);

            btnGuardar.Click += BtnGuardar_Click;
            grvEmpleados.SelectionChanged      += GrvClientes_SelectionChanged;
            grvEmpleados.CellEnter             += GrvClientes_CellEnter;
            cboProvincias.SelectedValueChanged += CboProvincias_SelectedValueChanged;
            CargarProvincias();
            CargarEmpleados();
            LimpiarFormulario();

            contexto.RegistrarEvento(Resources.EmpleadosForm_Ingreso);
        }
Example #9
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);
        }
Example #10
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);
        }