bool Insertar(InformacionCastrenseX1003BE e_InformacionCastrenseX1003) { try { InformacionCastrenseX1003DA o_InformacionCastrenseX1003 = new InformacionCastrenseX1003DA(m_BaseDatos); int resp = o_InformacionCastrenseX1003.Insertar(e_InformacionCastrenseX1003); return(resp > 0); } catch (Exception ex) { throw new Exception("Clase Business: " + Nombre_Clase + "\r\n" + "Descripción: " + ex.Message); } }
public int Anular(InformacionCastrenseX1003BE e_InformacionCastrenseX1003) { using (SqlConnection connection = Conectar(m_BaseDatos)) { try { ComandoSP("usp_InformacionCastrenseX1003Anular", connection); ParametroSP("@InformacionCastrenseId", e_InformacionCastrenseX1003.InformacionCastrenseId); ParametroSP("@UsuarioModificacionRegistro", e_InformacionCastrenseX1003.UsuarioModificacionRegistro); ParametroSP("@NroIpRegistro", e_InformacionCastrenseX1003.NroIpRegistro); return(comando.ExecuteNonQuery()); } catch (SqlException ex) { throw new Exception("Clase DataAccess " + Nombre_Clase + "\r\n" + "Descripción: " + ex.Message); } finally { connection.Dispose(); } } }