protected void Guardarbutton_OnClick(object sender, EventArgs e) { if (IdciudadTextBox.Text.Length == 0) { if (CiudadesBLL.Guardar(llenarClase())) { Response.Write("<script>alert('Guardado Correctamente');</script>"); // MessageBox.Show("Guardado Correctamente", "Correcto", MessageBoxButtons.OK, MessageBoxIcon.Information); } else { Response.Write("<script>alert('Error al Guardar');</script>"); // MessageBox.Show("Error al Guardar", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); } } else { if (CiudadesBLL.Editar(llenarClase())) { Response.Write("<script>alert('Modificado Correctamente');</script>"); // MessageBox.Show("Modificado Correctamente", "Correcto", MessageBoxButtons.OK, MessageBoxIcon.Information); } else { Response.Write("<script>alert('Error al Modificar');</script>"); // MessageBox.Show("Error al Modificar", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); } } }