public Cat_HDTJobTypeModel Post([Bind] Cat_HDTJobTypeModel model) { #region Validate string message = string.Empty; var checkValidate = HRM.Business.Main.Domain.ValidatorService.OnValidateData <Cat_HDTJobTypeModel>(model, "Cat_HDTJobType", ref message); if (!checkValidate) { model.ActionStatus = message; return(model); } #endregion ActionService service = new ActionService(UserLogin); return(service.UpdateOrCreate <Cat_HDTJobTypeEntity, Cat_HDTJobTypeModel>(model)); }
/// <summary> /// [Chuc.Nguyen] - Lấy dữ liệu Ngân Hàng(Cat_HDTJobType) theo Id /// </summary> /// <param name="id"></param> /// <returns></returns> public Cat_HDTJobTypeModel GetById(Guid id) { string status = string.Empty; var model = new Cat_HDTJobTypeModel(); ActionService service = new ActionService(UserLogin); var entity = service.GetByIdUseStore <Cat_HDTJobTypeEntity>(id, ConstantSql.hrm_cat_sp_get_HDTJobTypeById, ref status); if (entity != null) { model = entity.CopyData <Cat_HDTJobTypeModel>(); } model.ActionStatus = status; return(model); }