@model EMIS.ViewModel.UniversityManage.AdministrativeOrgan.CollegeView @using EMIS.Web.Controls; @using Bowin.Web.Controls.Mvc; @{ ViewBag.Title = "Edit"; var isEnable = Request["type"] == "detail" ? false : true; //校区 ComboGridOptions cgopCampus = new ComboGridOptions { TextField = "Name", ValueField = "CampusID", IsEnabled = isEnable, GridOptions = new DataGridOptions { Columns = new List() { new LinkButtonColumn { FieldName="No", HeaderText=@EMIS.Utility.RSL.Get("CampusCode"), Align=AlignStyle.Center ,Width=0.1 }, new BoundFieldColumn { FieldName="Name", HeaderText=@EMIS.Utility.RSL.Get("CampusName"), Align=AlignStyle.Center ,Width=0.2 } }, PageSize = 5, IsCheckOnSelect = true, DataSourceUrl = Url.Content("~/Campus/List"), IsPagination = true, IsShowRowNumbers = true, IsSingleSelect = false } }; ComboGridOptions cgopPoliticalManager = 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.2 } }, PageSize = 5, IsCheckOnSelect = true, DataSourceUrl = Url.Content("~/Staff/List"), IsPagination = true, IsShowRowNumbers = true, IsSingleSelect = false } }; ComboGridOptions cgopAdministrativeManager = 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.2 } }, 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.CollegeID)
@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.CampusName): @Html.ComboGridFor(x => x.CampusID, cgopCampus) @Html.LabelFor(x => x.UnitCategoryName): @Html.DictionaryComboGridFor(EMIS.ViewModel.DictionaryItem.CF_UnitCategory, (x => x.UnitCategoryID), DropdownListBindType.PleaseSelect, new ComboGridOptions() { IsEnabled = isEnable })
@Html.LabelFor(x => x.PoliticalManagerName): @Html.ComboGridFor(x => x.PoliticalManager, cgopPoliticalManager) @Html.LabelFor(x => x.AdministrativeManagerName): @Html.ComboGridFor(x => x.AdministrativeManager, cgopAdministrativeManager)
@Html.LabelFor(x => x.FoundDate): @Html.TextBoxFor(x => x.FoundDate, new TextBoxOptions() { TextBoxType = TextBoxType.Date, IsEnabled = isEnable }) @Html.LabelFor(x => x.Officephone): @Html.TextBoxFor(x => x.Officephone, new TextBoxOptions() { IsEnabled = isEnable })
@Html.LabelFor(x => x.Remark): @if (!isEnable) { @Html.TextAreaFor(x => x.Remark, new Dictionary { { "style", "width: 90%;min-height: 60px" }, { "disabled", "true" } }) } else { @Html.TextAreaFor(x => x.Remark, new Dictionary { { "style", "width: 90%;min-height: 60px" } }) }
}