public TrainerKYCModel() { _userEducationModel = new UserEducationModel(); _userEmploymentModel = new UserEmploymentModel(); _trainerDocumentModel = new TrainerDocumentModel(); _trainerDocumentsStatusModel = new TrainerDocumentsStatusModel(); }
public ActionResult Create([FromRoute] int systemUserId, [FromBody] NewEducationViewModel model) { var education = new UserEducationModel() { DateAttendedEnd = model.DateAttendedEnd, DateAttendedStart = model.DateAttendedStart, Degree = model.Degree, IsCurrentEducation = model.IsCurrentEducation, ModeOfStudy = model.ModeOfStudy, School = model.School, SystemUserId = systemUserId }; _educationService.Create(education); return(Ok(MessageHelper.Success("The education have been created."))); }
public void Create(UserEducationModel model) { if (model.IsCurrentEducation) { UpdateOldCurrentEducation(model.SystemUserId); } _educationRepository.Insert(new Education() { School = model.School, Degree = model.Degree, SystemUserId = model.SystemUserId, DateAttendedEnd = model.DateAttendedEnd.FromUnixTime(), DateAttendedStart = model.DateAttendedStart.FromUnixTime(), IsEduCurrentEducation = model.IsCurrentEducation, Grade = model.ModeOfStudy.ToString() }); _unitOfWork.SaveChanges(); }