예제 #1
0
파일: AwbManager.cs 프로젝트: UHgEHEP/test
        public long Create(long?applicationId, AirWaybillEditData data, long creatorUserId)
        {
            if (data.GTD != null)
            {
                throw new InvalidLogicException("GTD data should be defined by update");
            }

            var id = _awbs.Add(data, _stateConfig.CargoIsFlewStateId, creatorUserId);

            if (applicationId.HasValue)
            {
                _applicationAwbManager.SetAwb(applicationId.Value, id);
            }

            if (data.BrokerId.HasValue)
            {
                _events.Add(id, EventType.SetBroker, EventState.Emailing);
            }

            _events.Add(id, EventType.AwbCreated, EventState.Emailing, data);

            return(id);
        }
예제 #2
0
        public virtual ActionResult SetAirWaybill(long applicationId, long?airWaybillId)
        {
            _applicationAwbManager.SetAwb(applicationId, airWaybillId);

            return(new HttpStatusCodeResult(HttpStatusCode.OK));
        }