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