public Rec_CandidateHistoryModel Post([Bind] Rec_CandidateHistoryModel model) { #region Validate string message = string.Empty; var checkValidate = HRM.Business.Main.Domain.ValidatorService.OnValidateData <Rec_CandidateHistoryModel>(model, "Rec_CandidateHistory", ref message); if (!checkValidate) { model.ActionStatus = message; return(model); } #endregion ActionService service = new ActionService(UserLogin); return(service.UpdateOrCreate <Rec_CandidateHistoryEntity, Rec_CandidateHistoryModel>(model)); }
public Rec_CandidateHistoryModel GetById(Guid id) { string status = string.Empty; var model = new Rec_CandidateHistoryModel(); var service = new ActionService(UserLogin); var entity = service.GetByIdUseStore <Rec_CandidateHistoryEntity>(id, ConstantSql.hrm_rec_sp_get_CandidateHistoryById, ref status); if (entity != null) { model = entity.CopyData <Rec_CandidateHistoryModel>(); } model.ActionStatus = status; return(model); }