public FrmEditarCategoria(Categorias owner)
        {
            _owner = owner;
            InitializeComponent();

            this.Id_Categoria = Convert.ToInt32(_owner.ObtenerSeleccion().Cells["ID"].Value);
            this.textBoxNombre.Text = Convert.ToString(_owner.ObtenerSeleccion().Cells["NOMBRE"].Value);
            this.textBoxDescripcion.Text = Convert.ToString(_owner.ObtenerSeleccion().Cells["DESCRIPCIƓN"].Value);
        }
 private void buttonCategorias_Click(object sender, EventArgs e)
 {
     if (categorias == null)
     {
         categorias = new Categorias();
         this.panelContenedor.Controls.Clear();
         this.panelContenedor.Controls.Add(categorias);
     }
     else
     {
         this.panelContenedor.Controls.Clear();
         this.panelContenedor.Controls.Add(categorias);
     }
 }
 private void buttonCategorias_Click(object sender, EventArgs e)
 {
     Categorias controlCategorias = new Categorias();
     this.panelContainer.Controls.Clear();
     this.panelContainer.Controls.Add(controlCategorias);
 }
 public FrmAgregarNuevaCategoria(Categorias owner)
 {
     _owner = owner;
     InitializeComponent();
 }
Example #5
0
 public FrmAgregarNuevaCategoria(Categorias owner)
 {
     _owner = owner;
     InitializeComponent();
 }
        private void MenuItemOnClick(object sender, EventArgs e)
        {
            try
            {
                ToolStripMenuItem menuItem = (ToolStripMenuItem)sender;
                switch (menuItem.Text.ToString())
                {
                case "Salir":
                    this.Close();
                    return;

                case "Registrar Venta":
                    RegistrarVenta registrarVenta = null;
                    registrarVenta.MdiParent = this;
                    registrarVenta.Show();
                    return;

                case "Buscar Productos":
                    BuscarProductos buscarProductos = null;
                    buscarProductos           = BuscarProductos.Instance();
                    buscarProductos.MdiParent = this;
                    buscarProductos.Show();
                    return;

                case "Buscar Clientes":
                    BuscarClientes buscarClientes = null;
                    buscarClientes           = BuscarClientes.Instance();
                    buscarClientes.MdiParent = this;
                    buscarClientes.Show();
                    return;

                case "Buscar Proveedor":
                    BuscarProveedores buscarProveedores = null;
                    buscarProveedores           = BuscarProveedores.Instance();
                    buscarProveedores.MdiParent = this;
                    buscarProveedores.Show();
                    return;

                case "Agregar Cliente":
                    AgregarCliente agregarCliente = null;
                    agregarCliente           = AgregarCliente.Instance();
                    agregarCliente.MdiParent = this;
                    agregarCliente.Show();
                    return;

                case "Agregar Producto":
                    AgregarProducto agregarProducto = null;
                    agregarProducto           = AgregarProducto.Instance();
                    agregarProducto.MdiParent = this;
                    agregarProducto.Show();
                    return;

                case "Agregar Proveedor":
                    AgregarProveedor agregarProveedor = null;
                    agregarProveedor           = AgregarProveedor.Instance();
                    agregarProveedor.MdiParent = this;
                    agregarProveedor.Show();
                    return;

                case "Configuracion":
                    Configuracion configuracion = null;
                    configuracion           = Configuracion.Instance();
                    configuracion.MdiParent = this;
                    configuracion.Show();
                    return;

                case "Registrar Compra":
                    return;

                case "Imprimir Ultima Factura":
                    ComprobarTipoFactura();

                    return;

                case "Categorias Productos":
                    Categorias categoriasProd = null;
                    categoriasProd           = Categorias.Instance();
                    categoriasProd.MdiParent = this;
                    categoriasProd.Show();
                    return;

                case "Tipos de Pagos":
                    TiposDePago tiposDePago = null;
                    tiposDePago           = TiposDePago.Instance();
                    tiposDePago.MdiParent = this;
                    tiposDePago.Show();
                    return;

                case "Tipos de Facturas":
                    TiposDeFacturas tiposDeFacturas = null;
                    tiposDeFacturas           = TiposDeFacturas.Instance();
                    tiposDeFacturas.MdiParent = this;
                    tiposDeFacturas.Show();
                    return;

                case "Usuarios":
                    Usuarios usuarios = null;
                    usuarios           = Usuarios.Instance();
                    usuarios.MdiParent = this;
                    usuarios.Show();
                    return;

                case "Ordenes de Compras":
                    OrdenesCompras ordenesCompras = null;
                    ordenesCompras           = OrdenesCompras.Instance();
                    ordenesCompras.MdiParent = this;
                    ordenesCompras.Show();
                    return;

                case "Productos con existencia baja":
                    ProductosExistBaja productosExistBaja = null;
                    productosExistBaja           = ProductosExistBaja.Instance();
                    productosExistBaja.MdiParent = this;
                    productosExistBaja.Show();
                    return;

                case "Lineas de credito ventas":
                    LineasCreditoVentas lineasCreditoVentas = null;
                    lineasCreditoVentas           = LineasCreditoVentas.Instance();
                    lineasCreditoVentas.MdiParent = this;
                    lineasCreditoVentas.Show();
                    return;

                case "Notas de credito":
                    NotaDeCredito notaDeCredito = null;
                    notaDeCredito           = NotaDeCredito.Instance();
                    notaDeCredito.MdiParent = this;
                    notaDeCredito.Show();
                    return;

                case "Buscar notas de credito":
                    BuscarNotasDeCredito buscarNotasDeCredito = null;
                    buscarNotasDeCredito           = BuscarNotasDeCredito.Instance();
                    buscarNotasDeCredito.MdiParent = this;
                    buscarNotasDeCredito.Show();
                    return;

                case "Buscar facturas":
                    BuscarFacturasVenta buscarFacturasVenta = null;
                    buscarFacturasVenta           = BuscarFacturasVenta.Instance();
                    buscarFacturasVenta.MdiParent = this;
                    buscarFacturasVenta.Show();
                    return;

                case "Imprimir ordenes de compra":
                    RangoFechaPedidosProveedor rangoFechaPedidosProveedor = null;
                    rangoFechaPedidosProveedor           = RangoFechaPedidosProveedor.Instance();
                    rangoFechaPedidosProveedor.MdiParent = this;
                    rangoFechaPedidosProveedor.Show();
                    return;

                case "Calcular Ganancias":
                    ImprimirGanancias imprimirGanancias = null;
                    imprimirGanancias           = ImprimirGanancias.Instance();
                    imprimirGanancias.MdiParent = this;
                    imprimirGanancias.Show();
                    return;

                case "Imprimir lineas de credito":
                    RangoFechasLCreditoVenta rangoFechasLCreditoVenta = null;
                    rangoFechasLCreditoVenta           = RangoFechasLCreditoVenta.Instance();
                    rangoFechasLCreditoVenta.MdiParent = this;
                    rangoFechasLCreditoVenta.Show();
                    return;

                case "Imprimir los 10 productos mas vendidos":
                    RangoFecha10ProdMasVendidos rangoFecha10ProdMasVendidos = null;
                    rangoFecha10ProdMasVendidos           = RangoFecha10ProdMasVendidos.Instance();
                    rangoFecha10ProdMasVendidos.MdiParent = this;
                    rangoFecha10ProdMasVendidos.Show();
                    return;

                case "Imprimir facturas de venta":
                    RangoFechaFacturas rangoFechaFacturas = null;
                    rangoFechaFacturas           = RangoFechaFacturas.Instance();
                    rangoFechaFacturas.MdiParent = this;
                    rangoFechaFacturas.Show();
                    return;

                case "Imprimir notas de credito venta":
                    RangoFechaNotasCreditoPFecha rangoFechaNotasCreditoPFecha = null;
                    rangoFechaNotasCreditoPFecha           = RangoFechaNotasCreditoPFecha.Instance();
                    rangoFechaNotasCreditoPFecha.MdiParent = this;
                    rangoFechaNotasCreditoPFecha.Show();
                    return;

                default:
                    break;
                }
            }
            catch (Exception exc)
            {
                MessageBox.Show("Error: " + exc.ToString(),
                                "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                loggeator.EscribeEnArchivo(exc.ToString());
            }
        }
        private void btnAgregarCategoria_Click(object sender, EventArgs e)
        {
            Categorias ct = new Categorias();

            ct.Show();
        }