学生成绩管理系统报告书.docx
《学生成绩管理系统报告书.docx》由会员分享,可在线阅读,更多相关《学生成绩管理系统报告书.docx(23页珍藏版)》请在冰点文库上搜索。
学生成绩管理系统报告书
Abstract:
SubjectAchievementManagementInformationSystemisveryusefulinaschool,ifthereisaSubjectAchievementManagementInformationSystemwhichhasa
lotoffunctionswillalwaysreducetheworkloadoftheteachers,becauseaschoolhasalotofstudents.Eachtime,aftertheexamination,theteachersneedtostatisticsandanalysetheresultsofstudents'achievements,anddoaseriesofadditions,deletionandmodifyoperations,afterthatbothteachesandstudentsareverydifficulttoinquireabouttheachievement,butifwriteaprogramofitbycomputer,itwillbedifferent.Aslongastheteachersortheadministratorsloginonthesystem,theycandosomeaddition,deletingandmodifyingtotheachievementofthestudents.Andwhenthestudentsloginonthesystem,theycaninquireabouttheirachievementeasierandtheyalsocaninquireaboutgeneraltestsituationoftheclass.Inthisdesignofthecourse,lhavethisrareopportunitytoworkwithmyclassmatestryingtodothesubjectAchievementManagementInformationSystem,usingwhatwehavelearnedinc#,.NET,SQLknowledge.Idotheoperationsoftheadditionanddeletion.
Keyword:
Usefulreducetheworkloadstatisticsanalyseadddelete
Modifyinquirec#.NETSQL
Contents(目录)
1Topicoverview…………………………………………………………………1
2Analyticalsystem………………………………………………………………1
2.1Designthemodifyoperation………………………………………………………1
3Designsystem………………………………………………………………...2
3.1Describecalculation………………………………………………………………2
3.2Detailedflowchart………………………………………………………………3
4Writetheprocedure………………………………………………………….4
4.1theoperationofadd…………………………………………………………………4
4.2theoperationofdelete……………………………………………………………11
5Circulateandtest……………………………………………………………..13
5.1circulateandtesttheadditionoperation……………………………………13
5.2circulateandtestthedeletionoperation……………………………………15
6Conclusion…………...………………………………………………………16
7Compliments…………………………………………………………………...17
8Reference…………………………………………………………………….18
1Topicoverview
IntheSubjectAchievementManagementInformationSystem,itneedstoextractrelevantinformationfromalargenumberofday-to-dayteachingactivities,toreflecttheteachingsituation.Ifusingthetraditionalmanualway,itmayeasytolossthedata,hasstatisticalerror,labor-intensiveandslow.Ifweusecomputers,itwillbehigh-speed,quickcompletionofthework.WhenwelinktheInternet,thedatacantransmissioninInternet,sowecansharetheresourcesinInternet,avoidworkrepeatedlyandstandardthemanagement,
therebyraisetheefficiencyandlevelofthemanagement.
SubjectAchievementManagementInformationSystemtakesthecomputerastool,throughmanagingtheinformationwhichbeneededbyeducationmanagement,taptingoutofthemanagerfromthedealingwiththetrivialdetailsofdatainordertomakethemmoreenergytoengageinimplementingthemanagementpolicies,carryingouttheteachingprogramandsupervisingandinspectingthequalityofteaching,therebyimprovingthequalityandmakeiteasiertostudentstoquerytheirachievementonline.
TobuildtheSubjectAchievementManagementInformationSystem,usethecomputertomanagethestudents'achievement,thenimprovetheeffectivenessoftheschoolandthelevelofthemodernize.Tohelpthemajorityofteacherstoimprovethequalityofworkingandtoachievestudentperformanceofasystematicworkflow,standardizationandautomation.
2Analyticalsystem
2.1Designthemodifyoperation
Theoperationsofadditionanddeletionareaccordingtothetheteachers'loadinginterface.Onlytheteacherscanaddanddeletetheachievementsofthestudents,thestudentsonlyquerytheachievement,printstatementandhelpandsoon.
Thediagramshowthefunction:
图2.1
Theteachersarerequestedtoaddanddeletetheachievementofthestudents.Inthismold,weusetheADO.NETtoaddanddeletethedatainthedatabase.Inordertoimprovetheefficiencyofthecirculate.WeusetheDAOtomanagetheoperationsunify,itisconvenienceandlogicalarrangement.
3Designsystem
3.1Describecalculation
LoadtherelevantdataofthestudentsintotheDataSet.UsethetoolofDataGridViewtoshowtheresultoftheachievementswhichareusedbytheadditionanddeletionoperations.
privatevoidForm2_Load(objectsender,EventArgse)
{
this.dataGridView1.DataSource=studentDao.queryAll();
}
publicDataTablequeryAll()
{
SqlCommandcom=newSqlCommand("select*fromStudentClassMark",con);
SqlDataAdaptersda=newSqlDataAdapter();
sda.SelectCommand=com;
DataSetds=newDataSet();
Sda.Fill(ds);
DataTabledt=ds.Tables[0];
returndt;
}
3.2Detailedflowchart
图3.2
4Writetheprocedure
4.1theoperationofadd
Inthismold,wefirstusethefunctionofSqlConnectiontolinkthedatabase.ThenweusetheDataAdaptertofilltheinformationofthestudentsintotheDataSet,thenupdatethedatabasetoshowthedataafteraddingthenewdata.
//fillthestudents'achievement,clicktheokbutton
privatevoidbtnOK_Click(objectsender,EventArgse)
{
if(this.txtID.Enabled!
=false)
{
StudentClassMarkscm=newStudentClassMark();
scm.StuID=Convert.ToInt32(this.txtID.Text.ToString().Trim());
scm.Chinese=Convert.ToInt32(this.txtChinese.Text.ToString().Trim());
scm.Math=Convert.ToInt32(this.txtMath.Text.ToString().Trim());
scm.English=Convert.ToInt32(this.txtEnglish.Text.ToString().Trim());
scm.Chemistry=Convert.ToInt32(this.txtChemistry.Text.ToString().Trim());
scm.Physics=Convert.ToInt32(this.txtphysics.Text.ToString().Trim());
this.IsPass=studentDAO.IsExistStudent(scm.StuID)&&
!
studentDAO.IsNotExistStudentClassMark(scm.StuID);
if(this.IsPass)
{
studentDAO.insert(scm);
}
else
{
MessageBox.Show("没有此学生或此学生成绩记录已存在","消息",
MessageBoxButtons.OK,MessageBoxIcon.Information);
}
}
else
{
StudentClassMarkscm2=newStudentClassMark();
scm2.StuID=scm.StuID;
scm2.Chinese=Convert.ToInt32(this.txtChinese.Text.ToString().Trim());
scm2.Math=Convert.ToInt32(this.txtMath.Text.ToString().Trim());
scm2.English=Convert.ToInt32(this.txtEnglish.Text.ToString().Trim());
scm2.Chemistry=Convert.ToInt32(this.txtChemistry.Text.ToString().Trim());
scm2.Physics=Convert.ToInt32(this.txtphysics.Text.ToString().Trim());
studentDAO.update(scm2);
}
}
}
publicpartialclassStudentForm:
Form
{
privateStudentClassMarkscm=null;
privateboolIsPass=false;
publicboolgetIsPass()
{
returnthis.IsPass;
}
IStudentDAOstudentDAO=StudentInfo.get();
publicStudentForm(StudentClassMarkscm)
:
this()
{
this.scm=scm;
this.txtID.Text=studentDAO.queryName(scm.StuID);
this.txtChinese.Text=scm.Chinese.ToString();
this.txtMath.Text=scm.Math.ToString();
this.txtEnglish.Text=scm.English.ToString();
this.txtChemistry.Text=scm.Chemistry.ToString();
this.txtphysics.Text=scm.Physics.ToString();
}
publicStudentForm()
{
InitializeComponent();
}
privatevoidbutton2_Click(objectsender,EventArgse)
{
this.Close();
}
privatevoidbtnOK_Click(objectsender,EventArgse)
{
if(this.txtID.Enabled!
=false)
{
StudentClassMarkscm=newStudentClassMark();
scm.StuID=Convert.ToInt32(this.txtID.Text.ToString().Trim());
scm.Chinese=Convert.ToInt32(this.txtChinese.Text.ToString().Trim());
scm.Math=Convert.ToInt32(this.txtMath.Text.ToString().Trim());
scm.English=Convert.ToInt32(this.txtEnglish.Text.ToString().Trim());
scm.Chemistry=Convert.ToInt32(this.txtChemistry.Text.ToString().Trim());
scm.Physics=Convert.ToInt32(this.txtphysics.Text.ToString().Trim());
this.IsPass=studentDAO.IsExistStudent(scm.StuID)&&
!
studentDAO.IsNotExistStudentClassMark(scm.StuID);
if(this.IsPass)
{
studentDAO.insert(scm);
}
else
{
MessageBox.Show("没有此学生或此学生成绩记录已存在","消息",MessageBoxButtons.OK,MessageBoxIcon.Information);
}
}
else
{
StudentClassMarkscm2=newStudentClassMark();
scm2.StuID=scm.StuID;
scm2.Chinese=Convert.ToInt32(this.txtChinese.Text.ToString().Trim());
scm2.Math=Convert.ToInt32(this.txtMath.Text.ToString().Trim());
scm2.English=Convert.ToInt32(this.txtEnglish.Text.ToString().Trim());
scm2.Chemistry=Convert.ToInt32(this.txtChemistry.Text.ToString().Trim());
scm2.Physics=Convert.ToInt32(this.txtphysics.Text.ToString().Trim());
studentDAO.update(scm2);
}
}
}
//judgethestudentisornotexist
publicboolIsExistStudent(intStuID)
{
SqlCommandcom=newSqlCommand("select*fromStudentwhereStuID=@StuID");
com.Connection=con;
if(con.State==ConnectionState.Closed)
{
con.Open();
}
SqlParameterp1=newSqlParameter("@StuID",SqlDbType.Int);
p1.Value=StuID;
com.Parameters.Add(p1);
SqlDataReaderreader=com.ExecuteReader();
boolb=reader.Read();
reader.Close();
con.Close();
returnb;
}
//judgetheachievementofstudentisornotexist
publicboolIsNotExistStudentClassMark(intStuID)
{
SqlCommandcom=newSqlCommand("select*fromStudentClassMarkwhereStuID=@StuID");
com.Connection=con;
if(con.State==ConnectionState.Closed)
{
con.Open();
}
SqlParameterp1=newSqlParameter("@StuID",SqlDbType.Int);
p1.Value=StuID;
com.Parameters.Add(p1);
SqlDataReaderreader=com.ExecuteReader();
boolb=reader.Read();
reader.Close();
con.Close();
returnb;
}
//clicktheokbutton
privatevoidbtnInsert_Click(objectsender,EventArgse)
{
StudentFormform=newStudentForm();
form.label1.Text="学生学号";
if(form.ShowDialog()==DialogResult.OK)
{
boolb=form.getIsPass();
if(b)
{
MessageBox.Show("添加成功