Beispiel #1
0
        private void btnAnular_Click(object sender, RoutedEventArgs e)
        {
            if (MessageBox.Show("¿Realmente quiere cancelar la entrega?", "SIGEEA", MessageBoxButton.YesNo, MessageBoxImage.Warning) == MessageBoxResult.Yes)
            {
                AsociadoMantenimiento asoc = new AsociadoMantenimiento();

                string mensaje = asoc.AnularEntregaProducto(encabezado.First().NumFactura);
                if (mensaje.Equals("OK"))
                {
                    wnwEntregaProducto ventana = new wnwEntregaProducto(asoc.obtenerAsociadoPorID(CodigoAsociado), detalles);
                    this.Close();
                    ventana.ShowDialog();
                }
                else
                {
                    MessageBox.Show(mensaje);
                }
            }
        }
 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();
         }
     }
 }