private void GuardarHotel() { try { string rpta = ""; if (this.txtNoHab.Text == string.Empty || this.txtPais.Text == string.Empty) { MensajeError("Por favor llene todos los campos con informacion valida"); errorIcono.SetError(txtNoHab, "Ingrese un nombre valido"); errorIcono.SetError(txtPais, "Ingrese un pais valido"); } else { rpta = NHoteles.Insertar(txtNoHab.Text, txtPais.Text); Close(); } if (rpta.Equals("OK")) { this.MensajeOk("Se agrego Hotel correctamente"); } else { this.MensajeError("Vuelva a intentarlo"); } } catch (Exception ex) { MessageBox.Show(ex.Message + ex.StackTrace); } }