/// <summary> /// 判断是否存在 /// </summary> /// <param name="strSql"></param> /// <returns></returns> public static bool Exists(string strSql) { DataTable dt = OracleDBHelper.ExecuteDataTable(strSql, null, DataBaseType.DefaultDB); int cmdresult = 0; if ((Object.Equals(dt, null)) || (Object.Equals(dt, System.DBNull.Value))) { cmdresult = 0; } else { cmdresult = dt.Rows.Count; } if (cmdresult == 0) { return(false); } else { return(true); } }
/// <summary> /// 功能:对传入的SQL执行查询操作,返回DataTable /// 日期:2013-05-15 /// </summary> /// <param name="sql">执行的SQL</param> /// <returns></returns> public static DataTable ExecuteDataTable(string sql) { return(OracleDBHelper.ExecuteDataTable(sql, null, DataBaseType.DefaultDB)); }
/// <summary> /// 功能:对传入的SQL执行查询操作,返回DataTable /// 日期:2013-05-15 /// </summary> /// <param name="sql">执行的SQL</param> /// <param name="parList">参数列表</param> /// <returns></returns> public static DataTable ExecuteDataTable(string sql, List <ParameterEntity> parList) { return(OracleDBHelper.ExecuteDataTable(sql, parList, DataBaseType.DefaultDB)); }