private ReviewTransport GetReviewTransport(TravelReviewViewModel viewModel) { ReviewTransport transport = new ReviewTransport(); transport.TransportId = viewModel.TransportId; transport.ReviewTransportBranch = this.GetReviewTransportBranch(viewModel); return(transport); }
private void FillTransportIfItIsNecessary(ReviewTransport transport) { if (String.IsNullOrEmpty(transport.Description)) { Transport existingTransport = this._transportService.GetTransportById(transport.TransportId); transport.Description = existingTransport.Description; } this.FillBranchIfItIsNecessary(transport); }
private void FillOrientationIfItIsNecessary(ReviewTransport transport) { ReviewTransportBranch branch = transport.ReviewTransportBranch; ReviewTransportBranchOrientation orientation = branch.ReviewTransportBranchOrientation; if (String.IsNullOrEmpty(orientation.Description)) { TransportBranchOrientation existingOrientation = this._transportService.GetTransportBranchOrientationById(transport.TransportId, branch.BranchId, orientation.OrientationId); orientation.Description = existingOrientation.Description; } }
private void FillBranchIfItIsNecessary(ReviewTransport transport) { ReviewTransportBranch branch = transport.ReviewTransportBranch; if (String.IsNullOrEmpty(branch.Description)) { TransportBranch existingBranch = this._transportService.GetTransportBranchById(transport.TransportId, branch.BranchId); branch.Description = existingBranch.Description; } this.FillOrientationIfItIsNecessary(transport); }