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); }
public virtual ActionResult SetAirWaybill(long applicationId, long?airWaybillId) { _applicationAwbManager.SetAwb(applicationId, airWaybillId); return(new HttpStatusCodeResult(HttpStatusCode.OK)); }