Esempio n. 1
0
        public void UpdateEntityState(int entityId, int entityTypeId, string stateName, string state)
        {
            _entityDao.UpdateEntityState(entityId, stateName, state);
            var rt = _cacheService.GetEntityTypeById(entityTypeId);

            _applicationState.NotifyEvent(RuleEventNames.EntityStateUpdated, new
            {
                EntityId       = entityId,
                EntityTypeName = rt.Name,
                StateName      = stateName,
                State          = state
            });
        }
Esempio n. 2
0
        public void UpdateEntityState(int entityId, int entityTypeId, string stateName, string state, string quantityExp)
        {
            var sv = _entityDao.UpdateEntityState(entityId, stateName, state, quantityExp);
            var rt = _cacheService.GetEntityTypeById(entityTypeId);

            _applicationState.NotifyEvent(RuleEventNames.EntityStateUpdated, new
            {
                EntityId       = entityId,
                EntityTypeName = rt.Name,
                StateName      = stateName,
                State          = state,
                Quantity       = sv.GetStateQuantity(stateName)
            });
        }