123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177 |
- @model EMIS.ViewModel.ScoreManage.FinalExaminationView
- @using Bowin.Web.Controls.Mvc;
- @using EMIS.Entities;
- @using EMIS.Web.Controls;
- @{
- ViewBag.Title = "成绩录入信息";
- string ScoreFormulaID = ViewBag.ScoreFormulaID;
- bool IsTotalFormula = ViewBag.IsTotalFormula;
- string CreditFormulaID = ViewBag.CreditFormulaID;
- bool IsCreditFormula = ViewBag.IsCreditFormula;
- string GradePointFormulaID = ViewBag.GradePointFormulaID;
- bool IsGradePointFormula = ViewBag.IsGradePointFormula;
- string formulaColumns = string.Empty; //获取动态列
-
- var gridOptions = new DataGridOptions
- {
- Columns = new List<DataGridColumn>()
- {
- new BoundFieldColumn{ HeaderText="", FieldName="FinalExaminationID",IsHidden=true },
- new BoundFieldColumn{ HeaderText="", FieldName="ScoreID",IsHidden=true },
- new BoundFieldColumn{ HeaderText="", FieldName="UserID",IsHidden=true },
- new BoundFieldColumn { FieldName="No", HeaderText="序号", Align=AlignStyle.Center, Width=0.03 ,CustomFormatFun = "LoginIDColor" },
- new BoundFieldColumn { FieldName="LoginID", HeaderText="学号", Align=AlignStyle.Center, Width=0.1 ,CustomFormatFun = "LoginIDColor" },
- new BoundFieldColumn { FieldName="UserName", HeaderText="姓名", Align=AlignStyle.Center, Width=0.04 ,CustomFormatFun = "UserNameColor" },
- new BoundFieldColumn { FieldName="ExamsCategoryName", HeaderText="考试性质", Align=AlignStyle.Center, Width=0.05 ,CustomFormatFun = "ExamsCategoryNameColor" },
- new BoundFieldColumn{ HeaderText="状态", FieldName="RecordStatus", Width=0.02, IsHidden=true },
- },
- IsCheckOnSelect = true,
- DataSourceUrl = Url.Content("~/Score/GTStudentSelect?finalExaminationID=" + Model.FinalExaminationID),
- ID = "dgScoreDetailList",
- IsPagination = false,
- IsShowRowNumbers = false,
- IsSingleSelect = false,
- IsPostBack = true,
- MaxHeight = 250
- };
- var scoreDynamicTypes = (IEnumerable<Sys_DictionaryItem>)ViewBag.ScoreDynamicTypes;
- var Peacetime = ViewBag.Peacetime;
- foreach (var item in scoreDynamicTypes)
- {
- formulaColumns += "Formula_" + item.Value.ToString() + ",";
- gridOptions.Columns.Add(new TextBoxColumn
- {
- FieldName = "Formula_" + item.Value.ToString(),
- HeaderText = item.Name,
- Align = AlignStyle.Center,
- Width = 0.04,
- EnableFieldName = Request["Isdisplay"] == "" || Request["Isdisplay"] == null ? "CanEdit" : "false",
- Validator = new OnlyMoneyValidator() { Required = false }
- });
- }
- gridOptions.Columns.Add(new BoundFieldColumn { FieldName = "TotalScore", HeaderText = "总成绩", Align = AlignStyle.Center, Width = 0.04, CustomFormatFun = "TotalScoreColor" });
- gridOptions.Columns.Add(new BoundFieldColumn { FieldName = "Credit", HeaderText = "学分", Align = AlignStyle.Center, Width = 0.03, CustomFormatFun = "CreditColor", Formatter = Formatter.OnlyYearMonthDay });
- gridOptions.Columns.Add(new BoundFieldColumn { FieldName = "GradePoint", HeaderText = "绩点", Align = AlignStyle.Center, Width = 0.03, CustomFormatFun = "GradePointColor" });
- gridOptions.Columns.Add(new DictionaryDropdownListColumn
- {
- FieldName = "ExamsStateID",
- HeaderText = "考试状态",
- Align = AlignStyle.Center,
- EnableFieldName = Request["Isdisplay"] == "" || Request["Isdisplay"] == null ? "CanEdit" : "false",
- DictionaryType = EMIS.ViewModel.DictionaryItem.CF_ExamsState,
- Width=0.07
- });
- if (Request["Isdisplay"] == "" || Request["Isdisplay"] == null)
- {
- gridOptions.Columns.Add(new TextBoxColumn { FieldName = "Remarks", HeaderText = "备注", Align = AlignStyle.Center, Width=0.1 });
- }
- else
- {
- gridOptions.Columns.Add(new BoundFieldColumn { FieldName = "Remarks", HeaderText = "备注", Align = AlignStyle.Center, Width = 0.1 });
- }
- gridOptions.Columns.Add(new TextBoxColumn { FieldName = "IsDifferentDynamic", HeaderText = "是否异动", Align = AlignStyle.Center, Width = 0.04, IsHidden = true });
- }
- @section scripts{
- <script src="~/Scripts/Business/ScoreManage/GTScoreEdit.js" type="text/javascript"></script>
- <script type="text/javascript">
- function LoginIDColor(index, row, value) {
- if (row.IsDifferentDynamic == true) {
- return " <span style=\"color:red;\">" + value + "</span>";
- }
- else {
- return value
- }
- }
- function UserNameColor(index, row, value) {
- if (row.IsDifferentDynamic == true) {
- return " <span style=\"color:red;\">" + value + "</span>";
- }
- else {
- return value
- }
- }
- function ExamsCategoryNameColor(index, row, value) {
- if (row.IsDifferentDynamic == true) {
- return " <span style=\"color:red;\">" + value + "</span>";
- }
- else {
- return value
- }
- }
- function TotalScoreColor(index, row, value) {
- if (row.IsDifferentDynamic == true) {
- return " <span style=\"color:red;\">" + value + "</span>";
- }
- else {
- return value
- }
- }
- function CreditColor(index, row, value) {
- if (row.IsDifferentDynamic == true) {
- return " <span style=\"color:red;\">" + value + "</span>";
- }
- else {
- return value
- }
- }
- function GradePointColor(index, row, value) {
- if (row.IsDifferentDynamic == true) {
- return " <span style=\"color:red;\">" + value + "</span>";
- }
- else {
- return value
- }
- }
- </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["Isdisplay"] == "" || Request["Isdisplay"] == null)
- {
- <div style="margin-right: 10px; line-height: 30px; font-size: 12px;">@Html.ContextMenuBar("GTEdit")</div>
- }
- </div>
- <div class="search_list">
- @Html.HiddenFor(x => x.FinalExaminationID)
- @Html.Hidden("hid_FormulaColumns", formulaColumns)
- @Html.HiddenFor(x => x.Credit)
- <table cellpadding="0" cellspacing="0" id="buildingstable">
- <tr>
- <td>@Html.LabelFor(x => x.SchoolyearID):</td>
- <td>@Html.TextBoxFor(x => x.SchoolyearCode, new TextBoxOptions { IsEnabled = false })</td>
- <td>@Html.LabelFor(x => x.CourseName):</td>
- <td>@Html.TextBoxFor(x => x.CourseName, new TextBoxOptions { IsEnabled = false })</td>
- </tr>
- <tr>
- <td colspan="4" style=" text-align:left; font-weight:bold; font-size:12px; height:20px;"><label>成绩公式设置</label></td>
- </tr>
- <tr>
- <td style=" text-align:center; font-weight:bold; height:20px;"><label>考试性质</label></td>
- <td style=" text-align:center; font-weight:bold; height:20px;"><label>总成绩公式</label></td>
- <td style=" text-align:center; font-weight:bold; height:20px;"><label>学分公式</label></td>
- <td style=" text-align:center; font-weight:bold; height:20px;"><label>绩点公式</label></td>
- </tr>
- <tr>
- <td style=" text-align:center;">@Model.ExamsCategoryName</td>
- <td style=" text-align:left;">@Html.DropdownList(new DropdownListOptions { BindType = DropdownListBindType.None, SelectedValue = ScoreFormulaID, IsEnabled = IsTotalFormula, ItemSourceUrl = Url.Content("~/ScoreFormula/ScoreFormulaDataJosnBind"), ID = "ScoreFormulaDropdownList", Name = "ScoreFormulaDropdownList", Width=230 })</td>
- <td style=" text-align:left;">@Html.DropdownList(new DropdownListOptions { BindType = DropdownListBindType.None, SelectedValue = CreditFormulaID, IsEnabled = IsCreditFormula, ItemSourceUrl = Url.Content("~/CreditFormula/CreditFormulaDataJsonBind"), ID = "CreditFormulaDropdownList", Name = "CreditFormulaDropdownList", Width=230 })</td>
- <td style=" text-align:left;">@Html.DropdownList(new DropdownListOptions { BindType = DropdownListBindType.None, SelectedValue = GradePointFormulaID, IsEnabled = IsGradePointFormula, ItemSourceUrl = Url.Content("~/GradePointFormula/GradePointFormulaDataJsonBind"), ID = "GradePointFormulaDropdownList", Name = "GradePointFormulaDropdownList", Width=230 })</td>
- </tr>
- <tr>
- <td colspan="4">
- @Html.DataGrid(gridOptions)
- </td>
- </tr>
- <tr>
- <td><label>总评语:</label></td>
- <td colspan="3">@Html.TextAreaFor(x => x.Comment, new Dictionary<string, object> { { "style", "width:90%; height:12px;" } })</td>
- </tr>
- </table>
- </div>
- }
- </div>
|