Пример #1
0
        public long Add(TransitEditModel transit, long?forsedCarrierId)
        {
            var data = new TransitData();

            TransitMapper.Map(transit, data, GetCarrier(forsedCarrierId, transit.CityId, null));

            var transitId = _transits.Add(data);

            return(transitId);
        }
Пример #2
0
        private void Add(ApplicationEditData application, long clientId, long senderId)
        {
            var transit = _transits.GetByClient(clientId);

            transit.Id = 0;
            var transitId = _transits.Add(transit);

            application.TransitId   = transitId;
            application.ForwarderId = _forwarders.GetByCityOrAny(transit.CityId, null);
            application.Class       = null;
            application.SenderId    = senderId;
            application.ClientId    = clientId;

            _editor.Add(application);
        }