123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261 |
- @model EMIS.ViewModel.ScoreManage.StudentScoreView
- @using EMIS.Web.Controls;
- @using Bowin.Web.Controls.Mvc;
- @{
- ViewBag.Title = "Edit";
- int row = 0;
- List<Dictionary<string, string>> listContorller = new List<Dictionary<string, string>>();
- List<Dictionary<string, string>> listDictionary = (List<Dictionary<string, string>>)ViewBag.ListDictionary;
- var scoreDynamicTypes = (IEnumerable<EMIS.Entities.Sys_DictionaryItem>)ViewBag.ScoreDynamicTypes;
- foreach (var scoreDynamicType in scoreDynamicTypes)
- {
- string name = scoreDynamicType.Name;
- Dictionary<string, string> dic = new Dictionary<string, string>();
- dic.Add(name, "Formula_" + scoreDynamicType.Value);
- listContorller.Add(dic);
- }
- listContorller.Add(new Dictionary<string, string> { { "总成绩", "TotalScore" } });
-
- //listContorller.Add(new Dictionary<string, string> { { "学分", "ScoreCredit" } });
- //listContorller.Add(new Dictionary<string, string> { { "绩点", "GradePoint" } });
- row = (int)Math.Ceiling(Convert.ToDouble(listContorller.Count) / 2);
- ComboGridOptions cgopdepartment = new ComboGridOptions
- {
- TextField = "Name",
- ValueField = "DepartmentID",
- GridOptions = new DataGridOptions
- {
- Columns = new List<DataGridColumn>()
- {
- new LinkButtonColumn { FieldName="No", HeaderText="教研室代码", Align=AlignStyle.Center },
- new BoundFieldColumn { FieldName="Name", HeaderText="教研室名称", Align=AlignStyle.Center }
- },
- IsCheckOnSelect = true,
- DataSourceUrl = Url.Content("~/Department/List"),
- IsPagination = true,
- IsShowRowNumbers = true,
- IsSingleSelect = false
- }
- };
- ComboGridOptions cgopCourse = new ComboGridOptions
- {
- TextField = "CourseName",
- ValueField = "CoursematerialID",
- GridOptions = new DataGridOptions
- {
- Columns = new List<DataGridColumn>()
- {
- new LinkButtonColumn { FieldName="CourseCode", HeaderText="课程代码", Width=0.1, Align=AlignStyle.Center },
- new BoundFieldColumn { FieldName="CourseName", HeaderText="课程名称", Width=0.3, Align=AlignStyle.Center }
- },
- IsCheckOnSelect = true,
- DataSourceUrl = Url.Content("~/Coursematerial/ListForDropdown"),
- IsPagination = true,
- IsShowRowNumbers = true,
- IsSingleSelect = false
- }
- };
- ComboGridOptions cgopUser = new ComboGridOptions
- {
- TextField = "Name",
- ValueField = "UserID",
- GridOptions = new DataGridOptions
- {
- Columns = new List<DataGridColumn>()
- {
- new LinkButtonColumn { FieldName="StaffCode", HeaderText="教职工号", Width=0.1, Align=AlignStyle.Center },
- new BoundFieldColumn { FieldName="Name", HeaderText="姓名", Width=0.3, Align=AlignStyle.Center }
- },
- IsCheckOnSelect = true,
- DataSourceUrl = Url.Content("~/Staff/List"),
- IsPagination = true,
- IsShowRowNumbers = true,
- IsSingleSelect = false
- }
- };
- ComboGridOptions cgopStudent = new ComboGridOptions
- {
- TextField = "LoginID",
- ValueField = "UserID",
- GridOptions = new DataGridOptions
- {
- Columns = new List<DataGridColumn>()
- {
- new LinkButtonColumn { FieldName="LoginID", HeaderText="学号", Width=0.2, Align=AlignStyle.Center },
- new BoundFieldColumn { FieldName="UserName", HeaderText="姓名", Width=0.1, Align=AlignStyle.Center }
- },
- IsCheckOnSelect = true,
- DataSourceUrl = Url.Content("~/Students/List"),
- IsPagination = true,
- IsShowRowNumbers = true,
- IsSingleSelect = false
- }
- };
- }
- <style type="text/css">
- #studentScoretable {
- width: 100%;
- border: 0px none;
- }
- #studentScoretable tr {
- min-height: 30px;
- }
- </style>
- @section scripts{
- <script src="~/Scripts/Business/ScoreManage/StudentScoreEdit.js" type="text/javascript"></script>
- }
- <div class="easyui-panel" data-options="border:false,fit:true" style="position: relative;">
- @using (Ajax.BeginForm(new AjaxOptions
- {
- OnSuccess = "EMISFunction.FormSuccess",
- OnBegin = "EMISFunction.FormSubmit",
- OnComplete = "EMISFunction.FormComplete"
- }))
- {
- <div class="p_title">
- <div style="float: left; margin-left: 10px; line-height: 30px; font-size: 12px;">
- 学生成绩信息
- </div>
- @if (Request["isView"] != "1")
- {
- <div style="margin-right: 10px; line-height: 30px; font-size: 12px;">@Html.ContextMenuBar("Edit")</div>
- }
- </div>
- <div class="search_list">
- @Html.HiddenFor(x => x.SubmitedScoreID)
- <table cellpadding="0" cellspacing="0" id="studentScoretable">
- <tr>
- <td>@Html.LabelFor(x => x.LoginID):
- </td>
- <td>@Html.ComboGridFor(x => x.UserID, cgopStudent)
- </td>
- <td>@Html.LabelFor(x => x.ClassName):
- </td>
- <td>@Html.TextBoxFor(x => x.ClassName)
- </td>
- </tr>
- <tr>
- <td>@Html.LabelFor(x => x.SchoolyearID):
- </td>
- <td>@Html.DropdownListFor(x => x.SchoolyearID, new DropdownListOptions { BindType = DropdownListBindType.SelectAll, ItemSourceUrl = Url.Content("~/SchoolYear/YearsDropdownListBanid") })
- </td>
- <td>@Html.LabelFor(x => x.DepartmentID):
- </td>
- <td>@Html.ComboGridFor(x => x.DepartmentID, cgopdepartment)
- </td>
- </tr>
- <tr>
- <td>@Html.LabelFor(x => x.CoursematerialID):
- </td>
- <td>@Html.ComboGridFor(x => x.CoursematerialID, cgopCourse)
- </td>
- <td>@Html.LabelFor(x => x.SchoolyearNumID):
- </td>
- <td>@Html.DictionaryDropDownListFor(EMIS.ViewModel.DictionaryItem.CF_SchoolyearNum, x => x.SchoolyearNumID, new DropdownListOptions { OnSelect = "selectSchoolyearNum" })
- </td>
- </tr>
- <tr>
- <td>@Html.LabelFor(x => x.CourseTypeID):
- </td>
- <td>@Html.DictionaryDropDownListFor(EMIS.ViewModel.DictionaryItem.CF_CourseType, x => x.CourseTypeID)
- </td>
- <td>@Html.LabelFor(x => x.ExamsCategoryID):
- </td>
- <td>@Html.DictionaryDropDownListFor(EMIS.ViewModel.DictionaryItem.CF_ExamsCategory, x => x.ExamsCategoryID)
- </td>
- </tr>
- <tr>
- <td>@Html.LabelFor(x => x.ExaminationModeID):
- </td>
- <td>@Html.DictionaryDropDownListFor(EMIS.ViewModel.DictionaryItem.CF_ExaminationMode, (x => x.ExaminationModeID))
- </td>
- <td>@Html.LabelFor(x => x.Credit):
- </td>
- <td>
- @Html.TextBoxFor(x => x.Credit)
- </td>
- </tr>
- <tr>
- <td>@Html.LabelFor(x => x.ExamsDatetime):
- </td>
- <td>@Html.TextBoxFor(x => x.ExamsDatetime, new TextBoxOptions { TextBoxType = TextBoxType.Date })
- </td>
- <td></td>
- <td></td>
- @* <td>@Html.LabelFor(x => x.ResultTypeID):
- </td>
- <td>@Html.DictionaryDropDownListFor(EMIS.ViewModel.DictionaryItem.CF_ResultType, (x => x.ResultTypeID))
- </td>*@
- </tr>
- <tr>
- <td>@Html.LabelFor(x => x.CreatorUserID):
- </td>
- <td>@Html.ComboGridFor(x => x.CreatorUserID, cgopUser)
- </td>
- <td>@Html.LabelFor(x => x.EntryDeadlineTime):
- </td>
- <td>@Html.TextBoxFor(x => x.EntryDeadlineTime, new TextBoxOptions { TextBoxType = TextBoxType.Date })
- </td>
- </tr>
- <tr>
- <td>
- @Html.LabelFor(x => x.StarttermID):
- </td>
- <td>
- @Html.DictionaryDropDownListFor(EMIS.ViewModel.DictionaryItem.CF_Startterm, (x => x.StarttermID), new DropdownListOptions { OnSelect = "selectStartTerm" })
- </td>
- <td>
- @Html.LabelFor(x => x.ExamsStateID):
- </td>
- <td>
- @Html.DictionaryDropDownListFor(EMIS.ViewModel.DictionaryItem.CF_ExamsState, (x => x.ExamsStateID))
- </td>
- </tr>
- @for (int i = 0; i < row; i++)
- {
- <tr>
- @for (int j = 0; j < 2; j++)
- {
- int h = i * 2 - j;
- if (j % 2 != 0)
- {
- h = i * 2 - j + 2;
- }
- foreach (KeyValuePair<string, string> item in listContorller[h])
- {
- string value = listDictionary[h][item.Value];
- <td>
- <label>@item.Key:</label></td>
- <td>
- @if (item.Key != "总成绩")
- {
- <input type="text" name="@item.Value" value="@value" data-value-required="必须输入@(item.Key)分数" data-val="true" data-val-regex-pattern="^\d+(\.\d{1,2})?$" data-val-regex="请输入数字分数,最多保留2位小数" /><span style="color: Red;">*</span>
- }
- else
- {
- <input type="text" name="@item.Value" value="@value" data-value-required="必须输入@(item.Key)分数" data-val="true" data-val-regex-pattern="^\d+(\.0{1,2})?$" data-val-regex="请输整数分数" /><span style="color: Red;">*</span>
- }
- </td>
- }
- }
- </tr>
- }
- <tr>
- <td>@Html.LabelFor(x => x.ResultTypeID):</td>
- <td colspan="3">@Html.DictionaryDropDownListFor(EMIS.ViewModel.DictionaryItem.CF_ResultType, (x => x.ResultTypeID))</td>
- </tr>
- <tr>
- <td>@Html.LabelFor(x => x.StudentScoreRemark):</td>
- <td colspan="3">@Html.TextAreaFor(x => x.StudentScoreRemark, new Dictionary<string, object> { { "style", "width:500px;" } })</td>
- </tr>
- </table>
- </div>
- }
- </div>
|