public bool Consultar(int nit) { try { ClsConexion objConex = new ClsConexion(); String Setencia = "USP_Consultars'" + nit + "'"; if (objConex.Consultar(Setencia, false)) { objLeer = objConex.Reader; objConex = null; return(true); } else { error = objConex.Error; objConex = null; return(false); } } catch (Exception X) { error = X.Message; return(false); } #endregion #region metodos privados #endregion }
public bool Consultar(int nit) { try { ClsConexion objConex = new ClsConexion(); String Setencia = "SP_CONSULTAR'" + nit + "'"; if (objConex.Consultar(Setencia, false)) { objLeer = objConex.Reader; objConex = null; return(true); } else { error = objConex.Error; objConex = null; return(false); } } catch (Exception X) { error = X.Message; return(false); } }
public bool consultarProducto() { ClsConexion conexion = new ClsConexion(); string query = $"EXECUTE USP_READ_PRODUCTO '{idProducto}'"; if (!conexion.Consultar(query, false)) { error = conexion.Error; conexion = null; return(false); } objReader = conexion.Reader; conexion = null; return(true); }