private void GuardarbuttonP_Click(object sender, EventArgs e) { if (BecasBLL.Guardar(LlenaClase())) { MessageBox.Show("Guardado Correctamente", "Correcto", MessageBoxButtons.OK, MessageBoxIcon.Information); } else { MessageBox.Show("Error al Guardar", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); } }
private void EliminarbuttonP_Click(object sender, EventArgs e) { if (BecasBLL.eliminar(int.Parse(NotaIdUpDownP.Value.ToString()))) { MessageBox.Show(" fue eliminado"); } else { MessageBox.Show(" no se pudo eliminar"); } }
private Becas LlenarCampos() { int NotaId = 0; NotaId = Decimal.ToInt32(NotaIdUpDownP.Value); Becas becas = BecasBLL.Buscar(NotaId); if (becas == null) { MessageBox.Show("No se encontro el pago"); } else { } return(becas); }
private void BuscarbuttonP_Click(object sender, EventArgs e) { Becas becas = BecasBLL.Buscar(int.Parse(NotaIdUpDownP.Value.ToString())); if (becas != null) { FechaTimePickerP.Text = becas.Fecha; MontotextBox.Text = becas.Monto.ToString(); porcientotextBox.Text = becas.PctBeca.ToString(); ObservacionestextBoxP.Text = becas.Observaciones.ToString(); Estudiantes estudiantes = EstudianteBLL.Buscar(becas.EstudianteId); if (estudiantes != null) { Nombrelabel.Text = estudiantes.Nombres; } } else { MessageBox.Show(" rebisese tome fosfobe 12"); } }