private void Eliminarbutton_Click(object sender, EventArgs e)
        {
            if (IdtextBox.Text.Trim() == "")
            {
                TipoIngresoerrorProvider.SetError(IdtextBox, "Debe especificar el ID ");
                IdtextBox.Focus();
            }
            else
            {
                TipoIngresoerrorProvider.Clear();
                if (IdtextBox.Text.Length > 0)
                {
                    tipoingreso.TipoIngresoId = int.Parse(IdtextBox.Text);

                    if (tipoingreso.Eliminar())
                    {
                        MessageBox.Show("El tipo de Ingreso se elimino Correctamente");
                    }
                    else
                    {
                        MessageBox.Show("El tipo de Ingreso no ha sido eliminada Correctamente");
                    }
                }
            }
        }
 private void Buscarbutton_Click(object sender, EventArgs e)
 {
     if (IdtextBox.Text.Trim() == "")
     {
         TipoIngresoerrorProvider.SetError(IdtextBox, "Debe especificar el ID ");
         IdtextBox.Focus();
     }
     else
     {
         TipoIngresoerrorProvider.Clear();
     }
     if (IdtextBox.TextLength > 0)
     {
         int id;
         int.TryParse(IdtextBox.Text, out id);
         tipoingreso.Buscar(id);
         DescripciontextBox.Text = tipoingreso.Descripcion;
         if (tipoingreso.EsActivo == true)
         {
             SiradioButton.Checked = true;
         }
         if (tipoingreso.EsActivo == false)
         {
             NoradioButton.Checked = true;
         }
     }
 }
Example #3
0
 private void CleanCampos()
 {
     IdtextBox.Clear();
     NombrestextBox.Clear();
     IdtextBox.Text = (BLL.EstudiantesBLL.UltimoId() + 1).ToString();
     IdtextBox.Focus();
 }
Example #4
0
        private void Buscarbutton_Click(object sender, EventArgs e)
        {
            Equipos eq    = new Equipos();
            bool    exito = false;
            int     Id    = 0;

            try
            {
                if (String.IsNullOrWhiteSpace(IdtextBox.Text).Equals(false))
                {
                    Id    = Utility.ConvierteEntero(IdtextBox.Text);
                    exito = eq.Buscar(Id);
                }

                if (exito)
                {
                    LlenarCampos(eq);
                    DespuesConsultaBotones(true);
                    ActivarBotones(false);
                    Utility.ActivarTbx(this, false);
                }
                else
                {
                    Utility.Mensajes(this, 1, "No existe!");
                    IdtextBox.Focus();
                }
            }
            catch (Exception ex)
            {
                Utility.Mensajes(this, 3, ex.Message);
            }
        }
Example #5
0
 private void ErProvider()
 {
     if (IdtextBox.Text.Trim() == "")
     {
         UsuarioerrorProvider.SetError(IdtextBox, "Debe especificar el ID ");
         IdtextBox.Focus();
     }
     else
     {
         UsuarioerrorProvider.Clear();
     }
 }
Example #6
0
 private void Imprimir_Click(object sender, EventArgs e)
 {
     if (IdtextBox.Text == "")
     {
         MyErrorProvider.SetError(IdtextBox, "Campo Id Vacio!!!");
         IdtextBox.Focus();
     }
     else
     {
         CargarReporte();
     }
 }
Example #7
0
 private void Buscarbutton_Click(object sender, EventArgs e)
 {
     if (IdtextBox.Text == "")
     {
         UsuarioerrorProvider.SetError(IdtextBox, "Debe especificar el ID ");
         IdtextBox.Focus();
     }
     else
     {
         UsuarioerrorProvider.Clear();
     }
     if (IdtextBox.Text.Length > 0)
     {
         if (usuario.Buscar(int.Parse(IdtextBox.Text)))
         {
             LlenarCampos();
         }
     }
 }
 private void Buscarbutton_Click(object sender, EventArgs e)
 {
     if (IdtextBox.Text.Trim() == "")
     {
         EntradaerrorProvider.SetError(IdtextBox, "Debe especificar el ID ");
         IdtextBox.Focus();
     }
     else
     {
         EntradaerrorProvider.Clear();
     }
     if (IdtextBox.TextLength > 0)
     {
         TryParse();
         CuentaIdcomboBox.Text    = Convert.ToString(entrada.CuentaId);
         CategoriaIdcomboBox.Text = Convert.ToString(entrada.CategoriaId);
         MontomaskedTextBox.Text  = Convert.ToString(entrada.Monto);
         FechadateTimePicker.Text = entrada.Fecha;
     }
 }
Example #9
0
 private void Buscarbutton_Click(object sender, EventArgs e)
 {
     if (IdtextBox.Text == "")
     {
         PacienteerrorProvider.SetError(IdtextBox, "Debe especificar el ID ");
         IdtextBox.Focus();
     }
     else
     {
         PacienteerrorProvider.Clear();
     }
     if (IdtextBox.Text.Length > 0)
     {
         if (paciente.Buscar(int.Parse(IdtextBox.Text)))
         {
             LlenarCampos();
         }
     }
     Eliminarbutton.Enabled = true;
 }
 private void Buscarbutton_Click(object sender, EventArgs e)
 {
     if (IdtextBox.Text == "")
     {
         CiudaderrorProvider.SetError(IdtextBox, "Debe especificar el ID ");
         IdtextBox.Focus();
     }
     else
     {
         CiudaderrorProvider.Clear();
     }
     if (IdtextBox.Text.Length > 0)
     {
         if (ciudad.Buscar(int.Parse(IdtextBox.Text)))
         {
             LlenarCampos();
         }
         Buscarbutton.Enabled   = false;
         Guardarbutton.Text     = "Modicar";
         Eliminarbutton.Enabled = true;
     }
 }
Example #11
0
 private void Guardarbutton_Click(object sender, EventArgs e)
 {
     if ((!string.IsNullOrEmpty(IdtextBox.Text) && !string.IsNullOrEmpty(NombrestextBox.Text)))
     {
         int id;
         int.TryParse(IdtextBox.Text, out id);
         var lista = BLL.EstudiantesBLL.GetList();
         if (BLL.EstudiantesBLL.Buscar(id) == null || lista.Count == 0)
         {
             BLL.EstudiantesBLL.Insertar(new Entidades.Estudiantes()
             {
                 EstudianteId = id, Nombres = NombrestextBox.Text
             });
         }
         else
         {
             BLL.EstudiantesBLL.Modificar(new Entidades.Estudiantes()
             {
                 EstudianteId = id, Nombres = NombrestextBox.Text
             });
         }
         CleanCampos();
     }
     else
     {
         MessageBox.Show("No puedes dejar campos vacĂ­os", "-- AVISO --", MessageBoxButtons.OK, MessageBoxIcon.Warning);
         if (string.IsNullOrEmpty(IdtextBox.Text))
         {
             IdtextBox.Text = (BLL.EstudiantesBLL.UltimoId() + 1).ToString();
             IdtextBox.Focus();
         }
         else
         {
             NombrestextBox.Focus();
         }
     }
 }
 private void Eliminarbutton_Click(object sender, EventArgs e)
 {
     if (IdtextBox.Text.Trim() == "")
     {
         EntradaerrorProvider.SetError(IdtextBox, "Debe especificar el ID ");
         IdtextBox.Focus();
     }
     else
     {
         EntradaerrorProvider.Clear();
     }
     if (IdtextBox.Text.Length > 0)
     {
         entrada.EntradaId = int.Parse(IdtextBox.Text);
         if (entrada.Eliminar())
         {
             MessageBox.Show("La entrada se elimino Correctamente");
         }
         else
         {
             MessageBox.Show("La entrada no ha sido eliminada Correctamente");
         }
     }
 }
Example #13
0
        private void Reportebutton_Click_1(object sender, EventArgs e)
        {
            Conexion c = new Conexion();

            if (IdtextBox.Text == "")
            {
                MyErrorProvider.SetError(IdtextBox, "Campo Id Vacio!!!");
                IdtextBox.Focus();
            }
            else
            {
                if (!c.Existe(Convert.ToInt32(IdtextBox.Text)))
                {
                    MyErrorProvider.SetError(IdtextBox, "Id no Existe!!!");
                    IdtextBox.Focus();
                    // MessageBox.Show("Id no existe!!!", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                }
                else
                {
                    reporte(ReportedataGridView);
                    MyErrorProvider.Clear();
                }
            }
        }