예제 #1
0
        private ReviewTransportBranch GetReviewTransportBranch(TravelReviewViewModel viewModel)
        {
            ReviewTransportBranch transportBranch = new ReviewTransportBranch();

            transportBranch.BranchId = viewModel.TransportBranchId;
            transportBranch.ReviewTransportBranchOrientation = this.GetReviewTransportBranchOrientation(viewModel);

            return(transportBranch);
        }
예제 #2
0
        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;
            }
        }
예제 #3
0
        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);
        }