大做业练习:用Asp.net Mvc4作一个:学生考试成绩管理系统-简易版

大做业名称:学生考试成绩管理系统-简易版

总共分为4个阶段:html

第一阶段: 完成核心业务功能,包括:

A.基础信息维护功能:数据库

1.班级信息维护功能bootstrap

2.学生信息维护功能app

B.分值信息维护功能工具

依赖关系说明:分值信息依赖于学生信息,学生信息依赖于班级信息动画

第二阶段: 完成权限及角色的核心功能,包括:

admin角色:拥有最高权限,登录后,拥有添加,修改,删除等权限.能够查看全部信息.url

teacher角色:登录后,拥有添加,修改等权限.能够查看全部信息.spa

student角色:登录后,只能查看本身信息包括分值..net

第三阶段: 完成下载及数据导出功能

第四阶段: 完成两个特殊的计算工具

说明:采用Ajax技术,局部刷新.code

第五阶段: 美化Web UI,核心功能包括:

分值不及格的成绩,自动用红色标注,表格采用bootstrap等知名库,菜单项有轻微的动画等.

---------------------------------------------------------------------------------------------------

第一阶段核心代码参考:

第一步:建立项目

C#,Asp.net Mvc4,基本

项目名称:StuManSys,全称:Student Management System

第二步:修改Web.config文件中的数据库链接字符串<代码略>

第三步:建立Home控制器<代码略>

第四步:建立Model

在Models目录下,建立下面的类文件:

班级信息类文件 ClassInfo.cs

using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.ComponentModel.DataAnnotations; namespace StuManSys.Models { public class ClassInfo { [Key] public string ClassID { set; get; } public string ClassName { set; get; } public string FormteacherName{ set; get; } } }

学生类文件 Student.cs

using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.ComponentModel.DataAnnotations; namespace StuManSys.Models { public class Student { [Key] public int ID { set; get; } public string StuID { set; get; } public string StuName { set; get; } public int Gender { set; get; } public bool LiveAtSchool { set; get; } public string NativePlace { set; get; } public string ClassID { set; get; } public string Remark { set; get; } public virtual ClassInfo ClassInfo{set;get;} } }

分数类文件 Mark.cs

using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.ComponentModel.DataAnnotations.Schema; using System.ComponentModel.DataAnnotations; namespace StuManSys.Models { public class Mark { [Key] [ForeignKey("Student")] [Column("StudentID")] [DatabaseGenerated(DatabaseGeneratedOption.None)] public int StudentID { set; get; } public virtual Student Student { set; get; } public decimal SqlServer { set; get; } [NotMapped] public long SqlServerRank { set; get; } public decimal Math { set; get; } [NotMapped] public long MathRank { set; get; } public decimal Gym { set; get; } [NotMapped] public long GymRank { set; get; } [NotMapped] public decimal Average { set; get; } [NotMapped] public long Rank { set; get; } } }

排名类文件 VRank.cs

using System; using System.Collections.Generic; using System.Linq; using System.Web; namespace StuManSys.Models { public class VRank { public int StudentID { set; get; } public long SqlServerRank { set; get; } public long MathRank { set; get; } public long GymRank { set; get; } public decimal Average { set; get; } public long Rank { set; get; } } }

<待续>

相关文章
相关标签/搜索