@model EMIS.ViewModel.Students.StudentGradView @using EMIS.Web.Controls; @using Bowin.Web.Controls.Mvc; @{ ViewBag.Title = "Edit"; decimal? ScoreCredit=0; var CurseGrade = (IList)ViewBag.CurseGrade; var grade = @Model.AverageGrade; } @section scripts{ }
@Html.Hidden("CoursematerialID") @Html.Hidden("StarTermID") @Html.Hidden("UserID")
@using (Ajax.BeginForm(new AjaxOptions { OnSuccess = "EMISFunction.FormSuccess", OnBegin = "EMISFunction.FormSubmit", OnComplete = "EMISFunction.FormComplete" })) {
@ViewBag.Path
@Html.ContextMenuBar("Edit")
@Html.HiddenFor(x => x.UserID)@Html.HiddenFor(x => x.LoginID) @**@
@Html.LabelFor(x => x.LoginID): @Model.LoginID @Html.LabelFor(x => x.FacultyName): @Model.FacultyName @Html.LabelFor(x => x.ClassName): @Model.ClassName
@Html.LabelFor(x => x.PlanningGraduateDate): @Html.DisplayFor(x => x.PlanningGraduateDate) @Html.LabelFor(x => x.Menshu): @Model.Menshu @Html.LabelFor(x => x.AverageGrade): @(String.Format("{0:N1}", @Model.AverageGrade))
@Html.LabelFor(x => x.ScoreCredit): @Model.ScoreCredit @Html.LabelFor(x => x.Required): @Model.Required @Html.LabelFor(x => x.CapLimit): @Model.CapLimit
@Html.LabelFor(x => x.Optional): @Model.Optional @Html.LabelFor(x => x.Direction): @Model.Direction @Html.LabelFor(x => x.Commonality): @Model.Commonality
@foreach (var starttermID in CurseGrade.GroupBy(q => q.StarttermID).Select(q => q.Key)) { var YearGrade = CurseGrade.Where(q => q.StarttermID == starttermID).ToList(); @**@ @foreach (var Grade in YearGrade) { }
第@(starttermID)学期 @(YearGrade[0].StarttermName)
课程名 成绩 学分
@(Grade.CourseName) @(String.Format("{0:N1}", Grade.TotalScoreStr)) @(Grade.ScoreCredit)
}
}