@model EMIS.ViewModel.UniversityManage.AdministrativeOrgan.CampusView @using EMIS.Web.Controls; @using EMIS.Entities; @using Bowin.Web.Controls.Mvc; @{ ViewBag.Title = "Edit"; var isEnable = Request["type"] == "detail" ? false : true; //学校信息 ComboGridOptions cgopUniversity = new ComboGridOptions { TextField = "Name", ValueField = "UniversityID", IsEnabled = isEnable, GridOptions = new DataGridOptions { Columns = new List() { new LinkButtonColumn { FieldName="Code", HeaderText="学校代码", Align=AlignStyle.Center ,Width=0.12}, new BoundFieldColumn { FieldName="Name", HeaderText="学校名称", Align=AlignStyle.Center ,Width=0.3} }, PageSize = 5, IsCheckOnSelect = true, DataSourceUrl = Url.Content("~/University/List"), IsPagination = true, IsShowRowNumbers = true, IsSingleSelect = false } }; ComboGridOptions cgopGeneralsuper = new ComboGridOptions { TextField = "Name", ValueField = "UserID", IsEnabled = isEnable, GridOptions = new DataGridOptions { Columns = new List() { new LinkButtonColumn { FieldName="StaffCode", HeaderText="教职工号", Align=AlignStyle.Center ,Width=0.1}, new BoundFieldColumn { FieldName="Name", HeaderText="姓名", Align=AlignStyle.Center ,Width=0.1}, new BoundFieldColumn { FieldName="CollegeName", HeaderText=@EMIS.Utility.RSL.Get("CollegeName"), Align=AlignStyle.Center ,Width=0.3} }, PageSize = 5, IsCheckOnSelect = true, DataSourceUrl = Url.Content("~/Staff/List"), IsPagination = true, IsShowRowNumbers = true, IsSingleSelect = false } }; ComboGridOptions cgopRecruitstudents = new ComboGridOptions { TextField = "Name", ValueField = "UserID", IsEnabled = isEnable, GridOptions = new DataGridOptions { Columns = new List() { new LinkButtonColumn { FieldName="StaffCode", HeaderText="教职工号", Align=AlignStyle.Center ,Width=0.1}, new BoundFieldColumn { FieldName="Name", HeaderText="姓名", Align=AlignStyle.Center ,Width=0.1}, new BoundFieldColumn { FieldName="CollegeName", HeaderText=@EMIS.Utility.RSL.Get("CollegeName"), Align=AlignStyle.Center ,Width=0.3} }, PageSize = 5, IsCheckOnSelect = true, DataSourceUrl = Url.Content("~/Staff/List"), IsPagination = true, IsShowRowNumbers = true, IsSingleSelect = false } }; ComboGridOptions cgopPlacesuper = new ComboGridOptions { TextField = "Name", ValueField = "UserID", IsEnabled = isEnable, GridOptions = new DataGridOptions { Columns = new List() { new LinkButtonColumn { FieldName="StaffCode", HeaderText="教职工号", Align=AlignStyle.Center ,Width=0.1}, new BoundFieldColumn { FieldName="Name", HeaderText="姓名", Align=AlignStyle.Center ,Width=0.1}, new BoundFieldColumn { FieldName="CollegeName", HeaderText=@EMIS.Utility.RSL.Get("CollegeName"), Align=AlignStyle.Center ,Width=0.3} }, PageSize = 5, IsCheckOnSelect = true, DataSourceUrl = Url.Content("~/Staff/List"), IsPagination = true, IsShowRowNumbers = true, IsSingleSelect = false } }; ComboGridOptions cgopTeachingsuper = new ComboGridOptions { TextField = "Name", ValueField = "UserID", IsEnabled = isEnable, GridOptions = new DataGridOptions { Columns = new List() { new LinkButtonColumn { FieldName="StaffCode", HeaderText="教职工号", Align=AlignStyle.Center ,Width=0.1}, new BoundFieldColumn { FieldName="Name", HeaderText="姓名", Align=AlignStyle.Center ,Width=0.1}, new BoundFieldColumn { FieldName="CollegeName", HeaderText=@EMIS.Utility.RSL.Get("CollegeName"), Align=AlignStyle.Center ,Width=0.3} }, PageSize = 5, IsCheckOnSelect = true, DataSourceUrl = Url.Content("~/Staff/List"), IsPagination = true, IsShowRowNumbers = true, IsSingleSelect = false } }; ComboGridOptions cgopStudentcharge = new ComboGridOptions { TextField = "Name", ValueField = "UserID", IsEnabled = isEnable, GridOptions = new DataGridOptions { Columns = new List() { new LinkButtonColumn { FieldName="StaffCode", HeaderText="教职工号", Align=AlignStyle.Center ,Width=0.1}, new BoundFieldColumn { FieldName="Name", HeaderText="姓名", Align=AlignStyle.Center ,Width=0.1}, new BoundFieldColumn { FieldName="CollegeName", HeaderText=@EMIS.Utility.RSL.Get("CollegeName"), Align=AlignStyle.Center ,Width=0.3} }, PageSize = 5, IsCheckOnSelect = true, DataSourceUrl = Url.Content("~/Staff/List"), IsPagination = true, IsShowRowNumbers = true, IsSingleSelect = false } }; } @section scripts{ }
@using (Ajax.BeginForm(new AjaxOptions { OnSuccess = "EMISFunction.FormSuccess", OnBegin = "EMISFunction.FormSubmit", OnComplete = "EMISFunction.FormComplete" })) {
@if (Request["type"] != "detail") { @Html.ContextMenuBar("Edit") }
@Html.HiddenFor(x => x.CampusID)
@Html.LabelFor(x => x.No): @Html.TextBoxFor(x => x.No, new TextBoxOptions() { IsEnabled = isEnable }) @Html.LabelFor(x => x.Name): @Html.TextBoxFor(x => x.Name, new TextBoxOptions() { IsEnabled = isEnable })
@Html.LabelFor(x => x.SimpleName): @Html.TextBoxFor(x => x.SimpleName, new TextBoxOptions() { IsEnabled = isEnable }) @Html.LabelFor(x => x.EnglishName): @Html.TextBoxFor(x => x.EnglishName, new TextBoxOptions() { IsEnabled = isEnable })
@Html.LabelFor(x => x.UniversityName): @Html.ComboGridFor(x => x.UniversityID, cgopUniversity) @Html.LabelFor(x => x.Studentcharge): @Html.ComboGridFor(x => x.Studentcharge, cgopStudentcharge)
@Html.LabelFor(x => x.Generalsuper): @Html.ComboGridFor(x => x.Generalsuper, cgopGeneralsuper) @Html.LabelFor(x => x.Recruitstudents): @Html.ComboGridFor(x => x.Recruitstudents, cgopRecruitstudents)
@Html.LabelFor(x => x.Placesuper): @Html.ComboGridFor(x => x.Placesuper, cgopPlacesuper) @Html.LabelFor(x => x.Teachingsuper): @Html.ComboGridFor(x => x.Teachingsuper, cgopTeachingsuper)
@Html.LabelFor(x => x.ZIPCode): @Html.TextBoxFor(x => x.ZIPCode, new TextBoxOptions() { IsEnabled = isEnable }) @Html.LabelFor(x => x.Officephone): @Html.TextBoxFor(x => x.Officephone, new TextBoxOptions() { IsEnabled = isEnable })
@Html.LabelFor(x => x.FAX): @Html.TextBoxFor(x => x.FAX, new TextBoxOptions() { IsEnabled = isEnable }) @Html.LabelFor(x => x.Email): @Html.TextBoxFor(x => x.Email, new TextBoxOptions() { IsEnabled = isEnable })
@Html.LabelFor(x => x.Evolution): @if (!isEnable) { @Html.TextAreaFor(x => x.Evolution, new Dictionary { { "style", "width: 90%;min-height: 20px" }, { "disabled", "true" } }) } else { @Html.TextAreaFor(x => x.Evolution, new Dictionary { { "style", "width: 90%;min-height: 20px" } }) }
@Html.LabelFor(x => x.Remark): @if (!isEnable) { @Html.TextAreaFor(x => x.Evolution, new Dictionary { { "style", "width: 90%;min-height: 60px" }, { "disabled", "true" } }) } else { @Html.TextAreaFor(x => x.Remark, new Dictionary { { "style", "width: 90%;min-height: 60px" } }) }
}