public int AdicionarGeneral(beGerente obeGerente) { int idGerente = -1; using (SqlConnection con = new SqlConnection(CadenaConexion)) { try { con.Open(); daGerente odaGerente = new daGerente(); idGerente = odaGerente.AdicionarGerente(con, obeGerente); } catch (Exception ex) { //GrabarLog(ex.Message, ex.StackTrace); } } return(idGerente); }
public bool ActualizarGerente(beGerente obeGerente) { bool exito = false; using (SqlConnection con = new SqlConnection(CadenaConexion)) { try { con.Open(); daGerente odaGerente = new daGerente(); exito = odaGerente.ActualizarGerente(con, obeGerente); } catch (Exception ex) { //GrabarLog(ex.Message, ex.StackTrace); } return(exito); } }
public beDatosGerente ListarGerente() { beDatosGerente obeDatosGerente = new beDatosGerente(); using (SqlConnection con = new SqlConnection(CadenaConexion)) { try { con.Open(); daGerente odaGerente = new daGerente(); obeDatosGerente = odaGerente.ListaGerente(con); } catch (Exception ex) { //GrabarLog(ex.Message, ex.StackTrace); } } return(obeDatosGerente); }