/// <summary> /// 得到第一行第一列的值 /// </summary> /// <param name="statistic">要返回的字段(如:count(*) 或者 UserName)</param> /// <param name="strWhere">参数化查询条件(例如: and Name = @Name )</param> /// <param name="dict">参数的名/值集合</param> /// <returns></returns> public virtual string GetScalar(string statistic, string strWhere = "", Dictionary <string, object> dict = null) { string strSQL = "select " + statistic + " from ProductPrice where 1=1 "; if (!string.IsNullOrEmpty(strWhere)) { strSQL += strWhere; } return(_DB.ExeSQLScalar(strSQL, dict)); }
/// <summary> /// 得到第一行第一列的值 /// </summary> /// <param name="statistic">要返回的字段(如:count(*) 或者 UserName)</param> /// <param name="strWhere">参数化查询条件(例如: and Name = @Name )</param> /// <param name="dict">参数的名/值集合</param> /// <returns></returns> public virtual string GetScalar(string statistic, string strWhere = "", Dictionary <string, object> dict = null) { string strSQL = "select " + statistic + " from GroupSpecialCategoryPermissions where 1=1 "; if (!string.IsNullOrEmpty(strWhere)) { strSQL += strWhere; } return(_DB.ExeSQLScalar(strSQL, dict)); }