Esempio n. 1
0
        public static double getCurrencyRate(int tnCurrency_id, string tsMonth)
        {
            object loCurrencyRate = DBA.ExecuteScalar("select f_HO_getCurrencyRate(" + tnCurrency_id + ",'" + tsMonth.Trim() + "') from t_SD_Currency_Rate ");

            if (loCurrencyRate == null || loCurrencyRate == DBNull.Value)
            {
                return(1.0);
            }
            else
            {
                return(DouUtil.SafeCDou(loCurrencyRate));
            }
        }
Esempio n. 2
0
 /// <summary>
 /// 执行查询,并返回查询所返回的结果集中第一行的第一列。所有其他的列和行将被忽略。
 /// </summary>
 /// <param name="Command">CommandBuilder对象。</param>
 /// <returns></returns>
 public object ExecuteScalar(CommandBuilder Command)
 {
     return(DBA.ExecuteScalar(Command));
 }
Esempio n. 3
0
        /// <summary>
        /// 根据货币Id查询汇率
        /// </summary>
        /// <param name="tscurrency_id"></param>
        /// <returns></returns>
        public static String getCurrencyRate(String tsCurrency_id)
        {
            String lsSQL = "select currency_rate from t_sd_currency where currency_id =" + tsCurrency_id;

            return(DBA.ExecuteScalar(lsSQL).ToString());
        }