123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309 |
- @model EMIS.ViewModel.ScoreManage.SubmitedScoreDetailView
- @using EMIS.Web.Controls;
- @using Bowin.Web.Controls.Mvc;
- @{
- ViewBag.Title = "Edit";
-
- ComboGridOptions cgop = new ComboGridOptions
- {
- TextField = "LoginID",
- ValueField = "UserID",
- OnSelect = "StudentChange",
- GridOptions = new DataGridOptions
- {
- Columns = new List<DataGridColumn>()
- {
- new LinkButtonColumn { FieldName="LoginID", HeaderText="学号", Width=0.25, 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
- }
- };
- if (Request["atype"] != "1")
- {
- cgop = new ComboGridOptions
- {
- TextField = "LoginID",
- ValueField = "UserID",
- IsEnabled=false,
- OnSelect = "StudentChange",
- GridOptions = new DataGridOptions
- {
- Columns = new List<DataGridColumn>()
- {
- new LinkButtonColumn { FieldName="LoginID", HeaderText="学号", Width=0.25, 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
- }
- };
- }
- 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;
- var resultTypeDetailID = ViewBag.ResultTypeDetailID;
- var percentage = ViewBag.Percentage;
- 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="教研室代码", Width = 0.1, Align=AlignStyle.Center },
- new BoundFieldColumn { FieldName="Name", HeaderText="教研室名称", Width = 0.2, Align=AlignStyle.Center }
- },
- IsCheckOnSelect = true,
- DataSourceUrl = Url.Content("~/Department/List"),
- IsPagination = true,
- IsShowRowNumbers = true,
- IsSingleSelect = false
- }
- };
- ComboGridOptions cgopCourse = new ComboGridOptions
- {
- TextField = "CourseName",
- ValueField = "CoursematerialID",
- //IsEnabled = false,
- 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.25, Align=AlignStyle.Center },
- new BoundFieldColumn { FieldName="Name", HeaderText="姓名", Width=0.1, Align=AlignStyle.Center }
- },
- IsCheckOnSelect = true,
- DataSourceUrl = Url.Content("~/Staff/List"),
- IsPagination = true,
- IsShowRowNumbers = true,
- IsSingleSelect = false
- }
- };
- ComboGridOptions cgopresultType = new ComboGridOptions
- {
- TextField = "Name",
- ValueField = "ResultTypeDetailID",
- 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("~/PersonalScore/GetTypeNameByID?typeID=" + Model.ResultTypeID),
- IsPagination = true,
- IsShowRowNumbers = true,
- IsSingleSelect = false,
- OnLoadSuccessFun = "setValue",
- },
- };
- ComboGridOptions cgopStartterm = new ComboGridOptions
- {
- TextField = "StarttermName",
- ValueField = "StarttermID",
- GridOptions = new DataGridOptions
- {
- Columns = new List<DataGridColumn>()
- {
- new BoundFieldColumn { FieldName="StarttermName", HeaderText="开课学期", Width=0.3, Align=AlignStyle.Center }
- },
- IsCheckOnSelect = true,
- DataSourceUrl = Url.Content("~/StudentScore/BindDropdownListBySchoolyearNum"),
- IsPagination = true,
- IsShowRowNumbers = true,
- IsSingleSelect = false
- }
- };
- }
- @section scripts{
- <script type="text/javascript" src="~/Scripts/Business/ScoreManage/PersonalScoreEdit.js"></script>
- <script type="text/javascript">
- var nonSelect = "@DropdownList.SELECT_ALL";
- </script>
- }
- <style type="text/css">
- #submitedScoretable {
- width: 100%;
- border: 0px none;
- }
- #submitedScoretable tr {
- min-height: 30px;
- }
- </style>
- <div class="easyui-panel" data-options="border:false,fit:true" style="position: relative;">
- @using (Ajax.BeginForm(new AjaxOptions
- {
- OnSuccess = "EMISFunction.FormSuccessNoClose",
- 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)
- @if (Request["atype"] != "1")
- {
- @Html.HiddenFor(x => x.UserID)
- }
- @Html.Hidden("hid_atype", Request["atype"])
- @Html.Hidden("hid_SaveType", Request["SaveType"])
- <input type = "hidden" id = "rTD" value = @resultTypeDetailID />
- <table cellpadding="0" cellspacing="0" id="submitedScoretable">
- <tr>
- <td>@Html.LabelFor(x => x.LoginID):
- </td>
- <td>@Html.ComboGridFor(x => x.UserID, cgop)
- </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.SchoolyearNumID):</td>
- <td>@Html.DictionaryDropDownListFor(EMIS.ViewModel.DictionaryItem.CF_SchoolyearNum, (x => x.SchoolyearNumID), new DropdownListOptions { OnSelect = "queryClass" })</td>
-
- </tr>
- <tr>
- <td>@Html.LabelFor(x => x.StarttermID):</td>
- <td>@Html.DropdownListFor(x => x.StarttermID, new DropdownListOptions { BindType = DropdownListBindType.PleaseSelect, ItemSourceUrl = Url.Content("~/StudentScore/BindDropdownListBySchoolyearNum") })@*
- @Html.DictionaryDropDownListFor(EMIS.ViewModel.DictionaryItem.CF_Startterm, (x => x.StarttermID))*@</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.CourseTypeID):</td>
- <td>@Html.DictionaryDropDownListFor(EMIS.ViewModel.DictionaryItem.CF_CourseType, (x => x.CourseTypeID))</td>
- </tr>
- <tr>
- <td>@Html.LabelFor(x => x.ExamsCategoryID):</td>
- <td>@Html.DictionaryDropDownListFor(EMIS.ViewModel.DictionaryItem.CF_ExamsCategory, (x => x.ExamsCategoryID))</td>
-
- <td>@Html.LabelFor(x => x.ExaminationModeID):</td>
- <td>@Html.DictionaryDropDownListFor( EMIS.ViewModel.DictionaryItem.CF_ExaminationMode, (x => x.ExaminationModeID))</td>
- </tr>
- <tr>
- <td>@Html.LabelFor(x => x.Credit):</td>
- <td>@Html.TextBoxFor(x => x.Credit)</td>
-
-
- <td>@Html.LabelFor(x => x.ExamsDatetime):</td>
- <td>@Html.TextBoxFor(x => x.ExamsDatetime, new TextBoxOptions { TextBoxType = TextBoxType.Date })</td>
- </tr>
- <tr>
- <td>@Html.LabelFor(x => x.CreatorUserID):</td>
- <td>@Html.ComboGridFor(x => x.CreatorUserID, cgopUser)</td>
-
-
- <td>@Html.LabelFor(x => x.ExamsStateID):</td>
- <td>@Html.DictionaryDropDownListFor(EMIS.ViewModel.DictionaryItem.CF_ExamsState, (x => x.ExamsStateID), new DropdownListOptions { BindType = DropdownListBindType.PleaseSelect, Name = "ExamsStateID", ID = "ExamsStateID", OnSelect = "ExamsStateChange" })</td>
-
-
- </tr>
- <tr>
- <td>@Html.LabelFor(x => x.ResultTypeID):</td>
- <td colspan="3">@Html.DictionaryDropDownListFor(EMIS.ViewModel.DictionaryItem.CF_ResultType, x => x.ResultTypeID, new DropdownListOptions { BindType = DropdownListBindType.PleaseSelect, Name = "ResultTypeID", ID = "ResultTypeID", OnSelect = "ResultTypeChange" })</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-val="true" data-val-regex-pattern="^\d+(\.\d{1,2})?$" data-val-regex="请输入数字分数,最多保留2位小数" />
- }
- else
- {
- @Html.DropdownListFor(x => x.ResultTypeDetailID, new DropdownListOptions { BindType = DropdownListBindType.PleaseSelect, ItemSourceUrl = Url.Content("~/PersonalScore/GetTypeNameByID?typeID=" + @Model.ResultTypeID), TextField = "Name", ValueField = "ResultTypeDetailID" })
- <input type="text" name="@item.Value" value="@value" data-value-required="必须输入@(item.Key)分数" data-val="true" data-val-regex-pattern="@(Model.TotalScorePattern)" data-val-regex="@(Model.TotalScorePatternError)" /><span style="color: Red;">*</span>
- }
- </td>
- }
- }
- </tr>
- }
- <tr>
- <td>@Html.LabelFor(x => x.Remark):</td>
- <td colspan="3">@Html.TextAreaFor(x => x.Remark, new Dictionary<string, object> { { "style", "width:80%; min-height:60px" } })</td>
- </tr>
- </table>
- </div>
- }
- </div>
|