コード例 #1
0
 private void btnEditar_Click(object sender, RoutedEventArgs e)
 {
     wnwVistaAsociados ventana = new wnwVistaAsociados();
     ventana.ShowDialog();
 }
コード例 #2
0
        private void Nuevo_SelectionChanged(object sender, SelectionChangedEventArgs e)
        {
            ComboBox cmb = (ComboBox)sender;


            switch (cmb.SelectedItem.ToString())
            {

                case "Registrar nuevo asociado":
                    wnwRegistrarPersona ventanaRegistro = new wnwRegistrarPersona(pTipoPersona: "Asociado", pAsociado: null, pEmpleado: null, pCliente: null);
                    ventanaRegistro.Show();
                    break;

                case "Editar asociado existente":
                    wnwVistaAsociados ventanaEdicion = new wnwVistaAsociados();
                    ventanaEdicion.ShowDialog();
                    break;

                case "Agregar/Editar dirección de asociados":
                    wnwIdentificar ventanaDireccion = new wnwIdentificar("Direccion");
                    ventanaDireccion.ShowDialog();
                    break;

                case "Registrar cuota":
                    wnwRegistrarCuota venRegistraCuota = new wnwRegistrarCuota(0);
                    venRegistraCuota.ShowDialog();
                    break;

                case "Administrar pagos de cuotas":
                    DataClasses1DataContext dc = new DataClasses1DataContext();
                    if (dc.SIGEEA_spObtenerCuotas().ToList().Count > 0)
                    {
                        wnwCuotas ventana2 = new wnwCuotas();
                        ventana2.ShowDialog();
                    }
                    else MessageBox.Show("No hay cuotas registradas actualmente.", "SIGEEA", MessageBoxButton.OK, MessageBoxImage.Error);
                    break;

                case "Reuniones":
                    wnwAsambleas ventana = new wnwAsambleas();
                    ventana.ShowDialog();
                    break;

                case "Registrar nuevo cliente":
                    wnwRegistrarPersona venRegistroCliente = new wnwRegistrarPersona(pTipoPersona: "Cliente", pAsociado: null, pEmpleado: null, pCliente: null);
                    venRegistroCliente.Show();
                    break;

                case "Editar cliente":
                    wnwBuscadorCliente venEditarCliente = new wnwBuscadorCliente("Editar");
                    venEditarCliente.Show();
                    break;

                case "Generar factura":
                    wnwBuscadorCliente venPedidoCliente = new wnwBuscadorCliente("Pedido");
                    venPedidoCliente.Show();
                    break;

                case "Realizar abono a factura":
                    wnwMetodoBusquedaFactura venAbonoCredito = new wnwMetodoBusquedaFactura();
                    venAbonoCredito.Show();
                    break;

                case "Entrega de producto":
                    wnwIdentificar ventanaEntrega = new wnwIdentificar("Entrega");
                    ventanaEntrega.ShowDialog();
                    break;

                case "Gestionar facturas incompletas":
                    wnwOpcionesFacturaProducto ventanaIncompletas = new wnwOpcionesFacturaProducto(false);
                    ventanaIncompletas.ShowDialog();
                    break;

                case "Gestionar facturas pendientes":
                    wnwOpcionesFacturaProducto ventanaPendientes = new wnwOpcionesFacturaProducto(true);
                    ventanaPendientes.ShowDialog();
                    break;

                case "Gestiona facturas incompletas":
                    wnwBuscadorCliente nuevo = new wnwBuscadorCliente("Facturas Incompletas");
                    nuevo.Show();
                    break;

                case "Registrar nuevo empleado":
                    wnwRegistrarPersona ventanaRegistroEmp = new wnwRegistrarPersona(pTipoPersona: "Empleado", pAsociado: null, pEmpleado: null, pCliente: null);
                    ventanaRegistroEmp.Show();
                    break;

                case "Editar empleado existente":
                    wnwIdentificarEmpleado ventanaIdentifica = new wnwIdentificarEmpleado("Editar");
                    ventanaIdentifica.ShowDialog();
                    break;

                case "Agregar/Editar dirección de empleados":
                    wnwIdentificarEmpleado ventanaDir = new wnwIdentificarEmpleado("Direccion");
                    ventanaDir.ShowDialog();
                    break;

                case "Gestionar puestos":
                    wnwPuestos ventanaPuestos = new wnwPuestos();
                    ventanaPuestos.ShowDialog();
                    break;

                case "Registro de horas ":
                    wnwRegistrarHorasLaboradas ventanaHor = new wnwRegistrarHorasLaboradas();
                    ventanaHor.ShowDialog();
                    break;

                case "Realizar pagos":
                    wnwIdentificarEmpleado ventanaPagos = new wnwIdentificarEmpleado("Pagos");
                    ventanaPagos.ShowDialog();
                    break;

                case "Agregar finca":
                    wnwBuscadorAsociados venAgregarFinca = new wnwBuscadorAsociados("Registrar");
                    venAgregarFinca.Show();
                    break;

                case "Editar finca":
                    wnwOpcionesBusquedaFinca venEditarFinca = new wnwOpcionesBusquedaFinca("Editar");
                    venEditarFinca.Show();
                    break;

                case "Registrar nuevo producto":
                    wnwRegistrarProducto ventanaProd = new wnwRegistrarProducto();
                    ventanaProd.Show();
                    break;

                case "Compra/Venta del producto":
                    wnwPreciosProducto ventanaPrecios = new wnwPreciosProducto();
                    ventanaPrecios.Show();
                    break;

                case "Agregar insumo":
                    wnwRegistrarInsumo venAgregarInsumo = new wnwRegistrarInsumo(ptipo:"Registrar", ppkInsumo:0);
                    venAgregarInsumo.Show();
                    break;

                case "Editar insumo":
                    wnwBuscadorInsumo editarInsumo = new wnwBuscadorInsumo("Editar");
                    editarInsumo.ShowDialog();
                    break;

                case "Compra de insumo":
                    wnwBuscadorInsumo compraInsumo = new wnwBuscadorInsumo("Compra");
                    compraInsumo.ShowDialog();
                    break;

                case "Pedir insumo":
                    wnwBuscadorInsumo pedirInsumo = new wnwBuscadorInsumo("Pedido");
                    pedirInsumo.ShowDialog();
                    break;

                default:
                    break;
            }
            cmb.SelectedIndex = 0;

        }