コード例 #1
0
 private void btnFiltrar_Click(object sender, RoutedEventArgs e)
 {
     if (cmbOpciones.SelectedIndex == 0)//Listar Todas las facturas pendientes
     {
         wnwFacturasCliente nueva = new wnwFacturasCliente(Tipo: "Todas", IdCliente: 0, IdFactura: 0);
         nueva.ShowDialog();
     }
     if (cmbOpciones.SelectedIndex == 1)//Listar las facturas pendientes por cliente
     {
         wnwBuscadorCliente venPedidoCliente = new wnwBuscadorCliente("Ver");
         venPedidoCliente.Show();
     }
     if (cmbOpciones.SelectedIndex == 2)//Listar A partir del número de factura
     {
         wnwFacturasCliente nueva = new wnwFacturasCliente(Tipo: "Por factura", IdCliente: 0, IdFactura: Convert.ToInt32(txtNumeroFactura.Text));
         nueva.ShowDialog();
     }
 }
        private void btnFiltrar_Click(object sender, RoutedEventArgs e)
        {
            if (cmbOpciones.SelectedIndex == 0)//Listar Todas las facturas pendientes
            {
                wnwFacturasCliente nueva = new wnwFacturasCliente(Tipo: "Todas", IdCliente: 0, IdFactura: 0);
                nueva.ShowDialog();
            }
            if (cmbOpciones.SelectedIndex == 1)//Listar las facturas pendientes por cliente
            {
                wnwBuscadorCliente venPedidoCliente = new wnwBuscadorCliente("Ver");
                venPedidoCliente.Show();

            }
            if (cmbOpciones.SelectedIndex == 2)//Listar A partir del número de factura
            {

                wnwFacturasCliente nueva = new wnwFacturasCliente(Tipo: "Por factura", IdCliente: 0, IdFactura: Convert.ToInt32(txtNumeroFactura.Text));
                nueva.ShowDialog();
            }
        }
コード例 #3
0
        private void BtnOpcion_Click(object sender, RoutedEventArgs e)
        {
            var boton = (Button)sender;
            if (opcion == "Pedido")
            {
                wnwRealizarPedidoCliente nuevoPedido = new wnwRealizarPedidoCliente(pPk_Id_Cliente: Convert.ToInt32(boton.Tag));
                nuevoPedido.ShowDialog();

            }
            else if (opcion == "Editar")
            {

                wnwRegistrarPersona ventana = new wnwRegistrarPersona("Cliente", pAsociado: null, pEmpleado: null, pCliente: MantCliente.ObtenerCliente(Convert.ToInt32(boton.Tag)));
                ventana.ShowDialog();//editar
            }
            else if (opcion == "Ver")
            {
                wnwFacturasCliente nueva = new wnwFacturasCliente(Tipo: "Por cliente", IdCliente: Convert.ToInt32(boton.Tag), IdFactura: 0);
                nueva.ShowDialog();

            }
            else if (opcion == "Abono")
            {
                //nuevo.btnOpcion.Content = "Hacer Abono";

            }
            else if (opcion == "Eliminar o Activar")
            {


                if (MessageBox.Show("¿Realmente eliminar este Cliente?", "SIGEEA", MessageBoxButton.YesNo, MessageBoxImage.Warning) == MessageBoxResult.Yes)
                {
                    ClienteMantenimiento mant = new ClienteMantenimiento();
                    mant.EliminarCliente(Convert.ToInt32(boton.Tag));//eliminar

                }
                actualiza();
            }

        }