Exemple #1
0
 public Rec_CandidateComputingLevelModel Post([Bind] Rec_CandidateComputingLevelModel model)
 {
     #region Validate
     string message       = string.Empty;
     var    checkValidate = HRM.Business.Main.Domain.ValidatorService.OnValidateData <Rec_CandidateComputingLevelModel>(model, "Rec_CandidateComputingLevel", ref message);
     if (!checkValidate)
     {
         model.ActionStatus = message;
         return(model);
     }
     #endregion
     ActionService service = new ActionService(UserLogin);
     return(service.UpdateOrCreate <Rec_CandidateComputingLevelEntity, Rec_CandidateComputingLevelModel>(model));
 }
Exemple #2
0
        public Rec_CandidateComputingLevelModel GetById(Guid id)
        {
            string        status  = string.Empty;
            var           model   = new Rec_CandidateComputingLevelModel();
            ActionService service = new ActionService(UserLogin);
            var           entity  = service.GetByIdUseStore <Rec_CandidateComputingLevelEntity>(id, ConstantSql.hrm_rec_sp_get_Rec_CandidateComputingLevelById, ref status);//note

            if (entity != null)
            {
                model = entity.CopyData <Rec_CandidateComputingLevelModel>();
            }
            model.ActionStatus = status;
            return(model);
        }