@model EMIS.ViewModel.EducationSchedule.ClassroomExcessiveUseView @using EMIS.Web.Controls; @using Bowin.Web.Controls.Mvc; @{ ViewBag.Title = "Edit"; ComboGridOptions optClassroom = new ComboGridOptions { TextField = "Name", ValueField = "ClassroomID", GridOptions = new DataGridOptions { Columns = new List() { new BoundFieldColumn { FieldName="Name", HeaderText="教室名称", Align=AlignStyle.Center } }, IsCheckOnSelect = true, DataSourceUrl = Url.Content("~/Classroom/ListIsEnable"), IsPagination = true, IsShowRowNumbers = true, IsSingleSelect = false, } }; ComboGridOptions optCollege = new ComboGridOptions { TextField = "Name", ValueField = "CollegeID", GridOptions = new DataGridOptions { Columns = new List() { new BoundFieldColumn { FieldName="Name", HeaderText=EMIS.Utility.RSL.Get("CollegeName"), Align=AlignStyle.Center } }, IsCheckOnSelect = true, DataSourceUrl = Url.Content("~/College/List"), IsPagination = true, IsShowRowNumbers = true, IsSingleSelect = false, } }; ComboGridOptions optUser = new ComboGridOptions { TextField = "Name", ValueField = "UserID", 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.12 } }, IsCheckOnSelect = true, DataSourceUrl = Url.Content("~/Staff/GetAllStaffDataBind"), IsPagination = true, IsShowRowNumbers = true, IsSingleSelect = false } }; } @section scripts{ }
@using (Ajax.BeginForm(new AjaxOptions { OnSuccess = "FormSuccess", OnBegin = "EMISFunction.FormSubmit", OnComplete = "EMISFunction.FormComplete" })) { @Html.HiddenFor(x => x.ClassroomExcessiveUseID)
@Html.ContextMenuBar("Edit")
@Html.LabelFor(x => x.SchoolyearID): @Html.DropdownListFor((x => x.SchoolyearID), new DropdownListOptions { BindType = DropdownListBindType.SelectAll, ItemSourceUrl = Url.Content("~/SchoolYear/DropDown"), IsEnabled = false }) @Html.LabelFor(x => x.ClassroomID): @Html.ComboGridFor((x => x.ClassroomID), optClassroom)
@Html.LabelFor(x => x.CollegeID): @Html.ComboGridFor(x => x.CollegeID, optCollege) @Html.LabelFor(x => x.UserID): @Html.ComboGridFor(x => x.UserID, optUser)
@Html.LabelFor(x => x.Content): @Html.TextAreaFor(x => x.Content, new Dictionary { { "style", "width: 96%;" } })
@Html.LabelFor(x => x.Scheduling): @Html.ContextMenuBar("Edit-SchedulingGrid") @Html.DataGrid(new DataGridOptions { Columns = new List() { new CheckBoxFieldColumn { HeaderText="", FieldName="ClassroomExcessiveUseSchedulingID" }, new BoundFieldColumn { HeaderText="周次", FieldName="WeekNumList", CustomFormatFun="CMSFunction.DataTableFormatter.WeekNum", Align=AlignStyle.Center, Width=80 }, new LinkButtonColumn { HeaderText="星期", FieldName="WeekdayDesc", Align=AlignStyle.Center, Width=80, Handle="Scheduling_Edit" }, new BoundFieldColumn { HeaderText="节次", FieldName="TimeDesc", Align=AlignStyle.Center, Width=80 }, }, IsPostBack = true, IsCheckOnSelect = true, DataSourceUrl = Url.Content("~/ClassroomExcessiveUse/SchedulingList?classroomExcessiveUseID=" + Model.ClassroomExcessiveUseID), ID = "dgSchedulingList", IsPagination = false, IsShowRowNumbers = true, IsSingleSelect = false, MaxHeight = 120 })
}