protected void btn_editGuardar_Click(object sender, EventArgs e) { try { ConductorBC u = new ConductorBC() { COND_RUT = txt_editRut.Text, COND_NOMBRE = txt_editNombre.Text, COND_TELEFONO = txt_editTelefono.Text, COND_EXTRANJERO = chk_editExtranjero.Checked }; if (string.IsNullOrEmpty(hf_id.Value)) { if (u.Guardar()) { utils.ShowMessage2(this, "guardar", "success_nuevo"); utils.CerrarModal(this, "modalEdit"); } else { utils.ShowMessage2(this, "guardar", "error"); } } else { u.COND_ID = Convert.ToInt32(hf_id.Value); if (u.Guardar()) { utils.ShowMessage2(this, "guardar", "success_modificar"); utils.CerrarModal(this, "modalEdit"); } else { utils.ShowMessage2(this, "guardar", "error"); } } } catch (Exception ex) { utils.ShowMessage(this, ex.Message, "error", false); } finally { ObtenerConductores(true); } }