123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260 |
- @model EMIS.ViewModel.Students.StudentGradView
- @using EMIS.Web.Controls;
- @using Bowin.Web.Controls.Mvc;
- @{
- ViewBag.Title = "Edit";
- decimal? ScoreCredit=0;
- var CurseGrade = (IList<EMIS.ViewModel.Students.CourseGradeView>)ViewBag.CurseGrade;
- var grade = @Model.AverageGrade;
- }
- <style type="text/css">
- #Coursematerialtable
- {
- width: 100%;
- border: 0px none;
- }
-
- #Coursematerialtable tr
- {
- min-height: 30px;
- }
- </style>
- @section scripts{
- <script type="text/javascript">
- $(function () {
- debugger;
- var count = document.getElementsByName("Coursematerialtable2").length;
- if (count > 5) {
- var height = 0;
- var a = 100 + (count - 5) * 20;
- $("#divScroll").width(a + "%");
- for (var i = 0; i < count; i++) {
- //将各个学期成绩表格宽度平分
- document.getElementsByName("Coursematerialtable2")[i].style.width = 100 / count + "%";
- //现将各个学期成绩表格实际宽度累加
- // height += document.getElementsByName("Coursematerialtable2")[i].offsetWidth;
- }
- // $("#divScroll").width(height);
- }
- else {
- for (var i = 0; i < count; i++) {
- document.getElementsByName("Coursematerialtable2")[i].style.width = "20%";
- }
- }
- })
- function LoadScore(CoursematerialID, StartTermID, UserID) {
- $("#display_search_list").css('display', 'block');
- $("#CoursematerialID").val(CoursematerialID);
- $("#StarTermID").val(StartTermID);
- $("#UserID").val(UserID);
- $("#dgCourseScheduleSettingList").cmsXDataTable("load", { CoursematerialID: CoursematerialID, StartTermID: StartTermID, UserID: UserID });
- }
- //列表字体颜色设置为红色
- function SetRedColumn(index, row, value) {
- return " <span style=\"color: red;\">" + value + "</span>";
- }
- //Excel导出
- function CourseGrade_Export() {
- $("#formQuery").submit();
- }
- function StudentScore_Report() {
- var redirectTo = "/CourseGrade/StudentScoreReport?LoginID=" + $("#LoginID").val();
- $.popupTopWindow('学生成绩表', redirectTo, 1100, 550, null, null);
- // var redirectTo = '/StudentScore/StudentScoreReport?MNU=' + "" + "&CollegeID="
- // + "&Years=&GrademajorID=&ClassmajorID=&Attribute=LoginID&Condition==&Value=" + $("#LoginID").val();
- // $.popupTopWindow('学生成绩表', redirectTo, 1100, 550, null, null);
- }
- </script>
- }
- <div class="easyui-panel" data-options="border:false,fit:true" style="position: relative">
- <form id="formQuery" method="post" action="@Url.Content("~/CourseGrade/Excel")">
- @Html.Hidden("CoursematerialID")
- @Html.Hidden("StarTermID")
- @Html.Hidden("UserID")
- </form>
- @using (Ajax.BeginForm(new AjaxOptions
- {
- OnSuccess = "EMISFunction.FormSuccess",
- OnBegin = "EMISFunction.FormSubmit",
- OnComplete = "EMISFunction.FormComplete"
- }))
- {
-
- <div class="">
- <div style="float: left; margin-left: 10px; line-height: 30px; font-size: 12px;">
- @ViewBag.Path
- </div>
- <div style="margin-right: 10px; line-height: 30px; font-size: 12px;">@Html.ContextMenuBar("Edit")</div>
- </div>
- <div class="search_list">
- @Html.HiddenFor(x => x.UserID)@Html.HiddenFor(x => x.LoginID)
-
- <table cellpadding="0" cellspacing="0" id="Coursematerialtable">
- <tr>
- <td width="220">@Html.LabelFor(x => x.LoginID):
- </td>
- <td>@Model.LoginID
- </td>
- <td>
- @Html.LabelFor(x => x.FacultyName):
- </td>
- <td>
- @Model.FacultyName
- </td>
- <td>
- @Html.LabelFor(x => x.ClassName):
- </td>
- <td>
- @Model.ClassName
- </td>
- </tr>
- <tr>
- <td width="220">@Html.LabelFor(x => x.PlanningGraduateDate):
- </td>
- <td>@Html.DisplayFor(x => x.PlanningGraduateDate)
- </td>
- <td>
- @Html.LabelFor(x => x.Menshu):
- </td>
- <td>
- @Model.Menshu
- </td>
- <td>
- @Html.LabelFor(x => x.AverageGrade):
- </td>
- <td>
- @(String.Format("{0:N1}", @Model.AverageGrade))
- </td>
- </tr>
- @*<tr>
- <td width="220">
- @Html.LabelFor(x => x.ScoreCredit):
- </td>
- <td>@Model.ScoreCredit
- </td>
- <td>
- @Html.LabelFor(x => x.Required):
- </td>
- <td>
- @Model.Required
- </td>
- <td>
- @Html.LabelFor(x => x.CapLimit):
- </td>
- <td>
- @Model.CapLimit
- </td>
- </tr>
- <tr>
- <td width="220">
- @Html.LabelFor(x => x.Optional):
- </td>
- <td>@Model.Optional
- </td>
- <td>
- @Html.LabelFor(x => x.Direction):
- </td>
- <td>
- @Model.Direction
- </td>
- <td>
- @Html.LabelFor(x => x.Commonality):
- </td>
- <td>
- @Model.Commonality
- </td>
- </tr>*@
- <tr>
- <td colspan="6">
- </td>
- </tr>
- </table>
- <div id="search_list" style="width: 100%; overflow-x: scroll; scrollbar-arrow-color: #70807d;
- scrollbar-highlight-color: #ffffff; scrollbar-3dlight-color: #70807d; scrollbar-shadow-color: #ffffff;
- scrollbar-darkshadow-color: #70807d; scrollbar-track-color: #ffffff; scrollbar-face-color: #cccccc">
- <div id="divScroll" style="width: 100%">
- @foreach (var starttermID in CurseGrade.GroupBy(q => q.StarttermID).Select(q => q.Key))
- {
- var YearGrade = CurseGrade.Where(q => q.StarttermID == starttermID).ToList();
- <table cellpadding="1" cellspacing="1" style="margin-bottom: 5px; float: left; background-color: #D6D6D6;
- margin-bottom: 5px;" id="Coursematerialtable2" name='Coursematerialtable2'>
- <tr>
- @*<td align="center" colspan="3" style="background-color: #F0F0F0">
- 第@(starttermID)学期
- </td>*@
- <td align="center" colspan="3" style="background-color: #F0F0F0">
- @(YearGrade[0].StarttermName)
- </td>
-
- </tr>
- <tr>
- <td align="center" style="background-color: #F0F0F0">
- 课程名
- </td>
- <td align="center" style="background-color: #F0F0F0">
- 成绩
- </td>
- <td align="center" style="background-color: #F0F0F0">
- 学分
- </td>
- </tr>
-
- @foreach (var Grade in YearGrade)
- {
- <tr>
- <td align="center" style="background-color:@(Grade.CourseTypeColour)">
- <a style=" color:Blue" href="javascript:void(0);" onclick="return LoadScore('@(Grade.CoursematerialID)',@(starttermID),'@(Grade.UserID)');">@(Grade.CourseName)</a>
- </td>
- <td align="center">@(String.Format("{0:N1}", Grade.TotalScoreStr))
- </td>
- <td align="center">
- @(Grade.ScoreCredit)
- </td>
- </tr>
- }
- </table>
- }</div>
- </div>
- <div id="display_search_list" style="display: none;">
- <div style="float: left; margin-left: 10px; line-height: 30px; font-size: 12px;">
- 成绩详细信息</div>
- <div style="margin-right: 10px; line-height: 30px; font-size: 12px;">@Html.ContextMenuBar("List")</div>
- @Html.DataGrid(new DataGridOptions
- {
- Columns = new List<DataGridColumn>()
- {
- new CheckBoxFieldColumn{ HeaderText="", FieldName="SubmitedScoreID" },
- new BoundFieldColumn { FieldName="SchoolyearCode", HeaderText="学年学期", Align=AlignStyle.Center, Width=0.06 },
- new BoundFieldColumn { FieldName="LoginID", HeaderText="学号", Align=AlignStyle.Center, Width=0.08},
- new BoundFieldColumn { FieldName="UserName", HeaderText="姓名", Align=AlignStyle.Center, Width=0.04 },
- new BoundFieldColumn { FieldName="CourseCode", HeaderText="课程代码", Align=AlignStyle.Center, Width=0.04 },
- new BoundFieldColumn { FieldName="CourseName", HeaderText="课程名称", Align=AlignStyle.Center, Width=0.1 },
- new BoundFieldColumn { FieldName="CoursetypeName", HeaderText="课程类型", Align=AlignStyle.Center, Width=0.05 },
- new BoundFieldColumn { FieldName="ExamsCategoryName", HeaderText="考试性质", Align=AlignStyle.Center, Width=0.04 },
- new BoundFieldColumn { FieldName="ExamsStateName", HeaderText="考试状态", Align=AlignStyle.Center, Width=0.04 },
- new BoundFieldColumn { FieldName="Pingshi", HeaderText=@EMIS.Utility.RSL.Get("Peacetime"), Align=AlignStyle.Center , Width=0.04},
- new BoundFieldColumn { FieldName="Jishu", HeaderText=@EMIS.Utility.RSL.Get("Technique"), Align=AlignStyle.Center, Width=0.04 },
- new BoundFieldColumn { FieldName="Lilun", HeaderText=@EMIS.Utility.RSL.Get("Theoretical"), Align=AlignStyle.Center, Width=0.04 },
- new BoundFieldColumn { FieldName="TotalScoreStr", HeaderText="总成绩", Align=AlignStyle.Center, Width=0.03, CustomFormatFun="SetRedColumn" },
- new BoundFieldColumn { FieldName="ScoreCredit", HeaderText="学分", Align=AlignStyle.Center, Width=0.02, CustomFormatFun="SetRedColumn" },
- new BoundFieldColumn { FieldName="CreateTime", HeaderText="录入时间", Align=AlignStyle.Center, Width=0.06, Formatter= Formatter.OnlyYearMonthDay, CustomFormatFun="SetRedColumn" },
- new BoundFieldColumn { FieldName="OperaUser", HeaderText="录入人", Align=AlignStyle.Center, Width=0.04 },
- new BoundFieldColumn { FieldName="StudentScoreRemark", HeaderText="备注", Align=AlignStyle.Center, Width=0.02 }
- },
- IsCheckOnSelect = false,
- DataSourceUrl = Url.Content("~/CourseGrade/GetSubmitedScoreList"),
- ID = "dgCourseScheduleSettingList",
- IsPagination = true,
- IsShowRowNumbers = true,
- IsSingleSelect = false
- })
- </div>
- </div>
-
- }
- </div>
|