Exemplo n.º 1
0
        private void mostrarProductosConBajoStockToolStripMenuItem_Click(object sender, EventArgs e)
        {
            FormMostrarLista mostrarLista = new FormMostrarLista();

            mostrarLista.ListaDtgv.DataSource  = Producto.SubListPorStock(Administracion.Inventario, 0, 10);
            mostrarLista.BotonAgregar.Enabled  = false;
            mostrarLista.BotonDetalles.Enabled = false;
            mostrarLista.Text = "PRODUCTOS CON MENOS DE 10 EN STOCK";
            mostrarLista.ShowDialog();
        }
Exemplo n.º 2
0
        private void btnClienteExistente_Click(object sender, EventArgs e)
        {
            RestearTiempoInactividad();
            FormMostrarLista formMostrar = new FormMostrarLista();

            formMostrar.ListaDtgv.DataSource = Administracion.Clientes;
            formMostrar.BotonAgregar.Enabled = true;
            formMostrar.Text = "SELECIONE UN CLIENTE Y AGREGELO A LA COMPRA";
            if (formMostrar.ShowDialog() == DialogResult.Yes) //boton agregar
            {
                this.txbDniCliente.Text = (((Cliente)(formMostrar.Dato)).Dni).ToString();
            }
        }
Exemplo n.º 3
0
        private void listaClientesToolStripMenuItem_Click(object sender, EventArgs e)
        {
            FormMostrarLista mostrarLista = new FormMostrarLista();

            mostrarLista.ListaDtgv.DataSource = Administracion.Clientes;
            mostrarLista.BotonAgregar.Enabled = true;
            mostrarLista.Text = "LISTA CLIENTES";
            if (mostrarLista.ShowDialog() == DialogResult.Yes) //si presiona agregar
            {
                FormPersona agregarPersona = new FormPersona("Cliente");
                if (agregarPersona.ShowDialog() == DialogResult.OK) //aceptar en formPersona
                {
                    listaClientesToolStripMenuItem_Click(sender, e);
                }
            }
        }
Exemplo n.º 4
0
        private void listaEmpleadosToolStripMenuItem_Click(object sender, EventArgs e)
        {
            FormMostrarLista mostrarLista = new FormMostrarLista();

            mostrarLista.ListaDtgv.DataSource  = Administracion.Empleados;
            mostrarLista.BotonAgregar.Enabled  = true;
            mostrarLista.BotonDetalles.Enabled = true;
            mostrarLista.Text = "EMPLEADOS";
            if (mostrarLista.ShowDialog() == DialogResult.Yes) // si se apreta el boton agregar
            {
                FormPersona agregarPersona = new FormPersona("Empleado");
                if (agregarPersona.ShowDialog() == DialogResult.OK) //cuando apretan aceptar en el FormPersona
                {
                    listaEmpleadosToolStripMenuItem_Click(sender, e);
                }
            }
            else if (mostrarLista.DialogResult == DialogResult.No) //si apretan el boton detalles
            {
                mostrarLista.ListaDtgv.DataSource = ((Empleado)(mostrarLista.Dato)).ListaVentas;
                mostrarLista.BotonAgregar.Enabled = false;
                mostrarLista.Text = "LISTA DE VENTAS";
                if (mostrarLista.ShowDialog() == DialogResult.OK) //boton salir del FormMostrarLista
                {
                    listaEmpleadosToolStripMenuItem_Click(sender, e);
                }
                else if (mostrarLista.DialogResult == DialogResult.No) //si apreta detalles de compra
                {
                    mostrarLista.ListaDtgv.DataSource  = ((Compra)(mostrarLista.Dato)).ListaItemsCompra;
                    mostrarLista.BotonAgregar.Enabled  = false;
                    mostrarLista.BotonDetalles.Enabled = false;
                    mostrarLista.Text = "DETALLES DE COMPRA";
                    if (mostrarLista.ShowDialog() == DialogResult.OK) //boton salir del FormMostrarLista
                    {
                        listaEmpleadosToolStripMenuItem_Click(sender, e);
                    }
                }
            }
        }