@model EMIS.ViewModel.UniversityManage.ClassroomManage.BuildingsInfoView @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.12 } }, PageSize = 5, IsCheckOnSelect = true, DataSourceUrl = Url.Content("~/Campus/List"), IsPagination = true, IsShowRowNumbers = true, IsSingleSelect = false, } }; //院系所 ComboGridOptions cgopCollege = new ComboGridOptions { TextField = "Name", ValueField = "CollegeID", IsEnabled = isEnable, GridOptions = new DataGridOptions { Columns = new List() { new LinkButtonColumn { FieldName="No", HeaderText=@EMIS.Utility.RSL.Get("CollegeCode"), Align=AlignStyle.Center, Width=0.1 }, new BoundFieldColumn { FieldName="Name", HeaderText=@EMIS.Utility.RSL.Get("CollegeName"), Align=AlignStyle.Center, Width=0.3 }, new BoundFieldColumn { FieldName="CampusName", HeaderText=@EMIS.Utility.RSL.Get("CampusName"), Align=AlignStyle.Center, Width=0.3 } }, PageSize = 5, IsCheckOnSelect = true, //DataSourceUrl = Url.Content("~/College/ListOnlyCollege"), DataSourceUrl = Url.Content("~/College/ListWithoutRange"), 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.BuildingsInfoID)
@Html.LabelFor(x => x.Code): @Html.TextBoxFor(x => x.Code, new TextBoxOptions() { IsEnabled = isEnable }) @Html.LabelFor(x => x.Name): @Html.TextBoxFor(x => x.Name, new TextBoxOptions() { IsEnabled = isEnable })
@Html.LabelFor(x => x.CampusID): @Html.ComboGridFor(x => x.CampusID, cgopCampus) @Html.LabelFor(x => x.BuildingsTypeID): @*@Html.DictionaryDropDownListFor(EMIS.ViewModel.DictionaryItem.CF_BuildingsType, (x => x.BuildingsTypeID), new DropdownListOptions() { IsEnabled = isEnable })*@ @Html.DictionaryComboGridFor(EMIS.ViewModel.DictionaryItem.CF_BuildingsType, x => x.BuildingsTypeID, DropdownListBindType.PleaseSelect, new ComboGridOptions() { IsEnabled = isEnable })
@Html.LabelFor(x => x.BuildingsStatusID): @*@Html.DictionaryDropDownListFor(EMIS.ViewModel.DictionaryItem.CF_BuildingsStatus, (x => x.BuildingsStatusID), new DropdownListOptions() { IsEnabled = isEnable })*@ @Html.DictionaryComboGridFor(EMIS.ViewModel.DictionaryItem.CF_BuildingsStatus, x => x.BuildingsStatusID, DropdownListBindType.PleaseSelect, new ComboGridOptions() { IsEnabled = isEnable }) @Html.LabelFor(x => x.CollegeID): @Html.ComboGridFor(x => x.CollegeID, cgopCollege)
@Html.LabelFor(x => x.BuildingsLevel): @Html.TextBoxFor(x => x.BuildingsLevel, new TextBoxOptions() { IsEnabled = isEnable }) @Html.LabelFor(x => x.BuildingsArea): @Html.TextBoxFor(x => x.BuildingsArea, new TextBoxOptions() { IsEnabled = isEnable })
@Html.LabelFor(x => x.UseArea): @Html.TextBoxFor(x => x.UseArea, new TextBoxOptions() { IsEnabled = isEnable }) @Html.LabelFor(x => x.IsSpecial): @if (!isEnable) { @Html.CheckBoxFor(x => x.IsSpecial, new Dictionary() { { "disabled", isEnable } }) } else { @Html.CheckBoxFor(x => x.IsSpecial) }
@Html.LabelFor(x => x.Position): @if (!isEnable) { @Html.TextAreaFor(x => x.Position, new Dictionary { { "style", "width: 90%;min-height: 20px" }, { "disabled", "true" } }) } else { @Html.TextAreaFor(x => x.Position, new Dictionary { { "style", "width: 90%;min-height: 20px" } }) }
@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" } }) }
}