private ReviewTransportBranch GetReviewTransportBranch(TravelReviewViewModel viewModel) { ReviewTransportBranch transportBranch = new ReviewTransportBranch(); transportBranch.BranchId = viewModel.TransportBranchId; transportBranch.ReviewTransportBranchOrientation = this.GetReviewTransportBranchOrientation(viewModel); return(transportBranch); }
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); }