Ejemplo n.º 1
0
        public void AddRevokee(EntityPlace Place)
        {
            if (Status != ProcessStatus.New)
            {
                throw new InvalidOperationException("Wrong wf state");
            }

            _revokees.Add(Place);
        }
        public async Task <EntityPlace> AttachNewPlace(Guid BasePointGuid, Guid EntityId, string PlaceId, IPrincipal user)
        {
            var now         = _dateTimeProvider.GetLocalNow();
            var EntitySales = await _EntitySalesRepository.GetByIdWithEntityActiveOnDate(BasePointGuid, now);

            if (EntitySales == null)
            {
                throw new NotFoundException($"EntitySales({BasePointGuid}) не найден");
            }

            var Place = new EntityPlace(PlaceId, now);

            EntitySales.CreateNewPlaceForEntity(EntityId, Place);

            await _EntitySalesRepository.UpdateEntitySale(EntitySales, user, now);

            return(Place);
        }
 public static void EtDirectPlaceAreEqual(EntityPlace Place, Ep Ep)
 {
     Assert.Equal(Ep.EpGuid, Place.Id);
     Assert.Equal(Ep.PlaceId, Place.Pcc);
     Assert.Equal(Ep.ValidFrom, Place.AuthorizationDate);
 }
 private static void UpdateFromPlace(Lt Lt, EntityPlace Place)
 {
     Lt.PlaceId      = Place.Pcc;
     Lt.AutorizeDate = Place.AuthorizationDate;
     Lt.ValidFrom    = Place.AuthorizationDate;
 }
 public MapPlaceEntityEntityExpiration(EntityPlace Place, EntityEntity Entity, EntityExpiration EntityExpiration)
 {
     Place            = Place;
     Entity           = Entity;
     EntityExpiration = EntityExpiration;
 }