private void Clear() { IdnumericUpDown.Value = 0; DescripciontextBox.Clear(); SiglastextBox.Clear(); TipocomboBox.Text = string.Empty; }
private void NuevoButton_Click(object sender, EventArgs e) { IDLibronumericUpDown.Value = 0; DescripciontextBox.Clear(); SiglastextBox.Clear(); IDTiponumericUpDown.Value = 0; }
private void Nuevobutton_Click_1(object sender, EventArgs e) { TipoIDnumericUpDown.Value = 0; LibroIdnumericUpDown.Value = 0; DescripcionrichTextBox.Clear(); SiglastextBox.Clear(); }
private void Eliminarbutton_Click(object sender, EventArgs e) { if (Validar(1)) { MessageBox.Show("El TipoID esta vacio", "Llene Campo", MessageBoxButtons.OK, MessageBoxIcon.Information); return; } else { int id = Convert.ToInt32(LibroIDnumericUpDown.Value); if (BLL.LibrosBLL.Eliminar(id)) { MessageBox.Show("Eliminado", "Bien hecho", MessageBoxButtons.OK, MessageBoxIcon.Information); LibroIDnumericUpDown.Value = 0; DescripciontextBox.Clear(); FechadateTimePicker.Value = DateTime.Now; SiglastextBox.Clear(); TipotextBox.Clear(); ValidarerrorProvider.Clear(); } else { MessageBox.Show("No se puede Eliminar", "Fallo", MessageBoxButtons.OK, MessageBoxIcon.Information); } } }
private void Nuevobutton_Click(object sender, EventArgs e) { LibroIDnumericUpDown.Value = 0; FechadateTimePicker.Value = DateTime.Now; DescripciontextBox.Clear(); SiglastextBox.Clear(); MyerrorProvider.Clear(); }
private void Nuevobutton_Click(object sender, EventArgs e) { IdnumericUpDown.Value = 0; FechadateTimePicker.Value = DateTime.Now; DescripciontextBox.Clear(); SiglastextBox.Clear(); TipotextBox.Clear(); }
private void Guardarbutton_Click(object sender, EventArgs e) { LibrosBiblia Libros = LlenaClase(); bool paso = false; if (Validar(2)) { MessageBox.Show("Llenar campos", "Llene los campos", MessageBoxButtons.OK, MessageBoxIcon.Information); } else { int id = Convert.ToInt32(LibroIDnumericUpDown.Value); if (id == 0) { paso = BLL.LibrosBLL.Guardar(Libros); } else { var L = BLL.LibrosBLL.Buscar(id); if (L != null) { paso = BLL.LibrosBLL.Modificar(Libros); } } if (paso) { MessageBox.Show("Guardado!!", "Se Guardo Correctamente", MessageBoxButtons.OK, MessageBoxIcon.Information); LibroIDnumericUpDown.Value = 0; DescripciontextBox.Clear(); FechadateTimePicker.Value = DateTime.Now; SiglastextBox.Clear(); TipotextBox.Clear(); ValidarerrorProvider.Clear(); } else { MessageBox.Show("No se guardo!!", "Intente Guardar de nuevo", MessageBoxButtons.OK, MessageBoxIcon.Information); } } }
private void Eliminarbutton_Click(object sender, EventArgs e) { int id = Convert.ToInt32(LibroIdnumericUpDown.Value); if (BLL.LibrosBLL.Eliminar(id)) { MessageBox.Show("eliminado", "exitosamente", MessageBoxButtons.OK, MessageBoxIcon.Information); LibroIdnumericUpDown.Value = 0; DescripcionrichTextBox.Clear(); SiglastextBox.Clear(); TipotextBox.Clear(); } else { MessageBox.Show("no fueeliminado", "trate de nuevo", MessageBoxButtons.OK, MessageBoxIcon.Information); } }
private void Eliminarbutton_Click(object sender, EventArgs e) { int id = Convert.ToInt32(IdnumericUpDown.Value); if (BLL.BibliaBLL.Eliminar(id)) { MessageBox.Show("eliminado", "exitosamente", MessageBoxButtons.OK, MessageBoxIcon.Information); IdnumericUpDown.Value = 0; FechadateTimePicker.Value = DateTime.Now; DescripciontextBox.Clear(); SiglastextBox.Clear(); TipoIDNumericUpDown.Value = 0; } else { MessageBox.Show("no fue eliminado", "trate de nuevo", MessageBoxButtons.OK, MessageBoxIcon.Information); } errorProvider.Clear(); }