@model EMIS.ViewModel.UniversityManage.TeacherManage.StaffView @using EMIS.Web.Controls; @using Bowin.Web.Controls.Mvc; @{ ViewBag.Title = "Edit"; var isEnable = Request["type"] == "detail" ? false : true; //院系所 ComboGridOptions cgopCollege = new ComboGridOptions { TextField = "Name", ValueField = "CollegeID", OnSelect = "queryCollege", 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/List"), IsPagination = true, IsShowRowNumbers = true, IsSingleSelect = false } }; //教研室 ComboGridOptions cgopDepartment = new ComboGridOptions { TextField = "Name", ValueField = "DepartmentID", OnSelect = "queryDepartment", IsEnabled = isEnable, GridOptions = new DataGridOptions { Columns = new List() { new LinkButtonColumn { FieldName="No", HeaderText="教研室代码", Align=AlignStyle.Center, Width=0.1 }, new BoundFieldColumn { FieldName="Name", HeaderText="教研室名称", Align=AlignStyle.Center, Width=0.2 }, new BoundFieldColumn { FieldName="CollegeName", HeaderText=@EMIS.Utility.RSL.Get("CollegeName"), Align=AlignStyle.Center, Width=0.2 } }, PageSize = 5, IsCheckOnSelect = true, DataSourceUrl = Url.Content("~/Department/List"), IsPagination = true, IsShowRowNumbers = true, IsSingleSelect = false } }; } @section scripts{ }
@using (Html.BeginForm("Edit", "Staff", new { MNU = Request["MNU"], WindowID = Request["WindowID"] }, FormMethod.Post, new { enctype = "multipart/form-data" })) {
@if (Request["type"] != "detail") { @Html.ContextMenuBar("Edit") }
@Html.HiddenFor(x => x.UserID) @if (Request["type"] == "add" || Request["type"] == "copyAdd") { @Html.Hidden("CollegeDropdown", null) @Html.Hidden("DepartmentDropdown", null) } else { @Html.Hidden("CollegeDropdown", Model.CollegeID) @Html.Hidden("DepartmentDropdown", Model.DepartmentID) }
@Html.LabelFor(x => x.StaffCode): @Html.TextBoxFor(x => x.StaffCode, new TextBoxOptions() { IsEnabled = isEnable }) @Html.LabelFor(x => x.PhotoUrl):
@if (isEnable) { if (Request["type"] == "edit") { @Html.SingleUploaderFor(x => x.PhotoUrl, new Dictionary { { "style", "width:125px;" } }) } else { @Html.SingleUploaderFor(x => x.PhotoUrl, new Dictionary { { "style", "width:175px;" } }) } }
@Html.LabelFor(x => x.Name): @Html.TextBoxFor(x => x.Name, new TextBoxOptions() { IsEnabled = isEnable })
@Html.LabelFor(x => x.UsedName): @Html.TextBoxFor(x => x.UsedName, new TextBoxOptions() { IsEnabled = isEnable })
@Html.LabelFor(x => x.SexName): @Html.DictionaryDropDownListFor(EMIS.ViewModel.DictionaryItem.CF_Sex, (x => x.SexID), new DropdownListOptions() { IsEnabled = isEnable })
@Html.LabelFor(x => x.BirthDate): @Html.TextBoxFor(x => x.BirthDate, new TextBoxOptions() { TextBoxType = TextBoxType.Date, IsEnabled = isEnable })
@Html.LabelFor(x => x.NationName): @Html.DictionaryDropDownListFor(EMIS.ViewModel.DictionaryItem.CF_Nation, (x => x.NationID), new DropdownListOptions() { IsEnabled = isEnable }) @Html.LabelFor(x => x.PoliticsName): @Html.DictionaryDropDownListFor(EMIS.ViewModel.DictionaryItem.CF_Politics, (x => x.PoliticsID), new DropdownListOptions() { IsEnabled = isEnable })
@Html.LabelFor(x => x.CollegeName): @Html.ComboGridFor(x => x.CollegeID, cgopCollege) @Html.LabelFor(x => x.DepartmentName): @Html.ComboGridFor(x => x.DepartmentID, cgopDepartment)
扩展信息
@Html.LabelFor(x => x.CertificatesType): @Html.DictionaryDropDownListFor(EMIS.ViewModel.DictionaryItem.CF_CertificatesType, (x => x.CertificatesType), new DropdownListOptions() { IsEnabled = isEnable }) @Html.LabelFor(x => x.CertificatesNum): @Html.TextBoxFor(x => x.CertificatesNum, new TextBoxOptions() { IsEnabled = isEnable })
@Html.LabelFor(x => x.TeacherTypeName): @Html.DictionaryDropDownListFor(EMIS.ViewModel.DictionaryItem.CF_TeacherType, (x => x.TeacherTypeID), new DropdownListOptions() { IsEnabled = isEnable }) @Html.LabelFor(x => x.IncumbencyState): @Html.DictionaryDropDownListFor(EMIS.ViewModel.DictionaryItem.CF_IncumbencyState, (x => x.IncumbencyState), new DropdownListOptions() { IsEnabled = isEnable })
@Html.LabelFor(x => x.SituationName): @Html.DictionaryDropDownListFor(EMIS.ViewModel.DictionaryItem.CF_Situation, (x => x.SituationID), new DropdownListOptions() { IsEnabled = isEnable }) @Html.LabelFor(x => x.TitleName): @Html.DictionaryDropDownListFor(EMIS.ViewModel.DictionaryItem.CF_Title, (x => x.TitleID), new DropdownListOptions() { IsEnabled = isEnable })
@Html.LabelFor(x => x.LiteracyLevelName): @Html.DictionaryDropDownListFor(EMIS.ViewModel.DictionaryItem.CF_LiteracyLevel, (x => x.LiteracyLevelID), new DropdownListOptions() { IsEnabled = isEnable }) @Html.LabelFor(x => x.LearnPositionName): @Html.DictionaryDropDownListFor(EMIS.ViewModel.DictionaryItem.CF_LearnPosition, (x => x.LearnPositionID), new DropdownListOptions() { IsEnabled = isEnable })
@Html.LabelFor(x => x.IsDualTeacher): @if (!isEnable) { @Html.CheckBoxFor(x => x.IsDualTeacher, new Dictionary() { { "disabled", isEnable } }) } else { @Html.CheckBoxFor((x => x.IsDualTeacher)) } @Html.LabelFor(x => x.PaymentLevelName): @Html.DictionaryDropDownListFor(EMIS.ViewModel.DictionaryItem.TP_PaymentLevel, (x => x.PaymentLevelID), new DropdownListOptions() { IsEnabled = isEnable })
@Html.LabelFor(x => x.Nationality): @Html.TextBoxFor(x => x.Nationality, new TextBoxOptions() { IsEnabled = isEnable }) @Html.LabelFor(x => x.Place): @Html.TextBoxFor(x => x.Place, new TextBoxOptions() { IsEnabled = isEnable })
@Html.LabelFor(x => x.WorkDate): @Html.TextBoxFor(x => x.WorkDate, new TextBoxOptions() { TextBoxType = TextBoxType.Month, IsEnabled = isEnable }) @Html.LabelFor(x => x.ComeSchoolDate): @Html.TextBoxFor(x => x.ComeSchoolDate, new TextBoxOptions() { TextBoxType = TextBoxType.Month, IsEnabled = isEnable })
其它信息
@Html.LabelFor(x => x.Email): @Html.TextBoxFor(x => x.Email, new TextBoxOptions() { IsEnabled = isEnable }) @Html.LabelFor(x => x.ZIPCode): @Html.TextBoxFor(x => x.ZIPCode, new TextBoxOptions() { IsEnabled = isEnable })
@Html.LabelFor(x => x.WeChatNum): @Html.TextBoxFor(x => x.WeChatNum, new TextBoxOptions() { IsEnabled = isEnable }) @Html.LabelFor(x => x.QQ): @Html.TextBoxFor(x => x.QQ, new TextBoxOptions() { IsEnabled = isEnable })
@Html.LabelFor(x => x.Telephone): @Html.TextBoxFor(x => x.Telephone, new TextBoxOptions() { IsEnabled = isEnable }) @Html.LabelFor(x => x.OfficeTelephone): @Html.TextBoxFor(x => x.OfficeTelephone, new TextBoxOptions() { IsEnabled = isEnable })
@Html.LabelFor(x => x.HousePhone): @Html.TextBoxFor(x => x.HousePhone, new TextBoxOptions() { IsEnabled = isEnable }) @Html.LabelFor(x => x.Mobile): @Html.TextBoxFor(x => x.Mobile, new TextBoxOptions() { IsEnabled = isEnable })
@Html.LabelFor(x => x.HealthStateName): @Html.DictionaryDropDownListFor(EMIS.ViewModel.DictionaryItem.CF_HealthState, (x => x.HealthStateID), new DropdownListOptions() { IsEnabled = isEnable }) @Html.LabelFor(x => x.ReligionName): @Html.DictionaryDropDownListFor(EMIS.ViewModel.DictionaryItem.CF_Religion, (x => x.ReligionID), new DropdownListOptions() { IsEnabled = isEnable })
@Html.LabelFor(x => x.Speciality): @Html.TextBoxFor(x => x.Speciality, new TextBoxOptions() { IsEnabled = isEnable }) @Html.LabelFor(x => x.Account): @Html.TextBoxFor(x => x.Account, new TextBoxOptions() { IsEnabled = isEnable })
@Html.LabelFor(x => x.Residence): @Html.TextBoxFor(x => x.Residence, new TextBoxOptions() { IsEnabled = isEnable }, new Dictionary { { "style", "width:85%;" } })
@Html.LabelFor(x => x.HomeAddress): @Html.TextBoxFor(x => x.HomeAddress, new TextBoxOptions() { IsEnabled = isEnable }, new Dictionary { { "style", "width:85%;" } })
@Html.LabelFor(x => x.Address): @Html.TextBoxFor(x => x.Address, new TextBoxOptions() { IsEnabled = isEnable }, new Dictionary { { "style", "width:85%;" } })
@Html.LabelFor(x => x.NowAddress): @Html.TextBoxFor(x => x.NowAddress, new TextBoxOptions() { IsEnabled = isEnable }, new Dictionary { { "style", "width:85%;" } })
@Html.LabelFor(x => x.Profile): @if (!isEnable) { @Html.TextAreaFor(x => x.Profile, new Dictionary { { "style", "width: 90%;min-height: 45px" }, { "disabled", "true" } }) } else { @Html.TextAreaFor(x => x.Profile, new Dictionary { { "style", "width: 90%;min-height: 45px" } }) }
@Html.LabelFor(x => x.Remark): @if (!isEnable) { @Html.TextAreaFor(x => x.Remark, new Dictionary { { "style", "width: 90%;min-height: 20px" }, { "disabled", "true" } }) } else { @Html.TextAreaFor(x => x.Remark, new Dictionary { { "style", "width: 90%;min-height: 20px" } }) }
}