Beispiel #1
0
 public Cat_SalaryRankModel Post([Bind] Cat_SalaryRankModel model)
 {
     #region Validate
     string message       = string.Empty;
     var    checkValidate = HRM.Business.Main.Domain.ValidatorService.OnValidateData <Cat_SalaryRankModel>(model, "Cat_SalaryRank", ref message);
     if (!checkValidate)
     {
         model.ActionStatus = message;
         return(model);
     }
     #endregion
     ActionService service = new ActionService(UserLogin);
     return(service.UpdateOrCreate <Cat_SalaryRankEntity, Cat_SalaryRankModel>(model));
 }
Beispiel #2
0
        /// <summary>
        /// [Tho.Bui] - Lấy dữ liệu mã hệ số Lương(Cat_SalaryRank) theo Id
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        public Cat_SalaryRankModel GetById(Guid id)
        {
            string        status  = string.Empty;
            var           model   = new Cat_SalaryRankModel();
            ActionService service = new ActionService(UserLogin);
            var           entity  = service.GetByIdUseStore <Cat_SalaryRankEntity>(id, ConstantSql.hrm_cat_sp_get_SalaryRankById, ref status);

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