public static int Count(string tbname, string where, List <SqlParameter> sp, params Sql_Where[] whereList) { SqlModel model = new SqlModel(); model.fields = "Count(*)"; model.tbName = tbname; model.where = where; if (whereList != null) { model.whereList.AddRange(whereList); } model.spList = sp; return(DataConvert.CLng(DB.ExecuteScala(model))); }