写进word的版本。
This commit is contained in:
@@ -24,7 +24,7 @@ const std::string ListDisplay::searchForRecordTypeToString() const {
|
|||||||
ListDisplay::ListDisplay(const List<BaseRecord *> &_allRecordsPtrList)
|
ListDisplay::ListDisplay(const List<BaseRecord *> &_allRecordsPtrList)
|
||||||
: allRecordsPtrList(_allRecordsPtrList), fromDate(), toDate(),
|
: allRecordsPtrList(_allRecordsPtrList), fromDate(), toDate(),
|
||||||
searchForStu(), searchForCourseName(""),
|
searchForStu(), searchForCourseName(""),
|
||||||
searchForRecordType(StuRecord::Any), recordNumPerPage(20),
|
searchForRecordType(StuRecord::Any), recordNumPerPage(10),
|
||||||
currentPageIndex(0),
|
currentPageIndex(0),
|
||||||
maxPageIndex((allRecordsPtrList.length() - 1) / recordNumPerPage),
|
maxPageIndex((allRecordsPtrList.length() - 1) / recordNumPerPage),
|
||||||
sortOrder(ASCENT), sortByProp(RecordID) {
|
sortOrder(ASCENT), sortByProp(RecordID) {
|
||||||
@@ -420,8 +420,9 @@ void ListDisplay::promptForSearchStuID() {
|
|||||||
// std::cin.ignore();
|
// std::cin.ignore();
|
||||||
tempStuID = safeInputNum<int>("Please input a positive integer.\n",
|
tempStuID = safeInputNum<int>("Please input a positive integer.\n",
|
||||||
[](const int &num) { return num >= 0; });
|
[](const int &num) { return num >= 0; });
|
||||||
this->searchForStu.setNumber(tempStuID == 0 ? this->searchForStu.getNumber()
|
if (tempStuID != 0) {
|
||||||
: tempStuID);
|
this->searchForStu.setNumber(tempStuID);
|
||||||
|
}
|
||||||
this->reapplyFilter();
|
this->reapplyFilter();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -442,8 +443,9 @@ void ListDisplay::promptForSearchStuName() {
|
|||||||
// std::cin >> tempStuName;
|
// std::cin >> tempStuName;
|
||||||
// std::cin.ignore();
|
// std::cin.ignore();
|
||||||
std::getline(std::cin, tempStuName);
|
std::getline(std::cin, tempStuName);
|
||||||
this->searchForStu.setName(tempStuName == "0" ? this->searchForStu.getName()
|
if (tempStuName != "0") {
|
||||||
: tempStuName);
|
this->searchForStu.setName(tempStuName);
|
||||||
|
}
|
||||||
this->reapplyFilter();
|
this->reapplyFilter();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -934,8 +934,9 @@ void StudentInfoManager::mainloop() {
|
|||||||
}
|
}
|
||||||
else if (cmd == infoManagerCommand::home::closeFile) {
|
else if (cmd == infoManagerCommand::home::closeFile) {
|
||||||
this->closeFile();
|
this->closeFile();
|
||||||
this->promptForFileName();
|
if (this->promptForFileName()) {
|
||||||
this->readFile();
|
this->readFile();
|
||||||
|
}
|
||||||
this->displayer.reapplyFilter();
|
this->displayer.reapplyFilter();
|
||||||
}
|
}
|
||||||
else if (cmd == infoManagerCommand::home::quit) {
|
else if (cmd == infoManagerCommand::home::quit) {
|
||||||
|
|||||||
Reference in New Issue
Block a user