Esempio n. 1
0
        private ReviewTransport GetReviewTransport(TravelReviewViewModel viewModel)
        {
            ReviewTransport transport = new ReviewTransport();

            transport.TransportId           = viewModel.TransportId;
            transport.ReviewTransportBranch = this.GetReviewTransportBranch(viewModel);

            return(transport);
        }
Esempio n. 2
0
        private void FillTransportIfItIsNecessary(ReviewTransport transport)
        {
            if (String.IsNullOrEmpty(transport.Description))
            {
                Transport existingTransport = this._transportService.GetTransportById(transport.TransportId);

                transport.Description = existingTransport.Description;
            }

            this.FillBranchIfItIsNecessary(transport);
        }
Esempio n. 3
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;
            }
        }
Esempio n. 4
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);
        }