public int FindCount(int productID) { string commandText = string.Format("select count(*) from ProductCirculationRecord where ProductCirculationRecord.productID = {0}", productID); int result = DbHelperAccess.executeQueryNum(commandText); return(result); }
public int FindCountByIDs(int[] ids) { if (ids == null || ids.Length == 0) { return(0); } StringBuilder sb = new StringBuilder("select count(*) from ProductSKU where "); for (int i = 0; i < ids.Length; i++) { sb.AppendFormat("ID={0} or ", ids[i]); } int num = DbHelperAccess.executeQueryNum(sb.ToString()); return(num); }