You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
iot/labs/Teacher/TeacherExt/Models/EditTeacherModel.cs

744 lines
27 KiB

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

using Infrastructure.Web.Mvc;
using Microsoft.AspNetCore.Mvc;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace TeacherExt.Models
{
[Display(Name = "教师")]
public class EditTeacherModel : IValidatableObject
{
[HiddenInput]
[SkipSearch, SkipList]
[ReadOnly(true)]
[ScaffoldColumn(false)]
[Display(Order = 2, Name = "Id")]
public int Id { get; set; }
[ReadOnly(true)]
[Required]
[Display(Order = 3, Name = "申请修改状态")]
public string RequestEditStatus { get; set; } = "未申请";
[SelectList]
[ReadOnly(true)]
[Required]
[Display(Order = 4, Name = "审核状态")]
public string CheckStatus { get; set; } = "未提交";
[ExcelHeader("序号")]
[HiddenInput]
public int? DisplayOrder { get; set; }
[ExcelHeader("工作单位")]
[ReadOnly(true)]
[SkipSearch, SkipList]
[Display(Order = 10, Name = "工作单位")]
[Required]
public string OrganName { get; set; } = "测试数据";
[ExcelHeader("姓名")]
[ReadOnly(true)]
[RegularExpression(@"^[\u4e00-\u9fa5\d]+$", ErrorMessage = "")]
[Display(Order = 20, Name = "教师姓名")]
[Required]
public string RealName { get; set; }
[HiddenInput]
[SkipSearch, SkipList]
[Display(Order = 21, Name = "登录名")]
public string LoginName { get; set; }
[SkipSearch, SkipList]
[SelectList]
[Display(Order = 30, Name = "人员类别")]
[Required]
public int? UserType { get; set; }
[ExcelHeader("性别")]
[SkipSearch]
[SelectList]
[Display(Order = 40, Name = "性别")]
[Required]
public string Sex { get; set; }
[SkipSearch, SkipList]
[SelectList]
[Display(Order = 30, Name = "婚姻状况")]
[Required]
public int MaritalStatus { get; set; }
[SkipSearch]
[SelectList]
[Display(Order = 41, Name = "国籍")]
[Required]
public int? Nationality { get; set; }
[ExcelHeader("出生年月")]
[SkipSearch, SkipList]
[DataType(DataType.Date)]
[Display(Order = 50, Name = "出生日期")]
[Required]
[Remote("ValidDate", "Ajax")]
public DateTime? Birthday { get; set; }
[ExcelHeader("年龄")]
[SkipSearch, SkipList]
[ReadOnly(true)]
[Description("根据身份证计算")]
[Display(Order = 60, Name = "年龄")]
[NotMapped]
public int? Age { get; set; }
[ExcelHeader("民族")]
[SkipSearch]
[SelectList]
[Display(Order = 70, Name = "民族")]
[Required]
public string Nation { get; set; }
[ExcelHeader("籍贯")]
[SkipSearch]
[Description("以 省/自治区/直辖市 + 区/县 等形式填写")]
[Display(Order = 80, Name = "籍贯")]
[Required]
[MaxLength(50)]
public string NativePlace { get; set; }
[ExcelHeader("联系电话")]
[SkipSearch, SkipList]
[RegularExpression(@"(^$|^\d{7}$|^\d{11}$)", ErrorMessage = "电话号码格式错误")]
[Display(Order = 90, Name = "联系电话")]
[Required]
public string PhoneNumber { get; set; }
[SkipSearch, SkipList]
[Display(Order = 91, Name = "邮箱")]
[MaxLength(50)]
[RegularExpression(@"^[a-zA-Z0-9_]+@[a-zA-Z0-9_\.]+$", ErrorMessage = "")]
public string Email { get; set; }
[ExcelHeader("身份证号")]
[SkipSearch, SkipList]
[RegularExpression(@"^(\d{15}|\d{17}(X|\d))$", ErrorMessage = "身份证号格式错误")]
[Display(Order = 100, Name = "身份证号")]
[Required]
public string IdNumber { get; set; }
[ExcelHeader("参加工作\r\n时间")]
[SkipSearch, SkipList]
[DataType(DataType.Date)]
[Display(Order = 110, Name = "参加工作时间")]
[Required]
[Remote("ValidDate", "Ajax")]
public DateTime? WorkingTime { get; set; }
[SkipSearch, SkipList]
[Display(Order = 111, Name = "参加工作单位")]
[MaxLength(50)]
public string WorkingPlace { get; set; }
[ExcelHeader("任教时间")]
[SkipSearch, SkipList]
[DataType(DataType.Date)]
[Display(Order = 120, Name = "任教时间")]
[Remote("ValidDate", "Ajax")]
public DateTime? TeachDate { get; set; }
[ExcelHeader("到\r\n现所在校\r\n时间")]
[SkipSearch, SkipList]
[DataType(DataType.Date)]
[Display(Order = 130, Name = "到现所在校时间")]
[Required]
[Remote("ValidDate", "Ajax")]
public DateTime? CurrentJobStart { get; set; }
[SkipSearch, SkipList]
[Display(Order = 131, Name = "到现所在校时间-已审核")]
public bool CurrentJobStartChecked { get; set; }
[ExcelHeader("工龄(年)")]
[SkipSearch, SkipList]
[ReadOnly(true)]
[Description("根据参加工作时间计算")]
[Display(Order = 132, Name = "工龄(年)")]
[NotMapped]
public int? JobAgeYear { get; set; }
[ExcelHeader("工龄(月)")]
[SkipSearch, SkipList]
[ReadOnly(true)]
[Description("根据参加工作时间计算")]
[Display(Order = 133, Name = "工龄(月)")]
[NotMapped]
public int? JobAgeMonth { get; set; }
[ExcelHeader("政治面貌")]
[SkipSearch, SkipList]
[SelectList]
[Display(Order = 150, Name = "政治面貌")]
[Required]
public int? Politics { get; set; }
[ExcelHeader("入党(派)\r\n时间")]
[SkipSearch, SkipList]
[DataType(DataType.Date)]
[Display(Order = 160, Name = "入党(派)时间")]
[Remote("ValidDate", "Ajax")]
public DateTime? JoinPartyDate { get; set; }
[ExcelHeader("最高职称")]
[SkipSearch, SkipList]
[SelectList]
[Display(Order = 170, Name = "最高职称")]
[Required]
public int? MaxTitle { get; set; }
[SkipSearch, SkipList]
[Display(Order = 171, Name = "最高职称-已审核")]
public bool MaxTitleChecked { get; set; }
[ExcelHeader("最高职称\r\n取得时间")]
[SkipSearch, SkipList]
[DataType(DataType.Date)]
[Display(Order = 180, Name = "最高职称取得时间")]
[Remote("ValidDate", "Ajax")]
public DateTime? MaxTitleStart { get; set; }
[SkipSearch, SkipList]
[Display(Order = 181, Name = "最高职称取得时间-已审核")]
public bool MaxTitleStartChecked { get; set; }
[SelectList]
[SkipSearch, SkipList]
[Display(Order = 185, Name = "最高职称已聘")]
[Required]
public bool? IsJobAsMaxTitle { get; set; }
[ExcelHeader("最高职称聘任时间,已聘\r\n(聘任时间)", "2,2")]
[HtmlData("JobAsMaxTitle1")]
[SkipSearch, SkipList]
[DataType(DataType.Date)]
[Remote(nameof(JobAsMaxTitleDate), "Ajax", AdditionalFields = nameof(IsJobAsMaxTitle))]
[Display(Order = 190, Name = "最高职称已聘聘任时间")]
[Required]
public DateTime? JobAsMaxTitleDate { get; set; }
[SkipSearch, SkipList]
[Display(Order = 191, Name = "已审核")]
public bool JobAsMaxTitleDateChecked { get; set; }
[ExcelHeader("最高职称聘任时间,未聘,原由", "2,1,1")]
[HtmlData("JobAsMaxTitle2")]
[SkipSearch, SkipList]
[Description("如:乡村教师职评、暂未岗位变更、新考/调入等")]
[Display(Order = 200, Name = "最高职称未聘原由")]
[Required]
[MaxLength(50)]
public string JobAsNotMaxTitleReason { get; set; }
[SkipSearch, SkipList]
[Display(Order = 191, Name = "已审核")]
public bool JobAsNotMaxTitleReasonChecked { get; set; }
[ExcelHeader("最高职称聘任时间,未聘,现聘任职称", "2,1,1")]
[HtmlData("JobAsMaxTitle2")]
[SkipSearch, SkipList]
[SelectList]
[Display(Order = 210, Name = "现聘任职称")]
[Required]
public int? NotMaxTitle { get; set; }
[SkipSearch, SkipList]
[Display(Order = 211, Name = "已审核")]
public bool NotMaxTitleChecked { get; set; }
[ExcelHeader("最高职称聘任时间,未聘,现聘任职称\r\n取得时间", "2,1,1")]
[HtmlData("JobAsMaxTitle2")]
[SkipSearch, SkipList]
[DataType(DataType.Date)]
[Display(Order = 220, Name = "现聘任职称取得时间")]
[Required]
[Remote("ValidDate", "Ajax")]
public DateTime? NotMaxTitleStart { get; set; }
[SkipSearch, SkipList]
[Display(Order = 221, Name = "已审核")]
public bool NotMaxTitleStartChecked { get; set; }
[ExcelHeader("最高职称聘任时间,未聘,现聘任职称\r\n聘任时间", "2,1,1")]
[HtmlData("JobAsMaxTitle2")]
[SkipSearch, SkipList]
[DataType(DataType.Date)]
[Display(Order = 230, Name = "现聘任职称聘任时间")]
[Required]
[Remote("ValidDate", "Ajax")]
public DateTime? JobAsNotMaxTitleDate { get; set; }
[SkipSearch, SkipList]
[Display(Order = 231, Name = "已审核")]
public bool JobAsNotMaxTitleDateChecked { get; set; }
[ExcelHeader("岗位类别")]
[SkipSearch, SkipList]
[SelectList]
[Display(Order = 240, Name = "岗位类别")]
[Required]
public int? PostType { get; set; }
[ExcelHeader("现岗位等级")]
[SkipSearch, SkipList]
[SelectList]
[Display(Order = 250, Name = "现岗位等级")]
[Required]
public string PostGrade { get; set; }
[SkipSearch, SkipList]
[Display(Order = 251, Name = "已审核")]
public bool PostGradeChecked { get; set; }
[ExcelHeader("变更至现岗位等级时间\r\n以文件\r\n等为准")]
[Description("以文件为准")]
[SkipSearch, SkipList]
[DataType(DataType.Date)]
[Display(Order = 260, Name = "变更至现岗位等级时间")]
[Remote("ValidDate", "Ajax")]
public DateTime? CurrentPostGradeStart { get; set; }
[SkipSearch, SkipList]
[Display(Order = 261, Name = "已审核")]
public bool CurrentPostGradeStartChecked { get; set; }
[SkipSearch, SkipList]
[Display(Order = 262, Name = "第一学历")]
[SelectList]
public int? FirstEducation { get; set; }
[SkipSearch, SkipList]
[Display(Order = 263, Name = "第一毕业学校")]
[MaxLength(50)]
public string FirstGraduateSchool { get; set; }
[SkipSearch, SkipList]
[Display(Order = 264, Name = "第一专业")]
[MaxLength(50)]
public string FirstMajor { get; set; }
[ExcelHeader("享受学历\r\n待遇等级")]
[SkipSearch, SkipList]
[SelectList]
[Display(Order = 270, Name = "享受学历待遇等级")]
public string EducationGrade { get; set; }
[SkipSearch, SkipList]
[Display(Order = 271, Name = "已审核")]
public bool EducationGradeChecked { get; set; }
[ExcelHeader("享受学历\r\n待遇等级时间\r\n以文件为准")]
[Description("以文件为准")]
[SkipSearch, SkipList]
[DataType(DataType.Date)]
[Display(Order = 280, Name = "享受学历待遇等级时间")]
[Required]
[Remote("ValidDate", "Ajax")]
public DateTime? EducationGradeDate { get; set; }
[SkipSearch, SkipList]
[Display(Order = 281, Name = "已审核")]
public bool EducationGradeDateChecked { get; set; }
[ExcelHeader("全日制教育,毕业院校\r\n以毕业证为准", "2,2")]
[Description("填写毕业院校全称")]
[SkipSearch, SkipList]
[Display(Order = 290, Name = "全日制教育毕业院校")]
[Required]
[MaxLength(50)]
public string FullTimeSchool { get; set; }
[ExcelHeader("全日制教育,毕业院校分类", "2,2")]
[SkipSearch, SkipList]
[SelectList]
[Display(Order = 300, Name = "全日制教育毕业院校分类")]
[Required]
public string FullTimeSchoolType { get; set; }
[ExcelHeader("全日制教育,专业\r\n以毕业证书为准", "2,2")]
[Description("严格按照毕业证书填写")]
[SkipSearch, SkipList]
[Display(Order = 310, Name = "全日制教育毕业证书专业")]
[Required]
[MaxLength(50)]
public string FullTimeSchoolMajor { get; set; }
[ExcelHeader("全日制教育,学历", "2,2")]
[SkipSearch, SkipList]
[SelectList]
[Display(Order = 320, Name = "全日制教育学历")]
[Required]
public int? FullTimeSchoolEducation { get; set; }
[ExcelHeader("全日制教育,学历\r\n取得时间", "2,2")]
[SkipSearch, SkipList]
[Display(Order = 330, Name = "全日制教育学历取得时间")]
[DataType(DataType.Date)]
[Required]
[Remote("ValidDate", "Ajax")]
public DateTime? FullTimeSchoolEducationDate { get; set; }
[ExcelHeader("在职教育,毕业院校\r\n以毕业证为准", "2,2")]
[Description("填写毕业院校全称")]
[SkipSearch, SkipList]
[Display(Order = 350, Name = "在职教育毕业院校")]
[MaxLength(50)]
public string JobTimeSchool { get; set; }
[ExcelHeader("在职教育,毕业院校分类", "2,2")]
[SkipSearch, SkipList]
[SelectList]
[Display(Order = 340, Name = "在职教育毕业院校分类")]
public string JobTimeSchoolType { get; set; }
[ExcelHeader("在职教育,专业\r\n以毕业证书为准", "2,2")]
[Description("严格按照毕业证书填写")]
[SkipSearch, SkipList]
[Display(Order = 360, Name = "在职教育毕业证书专业")]
[MaxLength(50)]
public string JobTimeSchoolMajor { get; set; }
[ExcelHeader("在职教育,学历", "2,2")]
[SkipSearch, SkipList]
[SelectList]
[Display(Order = 370, Name = "在职教育学历")]
public int? JobTimeSchoolEducation { get; set; }
[ExcelHeader("在职教育,学历\r\n取得时间", "2,2")]
[SkipSearch, SkipList]
[Display(Order = 380, Name = "在职教育学历取得时间")]
[DataType(DataType.Date)]
[Remote("ValidDate", "Ajax")]
public DateTime? JobTimeSchoolEducationDate { get; set; }
[ExcelHeader("最高\r\n学历")]
[SkipSearch, SkipList]
[SelectList]
[Display(Order = 390, Name = "最高学历")]
public int? MaxEducation { get; set; }
[Display(Order = 391, Name = "最高学历毕业院校")]
[SkipSearch, SkipList]
[MaxLength(50)]
public string MaxEducationSchool { get; set; }
[ExcelHeader("最高\r\n学位")]
[SkipSearch, SkipList]
[SelectList]
[Display(Order = 400, Name = "最高学位")]
public int? MaxDegree { get; set; }
[SkipSearch, SkipList]
[Display(Order = 402, Name = "最高学位毕业院校")]
[MaxLength(50)]
public string MaxDegreeSchool { get; set; }
[SkipSearch, SkipList]
[Display(Order = 401, Name = "最高专业")]
[MaxLength(50)]
public string MaxMajor { get; set; }
[ExcelHeader("是否担任班主任")]
[SkipSearch, SkipList]
[Display(Order = 410, Name = "是否担任班主任")]
public bool IsClassTeacher { get; set; }
[SkipSearch, SkipList]
[Display(Order = 411, Name = "已审核")]
public bool IsClassTeacherChecked { get; set; }
[ExcelHeader("主要任教学段")]
[SkipSearch, SkipList]
[SelectList]
[Display(Order = 420, Name = "主要任教学段")]
[Required]
public string MainTeachPeriod { get; set; }
[SkipSearch, SkipList]
[Display(Order = 421, Name = "已审核")]
public bool MainTeachPeriodChecked { get; set; }
[ExcelHeader("主要任教学科")]
[Description("选择项中没有则手动填写")]
[SkipSearch, SkipList]
[SelectList(true)]
[Display(Order = 430, Name = "主要任教学科")]
[Required]
[MaxLength(50)]
public string MainTeachSubject { get; set; }
[SkipSearch, SkipList]
[Display(Order = 432, Name = "已审核")]
public bool MainTeachSubjectChecked { get; set; }
[ExcelHeader("主要任教\r\n年级")]
[SkipSearch, SkipList]
[SelectList]
[Display(Order = 440, Name = "主要任教年级")]
[Required]
public string MainTeachGrade { get; set; }
[SkipSearch, SkipList]
[Display(Order = 441, Name = "已审核")]
public bool MainTeachGradeChecked { get; set; }
[ExcelHeader("兼职任教学段")]
[SkipSearch, SkipList]
[SelectList]
[Display(Order = 450, Name = "兼职任教学段")]
public string OtherTeachPeriod { get; set; }
[SkipSearch, SkipList]
[Display(Order = 451, Name = "已审核")]
public bool OtherTeachPeriodChecked { get; set; }
[ExcelHeader("兼职任教学科")]
[Description("选择项中没有则手动填写")]
[SkipSearch, SkipList]
[SelectList(true)]
[Display(Order = 460, Name = "兼职任教学科")]
[MaxLength(50)]
public string OtherTeachSubject { get; set; }
[SkipSearch, SkipList]
[Display(Order = 462, Name = "已审核")]
public bool OtherTeachSubjectChecked { get; set; }
[SkipSearch, SkipList]
[SelectList]
[Required]
[Display(Order = 463, Name = "在编在岗")]
public bool? HasPosition { get; set; }
[HtmlData("HasPosition1")]
[SkipSearch, SkipList]
[SelectList]
[Required]
[Display(Order = 464, Name = "是否中层")]
public bool? IsMiddleLevel { get; set; }
[ExcelHeader("在编人员在岗情况,在编在岗\r\n是否为学校中层及以上,是,职务", "1,1,1,1")]
[Description("选择项中没有则手动填写")]
[HtmlData("HasPosition11")]
[SkipSearch, SkipList]
[SelectList(true)]
[Display(Order = 470, Name = "职务")]
[Required]
[MaxLength(50)]
public string Position { get; set; }
[SkipSearch, SkipList]
[Display(Order = 471, Name = "已审核")]
public bool PositionChecked { get; set; }
[ExcelHeader("在编人员在岗情况,在编在岗\r\n是否为学校中层及以上,是,任命时间", "1,1,1,1")]
[HtmlData("HasPosition11")]
[SkipSearch, SkipList]
[DataType(DataType.Date)]
[Required]
[Display(Order = 480, Name = "职务任命时间")]
[Remote("ValidDate", "Ajax")]
public DateTime? PositionStart { get; set; }
[SkipSearch, SkipList]
[Display(Order = 481, Name = "已审核")]
public bool PositionStartChecked { get; set; }
[ExcelHeader("在编人员在岗情况,在编在岗\r\n是否为学校中层及以上,否\r\n(一线教师)", "1,1,2")]
[Description("填写所教学科全称")]
[HtmlData("HasPosition12")]
[SkipSearch, SkipList]
[SelectList(true)]
[Required]
[Display(Order = 490, Name = "一线教师")]
[MaxLength(50)]
public string FrontTeacher { get; set; }
[ExcelHeader("在编人员在岗情况,在编不在岗,原由", "1,1,2")]
[HtmlData("HasPosition2")]
[SkipSearch, SkipList]
[SelectList(true)]
[Description("选择项中没有则手动填写")]
[Required]
[Display(Order = 500, Name = "不在岗原由")]
[MaxLength(50)]
public string NotOnPostReason { get; set; }
[SkipSearch, SkipList]
[Display(Order = 501, Name = "已审核")]
public bool NotOnPostReasonChecked { get; set; }
[ExcelHeader("在编人员在岗情况,在编不在岗,不在岗\r\n起始时间", "1,1,2")]
[HtmlData("HasPosition2")]
[SkipSearch, SkipList]
[DataType(DataType.Date)]
[Display(Order = 510, Name = "不在岗起始时间")]
[Required]
[Remote("ValidDate", "Ajax")]
public DateTime? NotOnPostReasonDate { get; set; }
[SkipSearch, SkipList]
[Display(Order = 511, Name = "已审核")]
public bool NotOnPostReasonDateChecked { get; set; }
[ExcelHeader("教师资格证\r\n种类")]
[SkipSearch, SkipList]
[SelectList]
[Display(Order = 520, Name = "教师资格证种类")]
[Required]
public string TeacherCardType { get; set; }
[ExcelHeader("教师资格证\r\n任教学科\r\n(严格按照资格证书填写)")]
[Description("严格按照资格证书填写")]
[SkipSearch, SkipList]
[Display(Order = 530, Name = "任教学科")]
[MaxLength(50)]
public string TeacherCardSubject { get; set; }
[ExcelHeader("普通话\r\n等级")]
[SkipSearch, SkipList]
[SelectList]
[Display(Order = 540, Name = "普通话等级")]
public string TeacherCardLangLevel { get; set; }
[ExcelHeader("现住址详细地址-区县")]
[SkipSearch, SkipList]
[SelectList(true)]
[Display(Order = 550, Name = "现家庭地址-区县")]
[Required]
[MaxLength(50)]
public string CurrentAddressArea { get; set; }
[ExcelHeader("现住址详细地址\r\n街道 - 小区)")]
[SkipSearch, SkipList]
[Display(Order = 560, Name = "现家庭详细地址")]
[Required]
[DataType(DataType.MultilineText)]
[MaxLength(100)]
public string AddressDetails { get; set; }
[ExcelHeader("备注")]
[DataType(DataType.MultilineText)]
[SkipSearch, SkipList]
[Display(Order = 570, Name = "审核失败原因")]
[MaxLength(100)]
public string Comment { get; set; }
[SkipSearch, SkipList]
[Display(Order = 571, Name = "何年何月何人介绍加入中国共产党")]
[DataType(DataType.MultilineText)]
[MaxLength(100)]
public string CommunistPartyMessage { get; set; }
[SkipSearch, SkipList]
[Display(Order = 572, Name = "何年何月何人介绍加入何民主党派")]
[DataType(DataType.MultilineText)]
[MaxLength(100)]
public string DemocraticPartyMessage { get; set; }
[SkipSearch, SkipList]
[Display(Order = 573, Name = "何年何月何人介绍加入中国共青团")]
[DataType(DataType.MultilineText)]
[MaxLength(100)]
public string YouthPartyMessage { get; set; }
public IEnumerable<ValidationResult> Validate(ValidationContext validationContext)
{
if (!this.IsJobAsMaxTitle.HasValue)
{
yield return new ValidationResult("必须选择是否最高职称聘任", new string[] { nameof(this.IsJobAsMaxTitle) });
}
else
{
if (this.IsJobAsMaxTitle.Value)
{
if (!this.JobAsMaxTitleDate.HasValue)
{
yield return new ValidationResult("以最高职称聘任的,必须填写聘任时间", new string[] { nameof(this.JobAsMaxTitleDate) });
}
}
else
{
if (string.IsNullOrEmpty(this.JobAsNotMaxTitleReason))
{
yield return new ValidationResult("未以最高职称聘任的,必须填写原由", new string[] { nameof(this.JobAsNotMaxTitleReason) });
}
if (!NotMaxTitle.HasValue)
{
yield return new ValidationResult("未以最高职称聘任的,必须填写现聘任职称", new string[] { nameof(this.NotMaxTitle) });
}
if (!this.NotMaxTitleStart.HasValue)
{
yield return new ValidationResult("未以最高职称聘任的,必须填写现聘任职称取得时间", new string[] { nameof(this.NotMaxTitleStart) });
}
if (!this.JobAsNotMaxTitleDate.HasValue)
{
yield return new ValidationResult("未以最高职称聘任的,必须填写现聘任职称聘任时间", new string[] { nameof(this.JobAsNotMaxTitleDate) });
}
}
}
if (!string.IsNullOrEmpty(this.EducationGrade) && !EducationGradeDate.HasValue)
{
yield return new ValidationResult("享受学历待遇等级的,必须填写时间", new string[] { nameof(this.EducationGradeDate) });
}
if (!this.HasPosition.HasValue)
{
yield return new ValidationResult("必须选择是否在编在岗", new string[] { nameof(this.HasPosition) });
}
else
{
if (this.HasPosition.Value)
{
if (!this.IsMiddleLevel.HasValue)
{
yield return new ValidationResult("必须选择是否中层", new string[] { nameof(this.IsMiddleLevel) });
}
else
{
if (this.IsMiddleLevel.Value)
{
if (string.IsNullOrEmpty(this.Position))
{
yield return new ValidationResult("中层必须选择职务", new string[] { nameof(this.Position) });
}
if (!this.PositionStart.HasValue)
{
yield return new ValidationResult("中层必须选择任命时间", new string[] { nameof(this.PositionStart) });
}
}
else
{
if (string.IsNullOrEmpty(FrontTeacher))
{
yield return new ValidationResult("一线教师必须填写", new string[] { nameof(this.FrontTeacher) });
}
}
}
}
else
{
if (string.IsNullOrEmpty(this.NotOnPostReason))
{
yield return new ValidationResult("必须填写原由", new string[] { nameof(this.Position) });
}
if (!this.NotOnPostReasonDate.HasValue)
{
yield return new ValidationResult("必须填写不在岗起始时间", new string[] { nameof(this.PositionStart) });
}
}
}
}
}
}