資源簡(jiǎn)介
C++版本的學(xué)生信息管理系統(tǒng)。一個(gè)簡(jiǎn)單教學(xué)版軟件。MVC分層實(shí)現(xiàn)。
詳細(xì)內(nèi)容請(qǐng)見博客:http://blog.csdn.net/qcyfred/article/details/53969547
我上傳的時(shí)候沒有標(biāo)記多少C幣。為什么它后來(lái)自己就有了?而且還無(wú)法刪掉?我本來(lái)只是想讓大家免費(fèi)下載。

代碼片段和文件信息
#include?“CMainView.h“
CMainView::CMainView()
{
}
CMainView::~CMainView()
{
}
/*?歡迎?*/
void?CMainView::?welcome()?{
system(“cls“);
std::cout<<“歡迎來(lái)到xxx大系統(tǒng)“< }
/*?顯示菜單?*/
void?CMainView::?showMenu()?{
std::cout<<“\n“;
std::cout<<“操作步驟“<
std::cout<<“1.?錄入“< std::cout<<“2.?修改“< std::cout<<“3.?查找“< std::cout<<“4.?刪除“< std::cout<<“5.?顯示所有“< std::cout<<“6.?保存至文件“< std::cout<<“7.?從文件導(dǎo)入“< std::cout<<“0.?退出“< std::cout<<“\n“;
std::cout<<“Author:qcy“< std::cout<<“2016/11/28“<
std::cout<<“\n“;
std::cout<<“請(qǐng)選擇操作:“;
}
/*?view?顯示所有學(xué)生?*/
void?CMainView::?showAllStuAtView(const?std::map?&?stu_m1?)
{
system(“cls“);
std::cout<<“id????|“<<“name??|“<<“age“< CStudentMg?cStuMg;
cStuMg.showAll(stu_m1);
system(“pause“);
system(“cls“);
welcome();
showMenu();
}
/*?view層?添加一個(gè)學(xué)生?*/
void??CMainView::?addStuAtView(?std::map?&?stu_m1?)
{
CStudentMg?cStuMg;
int?id;?
std::string?name;
int?age;
CStudent?cStu;
system(“cls“);
std::cout<<“錄入\n“;
std::cout<<“id:“;
std::cin>>id;
std::cout<<“name:“;
std::cin>>name;
std::cout<<“age:“;
std::cin>>age;
cStu.setId(id);
cStu.setName(name);
cStu.setAge(age);
//?保存
cStuMg.addAStu(stu_m1cStu);
system(“cls“);
welcome();
showMenu();
}
/*?view?查找一個(gè)學(xué)生?*/
void??CMainView::??findStuAtView(const?std::map?&?m1)?{
system(“cls“);
std::cout<<“請(qǐng)輸入要查找學(xué)生的id“< int?id;
std::cin>>id;
CStudentMg?cStuMg;
CStudent?cStu;
cStu?=?cStuMg.findById(m1id);
if?(cStu.getId()!=-1)
{
std::cout< }
else
{
std::cout<<“查無(wú)此人“< }
system(“pause“);
system(“cls“);
welcome();
showMenu();
}
/*?view層刪除一個(gè)學(xué)生?*/
void???CMainView::?deleteByIdAtView(std::map?&?v1)?{
system(“cls“);
std::cout<<“請(qǐng)輸入要?jiǎng)h除的學(xué)生的id“< int?id;
std::cin>>id;
CStudentMg?cStuMg;
bool?b?=?cStuMg.deleteStuById(v1id);
if?(b)
{
std::cout<<“刪除成功“< }
else?{
std::cout<<“查無(wú)此人“< }
system(“pause“);
system(“cls“);
welcome();
showMenu();
}
/*?view層?更新一個(gè)學(xué)生?*/
void???CMainView::?updateByIdAtView(std::map?&?m1)?{
system(“cls“);
std::cout<<“請(qǐng)輸入要修改的學(xué)生的id“< int?id;
std::cin>>id;
std::string?name;
std::cout<<“name:“;
std::cin>>name;
int?age;
std::cout<<“age:“;
std::cin>>age;
CStudent?cStu;
cStu.setId(id);
cStu.setName(name);
cStu.setAge(age);
CStudentMg?cStuMg;
CStudent?cStu2?=?cStuMg.updateStu(m1cStu);
if?(cStu2.getId()!=-1)
{
std::cout< std::cout<<“修改成功“< }
else
{
std::cout<<“查無(wú)此人“< }
system(“pause“);
system(“cls“);
welcome();
showMenu();
}
/*?vi
?屬性????????????大小?????日期????時(shí)間???名稱
-----------?---------??----------?-----??----
?????目錄???????????0??2017-01-14?19:05??1_stu_mg_3_map_mvc\
?????目錄???????????0??2017-01-14?16:22??1_stu_mg_3_map_mvc\1_stu_mg_3_map_mvc\
?????文件????????4362??2017-01-14?16:22??1_stu_mg_3_map_mvc\1_stu_mg_3_map_mvc\1_stu_mg_3_map_mvc.vcxproj
?????文件????????1527??2017-01-14?16:22??1_stu_mg_3_map_mvc\1_stu_mg_3_map_mvc\1_stu_mg_3_map_mvc.vcxproj.filters
?????文件?????????164??2016-12-17?20:59??1_stu_mg_3_map_mvc\1_stu_mg_3_map_mvc\1_stu_mg_3_map_mvc.vcxproj.user
?????文件????????4037??2017-01-14?16:22??1_stu_mg_3_map_mvc\1_stu_mg_3_map_mvc\CMainView.cpp
?????文件?????????987??2017-01-14?17:35??1_stu_mg_3_map_mvc\1_stu_mg_3_map_mvc\CMainView.h
?????文件?????????977??2017-01-14?17:15??1_stu_mg_3_map_mvc\1_stu_mg_3_map_mvc\CStudent.cpp
?????文件?????????546??2017-01-08?22:05??1_stu_mg_3_map_mvc\1_stu_mg_3_map_mvc\CStudent.h
?????文件????????2654??2016-11-30?22:22??1_stu_mg_3_map_mvc\1_stu_mg_3_map_mvc\CStudentMg.cpp
?????文件?????????812??2017-01-14?17:17??1_stu_mg_3_map_mvc\1_stu_mg_3_map_mvc\CStudentMg.h
?????目錄???????????0??2017-01-08?22:12??1_stu_mg_3_map_mvc\1_stu_mg_3_map_mvc\Debug\
?????文件?????????102??2016-11-30?22:29??1_stu_mg_3_map_mvc\1_stu_mg_3_map_mvc\Debug\1_stu_mg_3_map_mvc.lastbuildstate
?????文件???????12575??2016-11-30?22:29??1_stu_mg_3_map_mvc\1_stu_mg_3_map_mvc\Debug\1_stu_mg_3_map_mvc.log
?????文件???????????0??2016-11-30?22:29??1_stu_mg_3_map_mvc\1_stu_mg_3_map_mvc\Debug\1_stu_mg_3_map_mvc.unsuccessfulbuild
?????文件???????38100??2016-11-30?22:29??1_stu_mg_3_map_mvc\1_stu_mg_3_map_mvc\Debug\CL.read.1.tlog
?????文件????????3636??2016-11-30?22:29??1_stu_mg_3_map_mvc\1_stu_mg_3_map_mvc\Debug\CL.write.1.tlog
?????文件??????489343??2016-11-30?22:29??1_stu_mg_3_map_mvc\1_stu_mg_3_map_mvc\Debug\CStudent.obj
?????文件??????704915??2016-11-30?22:29??1_stu_mg_3_map_mvc\1_stu_mg_3_map_mvc\Debug\CStudentMg.obj
?????文件????????2384??2016-11-30?22:29??1_stu_mg_3_map_mvc\1_stu_mg_3_map_mvc\Debug\cl.command.1.tlog
?????文件???????????2??2016-11-30?22:29??1_stu_mg_3_map_mvc\1_stu_mg_3_map_mvc\Debug\li
?????文件???????????2??2016-11-30?22:29??1_stu_mg_3_map_mvc\1_stu_mg_3_map_mvc\Debug\li
?????文件???????????2??2016-11-30?22:29??1_stu_mg_3_map_mvc\1_stu_mg_3_map_mvc\Debug\li
?????文件???????????2??2016-11-30?22:29??1_stu_mg_3_map_mvc\1_stu_mg_3_map_mvc\Debug\li
?????文件???????????2??2016-11-30?22:29??1_stu_mg_3_map_mvc\1_stu_mg_3_map_mvc\Debug\li
?????文件???????????2??2016-11-30?22:29??1_stu_mg_3_map_mvc\1_stu_mg_3_map_mvc\Debug\li
?????文件???????????2??2016-11-30?22:29??1_stu_mg_3_map_mvc\1_stu_mg_3_map_mvc\Debug\li
?????文件???????????2??2016-11-30?22:29??1_stu_mg_3_map_mvc\1_stu_mg_3_map_mvc\Debug\li
?????文件???????????2??2016-11-30?22:29??1_stu_mg_3_map_mvc\1_stu_mg_3_map_mvc\Debug\li
?????文件???????????2??2016-11-30?22:29??1_stu_mg_3_map_mvc\1_stu_mg_3_map_mvc\Debug\li
?????文件???????????2??2016-11-30?22:29??1_stu_mg_3_map_mvc\1_stu_mg_3_map_mvc\Debug\li
............此處省略56個(gè)文件信息
- 上一篇:黃金礦工C語(yǔ)言
- 下一篇:MFC 網(wǎng)絡(luò)時(shí)鐘
評(píng)論
共有 條評(píng)論