예제 #1
0
        private void Guardarbutton_Click(object sender, EventArgs e)
        {
            Retenciones rete = new Retenciones();

            if (!Validar())
            {
                MessageBox.Show("Campos vacios");
            }
            else
            {
                Llenar(rete);
                if (rete != null)
                {
                    if (RetencionesBll.Guardar(rete))
                    {
                        MessageBox.Show("Guardado con exito!!!");
                    }
                    else
                    {
                        MessageBox.Show("No guardado!!!");
                    }
                }
                Limpiar();
            }
        }
예제 #2
0
 private void Eliminarbutton_Click(object sender, EventArgs e)
 {
     if (string.IsNullOrEmpty(IdtextBox.Text))
     {
         MessageBox.Show("No Eliminado Faltan Campos");
     }
     else
     {
         int id = u.String(IdtextBox.Text);
         if (RetencionesBll.Eliminar(RetencionesBll.Buscar(p => p.RetencionId == id)))
         {
             Limpiar();
             MessageBox.Show("Eliminado con exito!!!");
         }
         else
         {
             MessageBox.Show("No eliminado!!!");
         }
     }
 }
예제 #3
0
        private void Idbutton_Click(object sender, EventArgs e)
        {
            if (string.IsNullOrEmpty(IdtextBox.Text))
            {
                MessageBox.Show("No Encontrado Faltan Campos");
            }
            else
            {
                int         id   = u.String(IdtextBox.Text);
                Retenciones rete = new Retenciones();

                rete = RetencionesBll.Buscar(p => p.RetencionId == id);
                if (rete != null)
                {
                    pasar(rete);
                }
                else
                {
                    MessageBox.Show("No exite!!!");
                }
            }
        }