public Cat_UsualAllowanceLevelModel Post([Bind] Cat_UsualAllowanceLevelModel model) { #region Validate string message = string.Empty; var checkValidate = HRM.Business.Main.Domain.ValidatorService.OnValidateData <Cat_UsualAllowanceLevelModel>(model, "Cat_UsualAllowanceLevel", ref message); if (!checkValidate) { model.ActionStatus = message; return(model); } #endregion ActionService service = new ActionService(UserLogin); return(service.UpdateOrCreate <Cat_UsualAllowanceLevelEntity, Cat_UsualAllowanceLevelModel>(model)); }
/// <summary> /// [Quoc.Do] - Lấy dữ liệu Mức Độ Trợ Cấp( Cat_UsualAllowanceLevel) theo Id /// </summary> /// <param name="id"></param> /// <returns></returns> public Cat_UsualAllowanceLevelModel GetById(Guid id) { string status = string.Empty; var model = new Cat_UsualAllowanceLevelModel(); ActionService service = new ActionService(UserLogin); var entity = service.GetByIdUseStore <Cat_UsualAllowanceLevelEntity>(id, ConstantSql.hrm_cat_sp_get_UsualAllowanceLevelById, ref status); if (entity != null) { model = entity.CopyData <Cat_UsualAllowanceLevelModel>(); } model.ActionStatus = status; return(model); }