Exemplo n.º 1
0
        /// <summary>
        /// [Chuc.Nguyen] - Lấy dữ liệu bảng Tai Nạn(Hre_Accident) theo Id
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        public FIN_ClaimItemModel GetById(Guid id)
        {
            string        status  = string.Empty;
            var           model   = new FIN_ClaimItemModel();
            ActionService service = new ActionService(UserLogin);
            var           entity  = service.GetByIdUseStore <FIN_ClaimItemEntity>(id, ConstantSql.hrm_hr_sp_get_ClaimItemById, ref status);

            if (entity != null)
            {
                model = entity.CopyData <FIN_ClaimItemModel>();
            }
            model.ActionStatus = status;
            return(model);
        }
Exemplo n.º 2
0
        public FIN_ClaimItemModel Post([Bind] FIN_ClaimItemModel model)
        {
            #region Validate

            string message       = string.Empty;
            var    checkValidate = HRM.Business.Main.Domain.ValidatorService.OnValidateData <FIN_ClaimItemModel>(model, "FIN_ClaimItem", ref message);
            if (!checkValidate)
            {
                model.ActionStatus = message;
                return(model);
            }

            #endregion
            ActionService service = new ActionService(UserLogin);
            return(service.UpdateOrCreate <FIN_ClaimItemEntity, FIN_ClaimItemModel>(model));
        }