public bool EliminarInteres(InteresEntidad mcEntidad) { cmd.Connection = cnx; cmd.CommandType = CommandType.StoredProcedure; cmd.CommandText = "SP_DesactivarInteres"; try { cmd.Parameters.Add(new SqlParameter("@idInteres", SqlDbType.Int)); cmd.Parameters["@idInteres"].Value = mcEntidad.id; cnx.Open(); //se guarda en la bitacora una conexion abierta logger.Info("Usuario administrador abrio conexion con la base de datos"); cmd.ExecuteNonQuery(); vexito = true; } catch (SqlException) { vexito = false; } finally { if (cnx.State == ConnectionState.Open) { cnx.Close(); //se guarda en la bitacora una conexion cerrada logger.Info("Usuario administrador cerro conexion con la base de datos"); } cmd.Parameters.Clear(); } return(vexito); }
private void MostrarDatos() { //try //{ if (Session["idInteres"] != null) { string cod = Session["idInteres"].ToString(); InteresEnt = InteresNeg.ConsultarInteres(cod); { txtIdInteres.Text = Session["idInteres"].ToString(); txtPorcentaje.Text = Convert.ToString(InteresEnt.porcentaje); txtTipoInteres.Text = Convert.ToString(InteresEnt.tipo); btnGrabar.Enabled = false; btnActualizar.Enabled = true; btnCancelar.Enabled = true; } } //} //catch (Exception) //{ // Response.Redirect("~/CreaInteres.aspx"); //} }
public bool EliminarInteres(InteresEntidad InteresNegocio) { return(_InteresDatos.EliminarInteres(InteresNegocio)); }
public bool ModificarInteres(InteresEntidad InteresNegocio) { return(_InteresDatos.ActualizarInteres(InteresNegocio)); }
public bool CrearInteres(InteresEntidad InteresNegocio) { return(_InteresDatos.InsertarInteres(InteresNegocio)); }