public CatEmployeeTypeModel Post([Bind] CatEmployeeTypeModel model) { #region Validate string message = string.Empty; var checkValidate = HRM.Business.Main.Domain.ValidatorService.OnValidateData <CatEmployeeTypeModel>(model, "Cat_EmployeeType", ref message); if (!checkValidate) { model.ActionStatus = message; return(model); } #endregion ActionService service = new ActionService(UserLogin); return(service.UpdateOrCreate <Cat_EmployeeTypeEntity, CatEmployeeTypeModel>(model)); }
/// <summary> /// [Son.Vo] - Lấy dữ liệu EmployeeType(Cat_EmployeeType) theo Id /// </summary> /// <param name="id"></param> /// <returns></returns> public CatEmployeeTypeModel GetById(Guid id) { string status = string.Empty; var model = new CatEmployeeTypeModel(); ActionService service = new ActionService(UserLogin); var entity = service.GetByIdUseStore <Cat_EmployeeTypeEntity>(id, ConstantSql.hrm_cat_sp_get_EmployeeTypeById, ref status); if (entity != null) { model = entity.CopyData <CatEmployeeTypeModel>(); } model.ActionStatus = status; return(model); }