|
@@ -238,17 +238,18 @@ bool ProjectService::SelectAllByPage(QList<ProjectInfo *> *projectInfoList, int
|
|
|
projectInfo->estimateType = query.value(11).toString();
|
|
|
projectInfoList->append(projectInfo);
|
|
|
}
|
|
|
+
|
|
|
+ QString selectSqlAll = QString("SELECT * FROM t_project_info where name like %1 ").arg(name);
|
|
|
+ if (query.exec(selectSqlAll)) {
|
|
|
+ query.next();
|
|
|
+ totalPages = query.value(0).toInt();
|
|
|
+ }
|
|
|
+
|
|
|
ret = true;
|
|
|
}
|
|
|
} else {
|
|
|
qDebug() << query.lastError();
|
|
|
}
|
|
|
- QString selectSqlAll = QString("SELECT * FROM t_project_info where name like %1 ").arg(name);
|
|
|
- if (query.exec(selectSqlAll)) {
|
|
|
- query.next();
|
|
|
- int totalCount = query.value(0).toInt();
|
|
|
- totalPages = totalCount / pageSize + (totalCount % pageSize == 0 ? 0 : 1);
|
|
|
- }
|
|
|
|
|
|
return ret;
|
|
|
}
|