I am developing MVC project using c#. I have one model called EmployeeEducationDetails
. Lets have a look at what I have created
public class EducationList
{
public List<EmployeeEducationDetailTable> employeeEducationList { get; set; }
public EducationList()
{
employeeEducationList = new List<EmployeeEducationDetailTable>();
}
public virtual EmployeeMainTable employee_MainTable { get; set; }
public ICollection<EmployeeQualificationTypeTable> employee_QualficationTypeTable { get; set; }
}
public class EmployeeEducationDetailTable
{
public int EmployeeId { get; set; }
public int EmployeeEducationDetailId { get; set; }
[Required(ErrorMessage = "Select qualification")]
public int? EmployeeQualificationTypeId { get; set; }
[Required(ErrorMessage = "Enter institute name")]
public string EmployeeInstituteName { get; set; }
[Required(ErrorMessage = "Enter year of pass")]
public DateTime? EmployeeYearOfPass { get; set; }
[Required(ErrorMessage = "Enter percentage")]
public string EmployeePercentage { get; set; }
}
Until now I am not facing any problem. Our requirement needs to satisfy these conditions
- I have to design 4 division on same view like SSLC, PUC, DEGree, Post Degree using same model.
- Need to validate any one section among 4 divisions because education is mandatory for employee.
- If any data entered to any division then only it has to validate.
Please give me the idea about this. Your help would be greatly appreciated.
NOTE:here am passing List.Count
to create 4 division dynamically and we have to use same model i.e. EducationList