当前位置: 首页 > news >正文

php b2c网站免费下载百度app最新版本

php b2c网站,免费下载百度app最新版本,wordpress文章自定义字段开发,张雪峰谈软件工程专业大作业名称:学生考试成绩管理系统-简易版 总共分为4个阶段: 第一阶段: 完成原型版V1.0核心业务功能,包括: A.基础信息维护功能: 1.班级信息维护功能 2.学生信息维护功能 B.分值信息维护功能 依赖关系说明:分值信息依赖于学生信息,学生信息依赖于班级信息 第一阶段V1.0原…

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

总共分为4个阶段:

第一阶段: 完成原型版V1.0核心业务功能,包括:

A.基础信息维护功能:

1.班级信息维护功能

2.学生信息维护功能

B.分值信息维护功能

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

第一阶段V1.0原型版 演示地址 :http://demo.exesoft.cn:9191

第一阶段V1.0源码获得方法:

扫下方二维码,关注gCodeTop公众号,

然后切换至输入状态输入:  StuManSys-v1

交互界面会自动回应下载地址.

第二阶段: 完成权限的基本功能<点击查看代码过程>,包括:

admin用户:拥有最高权限,登陆后,拥有添加,修改,删除等权限.可以查看所有信息.

teacher用户:登陆后,拥有修改权限.可以查看所有信息.

其它用户或所有用户:能搜索查看某编号选手的分值信息.

第二阶段V2.0源码获得方法:

扫下方二维码,关注gCodeTop公众号,

然后切换至输入状态输入:  StuManSys-v2

交互界面会自动回应下载地址.

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

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

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

第五阶段: 美化Web UI,主要内容包括:

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

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

第一阶段核心代码参考:

第一步:创建项目

C#,Asp.net Mvc4,基本

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

第二步:创建Home控制器

只包含一个最简单的Index Action.

第三步:创建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; }}
}

ClassID:班级编号,主键,字符类型.

ClassName:班级名称,整数类型.

FormteacherName:班主任名称,字符类型.

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

学生类文件 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;}}
}

ID:主键,整数,自动递增.

StuID:学生编号,字符类型.

StuName:学生名称,字符类型.

Gender:性别,整数类型,0代表不详,1代表男,2代表女.界面上采用3个RadioButton实现.

LiveAtSchool:是否住校,布尔类型.界面上采用1个CheckBox实现。

NativePlace:籍贯,字符类型.界面上采用DropdownList实现.

ClassID:班级编号,字符类型,外键.界面上采用DropdownList实现.

Remark:备注,字符类型.界面上采用TextArea实现.

ClassInfo:班级信息的导航属性.

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

分数类文件 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; }}
}

StudentID:整数,主键,同时兼外键,取消默认的自动递增.

SqlServer,Math,Gym:三门课的名称,小数类型.

Student:学生信息导航属性.

SqlServerRank,MathRank,GymRank:三门课的排名,长整数类型.

Average:平均值,小数类型.

Rank:平均值名次,长整数类型.

NotMapped 相关属性不映射产生相关数据库中的表格字段。

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

排名类文件 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; }}
}

StudentID:学生编号,整数

SqlServerRank,MathRank,GymRank:长整数,数据库SqlServer,数学,体育三门课的排名.

Average:平均分,小数类型.

Rank:平均分排名,长整数.

VRank类用于:用相应的对象从数据库中视图VRank中,为Mark表传递相关排行榜数据.

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

第四步:创建控制器及相关视图

1.创建ClassInfoController控制器等,

选项如下:

后面的控制器产生时,上述相关选项中的Template及Data context class都一样。

如法炮制,再创建StudentController及MarkController控制器及相关视图.

在创建完控制器后,会形成了一个上下文文件,代码如下:

using System.Data.Entity;namespace StuManSys.Models
{public class StuManSysContext : DbContext{// You can add custom code to this file. Changes will not be overwritten.// // If you want Entity Framework to drop and regenerate your database// automatically whenever you change your model schema, add the following// code to the Application_Start method in your Global.asax file.// Note: this will destroy and re-create your database with every model change.// // System.Data.Entity.Database.SetInitializer(new System.Data.Entity.DropCreateDatabaseIfModelChanges<StuManSys.Models.StuManSysContext>());public StuManSysContext() : base("name=StuManSysContext"){}public DbSet<ClassInfo> ClassInfoes { get; set; }public DbSet<Mark> Marks { get; set; }public DbSet<Student> Students { get; set; }}
}

然后,在Global.ascx文件中的Application_Start()事件中,添加:

            System.Data.Entity.Database.SetInitializer(new System.Data.Entity.DropCreateDatabaseIfModelChanges<StuManSys.Models.StuManSysContext>()); 

第五步:创建排行榜视图:

代码参考:

USE [StuManSysContext-20191027115753]
GO
CREATE view VRank
as
select StudentID,
Dense_Rank() over(order by SqlServer desc) 'SqlServerRank',
Dense_Rank() over(order by Math desc) 'MathRank',
Dense_Rank() over(order by Gym desc) 'GymRank',
(SqlServer+Math+Gym)/3 'Average',DENSE_RANK() over(order by (SqlServer+Math+Gym)/3  desc) 'Rank'
from Marks
GO

当这个视图创建成功后,把代码更换成:

    System.Data.Entity.Database.SetInitializer<StuManSys.Models.StuManSysContext>(null);

第六步:再修改相关控制器局部代码

最终控制器关键代码如下:

1.ClassInfoController.cs:

using System;
using System.Collections.Generic;
using System.Data;
using System.Data.Entity;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using StuManSys.Models;namespace StuManSys.Controllers
{public class ClassInfoController : Controller{private StuManSysContext db = new StuManSysContext();//// GET: /ClassInfo/public ActionResult Index(){return View(db.ClassInfoes.ToList());}//// GET: /ClassInfo/Details/5public ActionResult Details(string id = null){ClassInfo classinfo = db.ClassInfoes.Find(id);if (classinfo == null){return HttpNotFound();}return View(classinfo);}//// GET: /ClassInfo/Createpublic ActionResult Create(){return View();}//// POST: /ClassInfo/Create[HttpPost]public ActionResult Create(ClassInfo classinfo){if (ModelState.IsValid){db.ClassInfoes.Add(classinfo);db.SaveChanges();return RedirectToAction("Index");}return View(classinfo);}//// GET: /ClassInfo/Edit/5public ActionResult Edit(string id = null){ClassInfo classinfo = db.ClassInfoes.Find(id);if (classinfo == null){return HttpNotFound();}return View(classinfo);}//// POST: /ClassInfo/Edit/5[HttpPost]public ActionResult Edit(ClassInfo classinfo){if (ModelState.IsValid){db.Entry(classinfo).State = EntityState.Modified;db.SaveChanges();return RedirectToAction("Index");}return View(classinfo);}//// GET: /ClassInfo/Delete/5public ActionResult Delete(string id = null){ClassInfo classinfo = db.ClassInfoes.Find(id);if (classinfo == null){return HttpNotFound();}return View(classinfo);}//// POST: /ClassInfo/Delete/5[HttpPost, ActionName("Delete")]public ActionResult DeleteConfirmed(string id){ClassInfo classinfo = db.ClassInfoes.Find(id);db.ClassInfoes.Remove(classinfo);db.SaveChanges();return RedirectToAction("Index");}protected override void Dispose(bool disposing){db.Dispose();base.Dispose(disposing);}}
}

2.StudentController控制器,代码如下:

using System;
using System.Collections.Generic;
using System.Data;
using System.Data.Entity;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using StuManSys.Models;namespace StuManSys.Controllers
{public class StudentController : Controller{private StuManSysContext db = new StuManSysContext();    // GET: /Student/public ActionResult Index(){ViewBag.ClassID = new SelectList(db.ClassInfoes, "ClassID", "ClassName");return View(db.Students.ToList());}//// GET: /Student/Details/5public ActionResult Details(int id = 0){Student student = db.Students.Find(id);if (student == null){return HttpNotFound();}return View(student);}//// GET: /Student/Createpublic ActionResult Create(){ViewBag.ClassID = new SelectList(db.ClassInfoes, "ClassID", "ClassName");return View();}//// POST: /Student/Create[HttpPost]public ActionResult Create(Student student){if (ModelState.IsValid){Mark m = new Mark();m.StudentID = student.ID;m.SqlServer = 0;m.Math = 0;m.Gym = 0;db.Marks.Add(m);db.Students.Add(student);               db.SaveChanges();return RedirectToAction("Index");}return View(student);}//// GET: /Student/Edit/5public ActionResult Edit(int id = 0){Student student = db.Students.Find(id);if (student == null){return HttpNotFound();}var classinfo = db.ClassInfoes;            var selectList = new SelectList(classinfo, "ClassID", "ClassName",student.ClassID);ViewBag.ClassID = selectList;   return View(student);}//// POST: /Student/Edit/5[HttpPost]public ActionResult Edit(Student student){if (ModelState.IsValid){db.Entry(student).State = EntityState.Modified;db.SaveChanges();return RedirectToAction("Index");}ViewBag.ClassID = new SelectList(db.ClassInfoes, "ClassID", "ClassName");return View(student);}//// GET: /Student/Delete/5public ActionResult Delete(int id = 0){Student student = db.Students.Find(id);if (student == null){return HttpNotFound();}return View(student);}//// POST: /Student/Delete/5[HttpPost, ActionName("Delete")]public ActionResult DeleteConfirmed(int id){Mark mark = db.Marks.Find(id);Student student = db.Students.Find(id);db.Marks.Remove(mark);db.Students.Remove(student);db.SaveChanges();return RedirectToAction("Index");}protected override void Dispose(bool disposing){db.Dispose();base.Dispose(disposing);}}
}

3.MarkController控制器,代码如下:

using System;
using System.Collections.Generic;
using System.Data;
using System.Data.Entity;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using StuManSys.Models;namespace StuManSys.Controllers
{public class MarkController : Controller{private StuManSysContext db = new StuManSysContext();//// GET: /Mark/public ActionResult Index(){var ranks = db.Database.SqlQuery<VRank>("SELECT * FROM dbo.VRank");var marks = db.Marks.Include(m => m.Student);foreach (var m in marks){m.SqlServerRank = ranks.Where(i => i.StudentID == m.StudentID).Select(j => j.SqlServerRank).Single();m.MathRank = ranks.Where(i => i.StudentID == m.StudentID).Select(j => j.MathRank).Single();m.GymRank = ranks.Where(i => i.StudentID == m.StudentID).Select(j => j.GymRank).Single();m.Average = ranks.Where(i => i.StudentID == m.StudentID).Select(j => j.Average).Single();m.Rank = ranks.Where(i => i.StudentID == m.StudentID).Select(j => j.Rank).Single();}return View(marks.ToList());}//// GET: /Mark/Details/5public ActionResult Details(int id = 0){var ranks = db.Database.SqlQuery<VRank>("SELECT * FROM dbo.VRank");Mark m = db.Marks.Find(id);       if (m == null){return HttpNotFound();}m.SqlServerRank = ranks.Where(i => i.StudentID == m.StudentID).Select(j => j.SqlServerRank).Single();m.MathRank = ranks.Where(i => i.StudentID == m.StudentID).Select(j => j.MathRank).Single();m.GymRank = ranks.Where(i => i.StudentID == m.StudentID).Select(j => j.GymRank).Single();m.Average = ranks.Where(i => i.StudentID == m.StudentID).Select(j => j.Average).Single();m.Rank = ranks.Where(i => i.StudentID == m.StudentID).Select(j => j.Rank).Single();return View(m);}//// GET: /Mark/Createpublic ActionResult Create(){ViewBag.StudentID = new SelectList(db.Students, "ID", "StuID");return View();}//// POST: /Mark/Create[HttpPost]public ActionResult Create(Mark mark){if (ModelState.IsValid){db.Marks.Add(mark);db.SaveChanges();return RedirectToAction("Index");}ViewBag.StudentID = new SelectList(db.Students, "ID", "StuID", mark.StudentID);return View(mark);}//// GET: /Mark/Edit/5public ActionResult Edit(int id = 0){Mark mark = db.Marks.Find(id);if (mark == null){return HttpNotFound();}ViewBag.StudentID = new SelectList(db.Students, "ID", "StuID", mark.StudentID);return View(mark);}//// POST: /Mark/Edit/5[HttpPost]public ActionResult Edit(Mark mark){if (ModelState.IsValid){db.Entry(mark).State = EntityState.Modified;db.SaveChanges();return RedirectToAction("Index");}ViewBag.StudentID = new SelectList(db.Students, "ID", "StuID", mark.StudentID);return View(mark);}//// GET: /Mark/Delete/5public ActionResult Delete(int id = 0){Mark mark = db.Marks.Find(id);if (mark == null){return HttpNotFound();}return View(mark);}//// POST: /Mark/Delete/5[HttpPost, ActionName("Delete")]public ActionResult DeleteConfirmed(int id){Mark mark = db.Marks.Find(id);db.Marks.Remove(mark);db.SaveChanges();return RedirectToAction("Index");}protected override void Dispose(bool disposing){db.Dispose();base.Dispose(disposing);}}
}

第七步:修改相关View局部代码

Home/Index.csthml:

@{ViewBag.Title = "Index";
}<h2>学生考试成绩管理系统(原型V1.0)</h2>
<hr /><h3>学生基础信息管理</h3>
<p>@Html.ActionLink("班级信息","Index","ClassInfo")</p>
<p>@Html.ActionLink("学生信息","Index","Student")</p>
<h3>学生考分信息管理</h3>
<p>@Html.ActionLink("考分信息","Index","Mark")</p>

Student/Index.csthml:

@model IEnumerable<StuManSys.Models.Student>@{ViewBag.Title = "学生信息";
}<h2>学生信息</h2>
<p>@Html.ActionLink("返回首页", "Index","Home")
</p>
<p>@Html.ActionLink("Create New", "Create")
</p>
<table><tr><th>@Html.DisplayNameFor(model => model.StuID)</th><th>@Html.DisplayNameFor(model => model.StuName)</th><th>@Html.DisplayNameFor(model => model.Gender)</th><th>@Html.DisplayNameFor(model => model.LiveAtSchool)</th><th>@Html.DisplayNameFor(model => model.NativePlace)</th><th>@Html.DisplayNameFor(model => model.ClassInfo.ClassName)</th><th>@Html.DisplayNameFor(model => model.Remark)</th><th></th></tr>@foreach (var item in Model) {<tr><td>@Html.DisplayFor(modelItem => item.StuID)</td><td>@Html.DisplayFor(modelItem => item.StuName)</td><td>@if(item.Gender==1){@:男}else if (item.Gender ==2){@:女}else{@:不详}</td><td>@Html.DisplayFor(modelItem => item.LiveAtSchool)</td><td>@Html.DisplayFor(modelItem => item.NativePlace)</td><td>@Html.DisplayFor(modelItem => item.ClassInfo.ClassName)</td><td>@Html.DisplayFor(modelItem => item.Remark)</td><td>@Html.ActionLink("Edit", "Edit", new { id=item.ID }) |@Html.ActionLink("Details", "Details", new { id=item.ID }) |@Html.ActionLink("Delete", "Delete", new { id=item.ID })</td></tr>
}
</table>

Student/Create.cshtml:

@model StuManSys.Models.Student
@{ViewBag.Title = "Create";List<SelectListItem> NativePlaceList = new List<SelectListItem> {new SelectListItem { Text ="", Value = "",Selected = true},new SelectListItem { Text = "西安", Value = "西安" },new SelectListItem { Text = "北京", Value = "北京" },new SelectListItem { Text = "南京", Value = "南京" }    };    
}<h2>Create</h2>
@using (Html.BeginForm()) {@Html.ValidationSummary(true)<fieldset><legend>Student</legend><div class="editor-label">@Html.LabelFor(model => model.StuID)</div><div class="editor-field">@Html.EditorFor(model => model.StuID)@Html.ValidationMessageFor(model => model.StuID)</div><div class="editor-label">@Html.LabelFor(model => model.StuName)</div><div class="editor-field">@Html.EditorFor(model => model.StuName)@Html.ValidationMessageFor(model => model.StuName)</div><div class="editor-label">@Html.LabelFor(model => model.Gender)</div><div class="editor-field">@Html.RadioButton("Gender", "0")<text>不详</text>@Html.RadioButton("Gender", "1")<text>男</text>@Html.RadioButton("Gender", "2")<text>女</text>@Html.ValidationMessageFor(model => model.Gender)</div><div class="editor-label">@Html.LabelFor(model => model.LiveAtSchool)</div><div class="editor-field">@Html.EditorFor(model => model.LiveAtSchool)@Html.ValidationMessageFor(model => model.LiveAtSchool)</div><div class="editor-label">@Html.LabelFor(model => model.NativePlace)</div><div class="editor-field">@Html.DropDownList("NativePlace", NativePlaceList)@Html.ValidationMessageFor(model => model.NativePlace)</div><div class="editor-label">@Html.LabelFor(model => model.ClassID)</div><div class="editor-field">@Html.DropDownList("ClassID", String.Empty)@Html.ValidationMessageFor(model => model.ClassID)</div><div class="editor-label">@Html.LabelFor(model => model.Remark)</div><div class="editor-field">@Html.TextAreaFor(model => model.Remark)@Html.ValidationMessageFor(model => model.Remark)</div><p><input type="submit" value="Create" /></p></fieldset>
}<div>@Html.ActionLink("Back to List", "Index")
</div>@section Scripts {@Scripts.Render("~/bundles/jqueryval")
}

Student/Edit.cshtml:

@model StuManSys.Models.Student
@{ViewBag.Title = "Edit";List<SelectListItem> NativePlace = new List<SelectListItem> {    new SelectListItem { Text = "", Value = "",Selected =(Model.NativePlace=="")},         new SelectListItem { Text = "西安", Value = "西安",Selected =(Model.NativePlace=="西安")},new SelectListItem { Text = "北京", Value = "北京",Selected =(Model.NativePlace=="北京") },new SelectListItem { Text = "南京", Value = "南京",Selected =(Model.NativePlace=="南京") }    };}<h2>Edit</h2>
@using (Html.BeginForm())
{@Html.ValidationSummary(true)<fieldset><legend>Student</legend>@Html.HiddenFor(model => model.ID)<div class="editor-label">@Html.LabelFor(model => model.StuID)</div><div class="editor-field">@Html.EditorFor(model => model.StuID)@Html.ValidationMessageFor(model => model.StuID)</div><div class="editor-label">@Html.LabelFor(model => model.StuName)</div><div class="editor-field">@Html.EditorFor(model => model.StuName)@Html.ValidationMessageFor(model => model.StuName)</div><div class="editor-label">@Html.LabelFor(model => model.Gender)</div><div class="editor-field">       @Html.RadioButton("Gender", "0")<text>不详</text>@Html.RadioButton("Gender", "1")<text>男</text>@Html.RadioButton("Gender", "2")<text>女</text>@Html.ValidationMessageFor(model => model.Gender)           </div><div class="editor-label">@Html.LabelFor(model => model.LiveAtSchool)</div><div class="editor-field">@Html.EditorFor(model => model.LiveAtSchool)@Html.ValidationMessageFor(model => model.LiveAtSchool)</div><div class="editor-label">@Html.LabelFor(model => model.NativePlace)</div><div class="editor-field">@Html.DropDownList("NativePlace",NativePlace)@Html.ValidationMessageFor(model => model.NativePlace)</div><div class="editor-label">@Html.LabelFor(model => model.ClassID)</div><div class="editor-field">@Html.DropDownList("ClassID")@Html.ValidationMessageFor(model => model.ClassID)</div><div class="editor-label">@Html.LabelFor(model => model.Remark)</div><div class="editor-field">@Html.EditorFor(model => model.Remark)@Html.ValidationMessageFor(model => model.Remark)</div><p><input type="submit" value="Save" /></p></fieldset>
}<div>@Html.ActionLink("Back to List", "Index")
</div>@section Scripts {@Scripts.Render("~/bundles/jqueryval")
}

Student/Details.cshtml:

@model StuManSys.Models.Student@{ViewBag.Title = "Details";
}<h2>Details</h2>
<fieldset><legend>Student</legend><div class="display-label">@Html.DisplayNameFor(model => model.StuID)</div><div class="display-field">@Html.DisplayFor(model => model.StuID)</div><div class="display-label">@Html.DisplayNameFor(model => model.StuName)</div><div class="display-field">@Html.DisplayFor(model => model.StuName)</div><div class="display-label">@Html.DisplayNameFor(model => model.Gender)</div><div class="display-field">@if (Model.Gender == 1){@:男}else if (Model.Gender == 2){@:女}else{@:不详}     </div><div class="display-label">@Html.DisplayNameFor(model => model.LiveAtSchool)</div><div class="display-field">@Html.DisplayFor(model => model.LiveAtSchool)</div><div class="display-label">@Html.DisplayNameFor(model => model.NativePlace)</div><div class="display-field">@Html.DisplayFor(model => model.NativePlace)</div><div class="display-label">@Html.DisplayNameFor(model => model.ClassInfo.ClassName)</div><div class="display-field">@Html.DisplayFor(model => model.ClassInfo.ClassName)</div><div class="display-label">@Html.DisplayNameFor(model => model.Remark)</div><div class="display-field">@Html.DisplayFor(model => model.Remark)</div>
</fieldset>
<p>@Html.ActionLink("Edit", "Edit", new { id=Model.ID }) |@Html.ActionLink("Back to List", "Index")
</p>

Student/Delete.cshtml:

@model StuManSys.Models.Student@{ViewBag.Title = "Delete";
}<h2>Delete</h2><h3>Are you sure you want to delete this?</h3>
<fieldset><legend>Student</legend><div class="display-label">@Html.DisplayNameFor(model => model.StuID)</div><div class="display-field">@Html.DisplayFor(model => model.StuID)</div><div class="display-label">@Html.DisplayNameFor(model => model.StuName)</div><div class="display-field">@Html.DisplayFor(model => model.StuName)</div>
</fieldset>
@using (Html.BeginForm()) {<p><input type="submit" value="Delete" /> |@Html.ActionLink("Back to List", "Index")</p>
}

Mark/Index.cshtml:

@model IEnumerable<StuManSys.Models.Mark>@{ViewBag.Title = "考分信息";
}<h2>考分信息</h2>
<p>@Html.ActionLink("返回首页", "Index","Home")
</p>
<table><tr><th>@Html.DisplayNameFor(model => model.Student.StuID)</th><th>@Html.DisplayNameFor(model => model.Student.StuName)</th><th>@Html.DisplayNameFor(model => model.Student.ClassInfo.ClassName)</th><th>@Html.DisplayNameFor(model => model.SqlServer)</th><th>@Html.DisplayNameFor(model => model.SqlServerRank)</th><th>@Html.DisplayNameFor(model => model.Math)</th><th>@Html.DisplayNameFor(model => model.MathRank)</th><th>@Html.DisplayNameFor(model => model.Gym)</th><th>@Html.DisplayNameFor(model => model.GymRank)</th><th>@Html.DisplayNameFor(model => model.Average)</th><th>@Html.DisplayNameFor(model => model.Rank)</th><th></th></tr>@foreach (var item in Model) {<tr><td>@Html.DisplayFor(modelItem => item.Student.StuID)</td><td>@Html.DisplayFor(modelItem => item.Student.StuName)</td><td>@Html.DisplayFor(modelItem => item.Student.ClassInfo.ClassName)</td><td>@Html.DisplayFor(modelItem => item.SqlServer)</td><td>@Html.DisplayFor(modelItem => item.SqlServerRank)</td><td>@Html.DisplayFor(modelItem => item.Math)</td><td>@Html.DisplayFor(modelItem => item.MathRank)</td><td>@Html.DisplayFor(modelItem => item.Gym)</td><td>@Html.DisplayFor(modelItem => item.GymRank)</td><td>@Html.DisplayFor(modelItem => item.Average)</td><td>@Html.DisplayFor(modelItem => item.Rank)</td><td>@Html.ActionLink("Edit", "Edit", new { id=item.StudentID }) |@Html.ActionLink("Details", "Details", new { id=item.StudentID })        </td></tr>
}
</table>

Mark/Edit.cshtml:

@model StuManSys.Models.Mark@{ViewBag.Title = "Edit";
}<h2>Edit</h2>
@using (Html.BeginForm()) {@Html.ValidationSummary(true)<fieldset><legend>Mark</legend>@Html.HiddenFor(model => model.StudentID)<div class="editor-label">@Html.LabelFor(model => model.Student.StuID)</div><div class="editor-field">@Html.DisplayFor(model => model.Student.StuID)            </div><div class="editor-label">@Html.LabelFor(model => model.Student.StuName)</div><div class="editor-field">@Html.DisplayFor(model => model.Student.StuName)            </div><div class="editor-label">@Html.LabelFor(model => model.Student.ClassInfo.ClassName)</div><div class="editor-field">@Html.DisplayFor(model => model.Student.ClassInfo.ClassName)</div>        <div class="editor-label">@Html.LabelFor(model => model.SqlServer)</div><div class="editor-field">@Html.EditorFor(model => model.SqlServer)@Html.ValidationMessageFor(model => model.SqlServer)</div>  <div class="editor-label">@Html.LabelFor(model => model.Math)</div><div class="editor-field">@Html.EditorFor(model => model.Math)@Html.ValidationMessageFor(model => model.Math)</div><div class="editor-label">@Html.LabelFor(model => model.Gym)</div><div class="editor-field">@Html.EditorFor(model => model.Gym)@Html.ValidationMessageFor(model => model.Gym)</div> <p><input type="submit" value="Save" /></p></fieldset>
}<div>@Html.ActionLink("Back to List", "Index")
</div>@section Scripts {@Scripts.Render("~/bundles/jqueryval")
}

附:相关表格及视图结构:

http://www.ds6.com.cn/news/42359.html

相关文章:

  • 东莞专业的网站建设网络推广原画培训机构哪里好
  • 河南网站建设公司 政府互动营销经典案例
  • 惠州专业做网站2022适合小学生的简短新闻摘抄
  • 2023兔年ppt免费模板seo网站推广服务
  • pc蛋蛋网站怎么做百度seo公司哪家强一点
  • 免费网站定制seo是什么意思广东话
  • 国家注册商标官方网西安seo网络优化公司
  • 做国外网站有哪些b2b平台运营模式
  • 长沙有做网站的吗百度在线客服中心
  • dota2max网站怎么做壁纸下载百度官方版
  • 陕西省建设协会岗位证查询网站整合营销传播方法包括
  • WordPress比赛竞猜插件安卓优化大师app下载安装
  • 做网站 多页面网址怎么弄百度搜索排名推广
  • 江门找人做网站排名最近的疫情情况最新消息
  • 免费做个人网站合肥关键词排名推广
  • jsp ajax网站开发典型实例深圳优化网站方法
  • 网站开发中怎么样对接接口免费建立个人网站
  • wordpress画廊插件谷歌seo查询
  • 房产网站建设公司软文范例大全1000字
  • jsp网站开发实例 pdfaso优化什么意思
  • 网站 做英文 翻译 规则抖音推广引流平台
  • 基因数据库网站开发价格正规代运营公司排名
  • 做的好的有哪些网站东莞seo建站优化工具
  • 如何创建网站制作平台小程序开发一个多少钱啊
  • 自己搭建网站需要多少钱深圳推广服务
  • 最新疫情消息全国seo快速排名点击
  • 网站建设公司小江国内新闻大事
  • 网站开发定制案例展示站长数据
  • 淘宝到底是b2c还是c2cseo营销培训咨询
  • 网站申请好了 怎么建设国家市场监管总局官网