private void btnRegistrar_Click(object sender, RoutedEventArgs e)
 {
     if (solicitud == "EditarAsociado")
     {
         AsociadoMantenimiento Asociado = new AsociadoMantenimiento();
         if (Asociado.AutenticaAsociado(txbInformacion.Text) != null)
         {
             wnwRegistrarPersona ventana = new wnwRegistrarPersona(pTipoPersona: "Asociado", pAsociado: Asociado.AutenticaAsociado(txbInformacion.Text), pEmpleado: null, pCliente: null);
             ventana.ShowDialog();
             this.Close();
         }
         else
         {
             MessageBox.Show("Los datos ingresados no coinciden con ningún registro.", "SIGEEA", MessageBoxButton.OK);
         }
     }
     else if(solicitud == "Direccion")
     {
         AsociadoMantenimiento Asociado = new AsociadoMantenimiento();
         if (Asociado.AutenticaAsociado(txbInformacion.Text) != null)
         {
             wnwDirecciones ventana = new wnwDirecciones(txbInformacion.Text, "Asociado", pkFinca: 0);
             ventana.ShowDialog();
             this.Close();
         }
         else
         {
             MessageBox.Show("Los datos ingresados no coinciden con ningún registro.", "SIGEEA", MessageBoxButton.OK);
         }
     }
     else if (solicitud == "Entrega")
     {
         AsociadoMantenimiento Asociado = new AsociadoMantenimiento();
         Asociado = new AsociadoMantenimiento();
         DataClasses1DataContext dc = new DataClasses1DataContext();
         if (Asociado.AutenticaAsociado(txbInformacion.Text) != null)
         {
             wnwEntregaProducto ventana = new wnwEntregaProducto(dc.SIGEEA_spObtenerAsociado(txbInformacion.Text).First());
             ventana.ShowDialog();
             this.Close();
         }
     }
 }
        private void btnRegistrar_Click(object sender, RoutedEventArgs e)
        {
            EmpleadoMantenimiento empleado = new EmpleadoMantenimiento();
            if (empleado.AutenticaEmpleado(txbCedula.Text) != null)
            {
                if (solicitud == "Editar")
                {

                    wnwRegistrarPersona ventana = new wnwRegistrarPersona("Empleado", pAsociado: null, pEmpleado: empleado.AutenticaEmpleado(txbCedula.Text), pCliente: null);
                    ventana.ShowDialog();
                    this.Close();
                }
                else if (solicitud == "Direccion")
                {
                    wnwDirecciones ventana = new wnwDirecciones(txbCedula.Text, "Empleado", pkFinca: 0);
                    ventana.ShowDialog();
                    this.Close();
                }
                else if (solicitud == "Pagos")
                {
                    if (empleado.ListarPagosEmpleados(txbCedula.Text).Count != 0)
                    {
                        wnwPagoEmpleados ventana = new wnwPagoEmpleados(txbCedula.Text);
                        ventana.ShowDialog();
                        this.Close();
                    }
                    else
                    {
                        MessageBox.Show("Este empleado no posee ningún registro pendiente de pago.", "SIGEEA", MessageBoxButton.OK, MessageBoxImage.Error);
                    }
                }
            }

            else
            {
                MessageBox.Show("Los datos ingresados no coinciden con los registros", "SIGEEA", MessageBoxButton.OK);
            }
        }
Пример #3
0
 private void btnRegistrar_Click(object sender, RoutedEventArgs e)
 {
     wnwRegistrarPersona ventanaRegistro = new wnwRegistrarPersona("Asociado");
     ventanaRegistro.Show();
 }
 private void btnRegistrar_Click(object sender, RoutedEventArgs e)
 {
     wnwRegistrarPersona ventana = new wnwRegistrarPersona(pTipoPersona: "Cliente", pAsociado: null, pEmpleado: null, pCliente: null);
     ventana.Show();
 }
Пример #5
0
 private void btnRegistrar_Click(object sender, RoutedEventArgs e)
 {
     AsociadoMantenimiento Asociado = new AsociadoMantenimiento();
     wnwRegistrarPersona ventana = new wnwRegistrarPersona(pTipoPersona: "Asociado", pAsociado: Asociado.AutenticaAsociado(txbInformacion.Text),pEmpleado:null);
     ventana.ShowDialog();
 }
Пример #6
0
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this.wnwRegistro = ((SIGEEA_App.Ventanas_Modales.Personas.wnwRegistrarPersona)(target));
                return;

            case 2:
                this.grdPersona = ((System.Windows.Controls.Grid)(target));
                return;

            case 3:
                this.grdValidar = ((System.Windows.Controls.Grid)(target));
                return;

            case 4:
                this.txbCedula = ((System.Windows.Controls.TextBox)(target));
                return;

            case 5:
                this.txbPriNombre = ((System.Windows.Controls.TextBox)(target));
                return;

            case 6:
                this.txbSegNombre = ((System.Windows.Controls.TextBox)(target));
                return;

            case 7:
                this.txbPriApellido = ((System.Windows.Controls.TextBox)(target));
                return;

            case 8:
                this.txbSegApellido = ((System.Windows.Controls.TextBox)(target));
                return;

            case 9:
                this.lblCedula = ((System.Windows.Controls.Label)(target));
                return;

            case 10:
                this.lblPriNombre = ((System.Windows.Controls.Label)(target));
                return;

            case 11:
                this.lblSegNombre = ((System.Windows.Controls.Label)(target));
                return;

            case 12:
                this.lblPriApellido = ((System.Windows.Controls.Label)(target));
                return;

            case 13:
                this.lblSegApellido = ((System.Windows.Controls.Label)(target));
                return;

            case 14:
                this.lblGenero = ((System.Windows.Controls.Label)(target));
                return;

            case 15:
                this.cbxGenero = ((System.Windows.Controls.ComboBox)(target));
                return;

            case 16:
                this.cbiMasculino = ((System.Windows.Controls.ComboBoxItem)(target));
                return;

            case 17:
                this.cbiFemenino = ((System.Windows.Controls.ComboBoxItem)(target));
                return;

            case 18:
                this.lblGenero_Copy = ((System.Windows.Controls.Label)(target));
                return;

            case 19:
                this.lblGenero_Copy1 = ((System.Windows.Controls.Label)(target));
                return;

            case 20:
                this.dtpFecNacimiento = ((System.Windows.Controls.DatePicker)(target));
                return;

            case 21:
                this.btnSiguiente = ((System.Windows.Controls.Button)(target));
                return;

            case 22:
                this.textBlock = ((System.Windows.Controls.TextBlock)(target));
                return;

            case 23:
                this.ucNacionalidad = ((SIGEEA_App.User_Controls.uc_Nacionalidades)(target));
                return;

            case 24:
                this.ucEstrellas = ((SIGEEA_App.User_Controls.uc_ratingstar)(target));
                return;

            case 25:
                this.grdEmpleado = ((System.Windows.Controls.Grid)(target));
                return;

            case 26:
                this.textBlock1 = ((System.Windows.Controls.TextBlock)(target));
                return;

            case 27:
                this.cmbGradoAcad = ((System.Windows.Controls.ComboBox)(target));
                return;

            case 28:
                this.label = ((System.Windows.Controls.Label)(target));
                return;

            case 29:
                this.txbAdicional = ((System.Windows.Controls.TextBox)(target));
                return;

            case 30:
                this.btnRegistrar = ((System.Windows.Controls.Button)(target));
                return;

            case 31:
                this.chkLeer = ((System.Windows.Controls.CheckBox)(target));
                return;

            case 32:
                this.chkEscribir = ((System.Windows.Controls.CheckBox)(target));
                return;

            case 33:
                this.grdCliente = ((System.Windows.Controls.Grid)(target));
                return;

            case 34:
                this.textBlock2 = ((System.Windows.Controls.TextBlock)(target));
                return;

            case 35:
                this.label1 = ((System.Windows.Controls.Label)(target));
                return;

            case 36:
                this.cmbTipCliente = ((System.Windows.Controls.ComboBox)(target));

            #line 73 "..\..\..\..\Ventanas_Modales\Personas\wnwRegistrarPersona.xaml"
                this.cmbTipCliente.SelectionChanged += new System.Windows.Controls.SelectionChangedEventHandler(this.cmbTipCliente_SelectionChanged);

            #line default
            #line hidden
                return;

            case 37:
                this.label2 = ((System.Windows.Controls.Label)(target));
                return;

            case 38:
                this.txbCreMaximo = ((System.Windows.Controls.TextBox)(target));
                return;

            case 39:
                this.label3 = ((System.Windows.Controls.Label)(target));
                return;

            case 40:
                this.label3_Copy = ((System.Windows.Controls.Label)(target));
                return;

            case 41:
                this.btnRegistrarCliente = ((System.Windows.Controls.Button)(target));

            #line 81 "..\..\..\..\Ventanas_Modales\Personas\wnwRegistrarPersona.xaml"
                this.btnRegistrarCliente.Click += new System.Windows.RoutedEventHandler(this.btnRegistrarCliente_Click);

            #line default
            #line hidden
                return;

            case 42:
                this.lbPkCatCliente = ((System.Windows.Controls.Label)(target));
                return;

            case 43:
                this.txbRango = ((System.Windows.Controls.TextBox)(target));
                return;

            case 44:
                this.txbTiempoMaximo = ((System.Windows.Controls.TextBox)(target));
                return;

            case 45:
                this.cbxEmpresa = ((System.Windows.Controls.CheckBox)(target));

            #line 93 "..\..\..\..\Ventanas_Modales\Personas\wnwRegistrarPersona.xaml"
                this.cbxEmpresa.Click += new System.Windows.RoutedEventHandler(this.cbxEmpresa_Click);

            #line default
            #line hidden
                return;
            }
            this._contentLoaded = true;
        }
 private void btnEditar_Click(object sender, RoutedEventArgs e)
 {
     AsociadoMantenimiento asociado = new AsociadoMantenimiento();
     wnwRegistrarPersona ventana = new wnwRegistrarPersona("Asociado", asociado.AutenticaAsociado(CedulaAsociado), null, null);
     ventana.ShowDialog();
 }
        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;

        }
        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();
            }

        }
Пример #10
0
 void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) {
     switch (connectionId)
     {
     case 1:
     this.wnwRegistro = ((SIGEEA_App.Ventanas_Modales.Personas.wnwRegistrarPersona)(target));
     return;
     case 2:
     this.grdPersona = ((System.Windows.Controls.Grid)(target));
     return;
     case 3:
     this.txbCedula = ((System.Windows.Controls.TextBox)(target));
     return;
     case 4:
     this.txbPriNombre = ((System.Windows.Controls.TextBox)(target));
     return;
     case 5:
     this.txbSegNombre = ((System.Windows.Controls.TextBox)(target));
     return;
     case 6:
     this.txbPriApellido = ((System.Windows.Controls.TextBox)(target));
     return;
     case 7:
     this.txbSegApellido = ((System.Windows.Controls.TextBox)(target));
     return;
     case 8:
     this.lblCedula = ((System.Windows.Controls.Label)(target));
     return;
     case 9:
     this.lblPriNombre = ((System.Windows.Controls.Label)(target));
     return;
     case 10:
     this.lblSegNombre = ((System.Windows.Controls.Label)(target));
     return;
     case 11:
     this.lblPriApellido = ((System.Windows.Controls.Label)(target));
     return;
     case 12:
     this.lblSegApellido = ((System.Windows.Controls.Label)(target));
     return;
     case 13:
     this.lblGenero = ((System.Windows.Controls.Label)(target));
     return;
     case 14:
     this.cbxGenero = ((System.Windows.Controls.ComboBox)(target));
     return;
     case 15:
     this.cbiMasculino = ((System.Windows.Controls.ComboBoxItem)(target));
     return;
     case 16:
     this.cbiFemenino = ((System.Windows.Controls.ComboBoxItem)(target));
     return;
     case 17:
     this.cbxNacionalidad = ((System.Windows.Controls.ComboBox)(target));
     return;
     case 18:
     this.lblGenero_Copy = ((System.Windows.Controls.Label)(target));
     return;
     case 19:
     this.lblGenero_Copy1 = ((System.Windows.Controls.Label)(target));
     return;
     case 20:
     this.dtpFecNacimiento = ((System.Windows.Controls.DatePicker)(target));
     return;
     case 21:
     this.btnSiguiente = ((System.Windows.Controls.Button)(target));
     return;
     case 22:
     this.textBlock = ((System.Windows.Controls.TextBlock)(target));
     return;
     case 23:
     this.grdEmpleado = ((System.Windows.Controls.Grid)(target));
     return;
     case 24:
     this.textBlock1 = ((System.Windows.Controls.TextBlock)(target));
     return;
     case 25:
     this.cmbGradoAcad = ((System.Windows.Controls.ComboBox)(target));
     return;
     case 26:
     this.label = ((System.Windows.Controls.Label)(target));
     return;
     case 27:
     this.txbAdicional = ((System.Windows.Controls.TextBox)(target));
     return;
     case 28:
     this.btnRegistrar = ((System.Windows.Controls.Button)(target));
     return;
     case 29:
     this.chkLeer = ((System.Windows.Controls.CheckBox)(target));
     return;
     case 30:
     this.chkEscribir = ((System.Windows.Controls.CheckBox)(target));
     return;
     }
     this._contentLoaded = true;
 }
 private void btnRegistrar_Click(object sender, RoutedEventArgs e)
 {
     EmpleadoMantenimiento empleado = new EmpleadoMantenimiento();
     wnwRegistrarPersona ventana = new wnwRegistrarPersona("Empleado", pAsociado: null, pEmpleado: empleado.AutenticaEmpleado(txbCedula.Text));
     ventana.ShowDialog();
 }