/// <summary> /// 收费项目查询(按拼音码) /// </summary> /// <param name="pydm">拼音代码</param> /// <param name="values">收费信息</param> /// <param name="msg">出错信息</param> /// <returns>0:成功 大于0:出错 小于0:异常</returns> public int DB_QueryCharge(string pydm, out ArrayList values, out string msg) { msg = ""; OracleConnection connection = new OracleConnection(WebConfigParameter.ConnectionHisString); OracleDataReader dr = null; values = new ArrayList(); try { int ret = -1; bool _flag = false; string findId1 = _builder.GetChargeByPy(pydm, out _flag, out msg); if (!_flag) { return(10); } dr = DbHelperOra.ExecuteReader(findId1, connection); if (dr.HasRows) { while (dr.Read()) { ChargeDetail pd = new ChargeDetail(); pd.lx = !dr.IsDBNull(0) ? dr.GetString(0) : ""; pd.mc = !dr.IsDBNull(1) ? dr.GetString(1) : ""; pd.dw = !dr.IsDBNull(2) ? dr.GetString(2) : ""; pd.jg = !dr.IsDBNull(3) ? dr.GetDouble(3) : 0; values.Add(pd); } ret = 0; } else { msg = "亲,没有记录"; values = null; ret = 2; } dr.Close(); return(ret); } catch (Exception ex) { UtilLog.GetInstance().WriteProgramLog(System.Reflection.MethodBase.GetCurrentMethod().Name, ex); msg = GetExceptionInfo(ex); values = null; return(-99); } finally { if (null != dr) { dr.Close(); } connection.Close(); } }