private ActionResult ConfirmCore()
        {
            IPedestrianRequest requestSLO = _adaptersExtender.ServicesFactory.GetCurrentDataService().CreatePedestrianRequest(_user.Model.PersonId, _response.ResponseAuthor.Model.PersonId);

            requestSLO.TargetName     = _model.Target.Name;
            requestSLO.TargetLocation = _model.Target.Location;
            requestSLO.Comment        = _model.Comment;
            return(_adaptersExtender.ServicesFactory.GetCurrentDataService().PushPedestrianRequest(requestSLO));
        }
Exemple #2
0
        private PedestrianRequestLogic CreatePedestrianRequestLogic(IPedestrianRequest requestSLO)
        {
            PedestrianLogic requestAuthor = _pedestrians.Items.FirstOrDefault(p => p.Model.PersonId == requestSLO.PedestrianId);

            return(requestAuthor == null ? null : new PedestrianRequestLogic(new PedestrianRequestModel(requestAuthor.Model)
            {
                RequestId = requestSLO.Id,
                PaymentAmount = requestSLO.PaymentAmount,
                Currency = requestSLO.Currency,
                Comment = requestSLO.Comment,
                IsCancelled = requestSLO.IsCanceled,
            }, _adaptersExtender, requestAuthor, this));
        }
Exemple #3
0
        private PedestrianProfileRequestLogic CreateRequestLogic(IPedestrianRequest requestSLO)
        {
            DriverLogic driver = _city.Persons.OfType <DriverLogic>().SingleOrDefault(d => d.Model.PersonId == requestSLO.DriverId);

            if (driver == null)
            {
                return(null);
            }
            PedestrianProfileRequestLogic outResult = new PedestrianProfileRequestLogic(new PedestrianProfileRequestModel(_model, driver.Model)
            {
                RequestId = requestSLO.Id,
                Comment   = requestSLO.Comment
            }, _adaptersExtender, this);

            outResult.Response = new DriverResponseLogic(new DriverResponseModel(outResult.Model, driver.Model), _adaptersExtender, outResult, driver);
            return(outResult);
        }
Exemple #4
0
 private bool ValidatePedestrianRequest(IPedestrianRequest slo)
 {
     return(!slo.IsCanceled);
 }
Exemple #5
0
 private bool ComparePedestrianRequests(PedestrianRequestLogic logic, IPedestrianRequest slo)
 {
     return(logic.Model.RequestId == slo.Id);
 }
        public ActionResult PushPedestrianRequest(IPedestrianRequest requestSLO)
        {
            ITaxiOnlineService channel = _proxy.Channel;

            return(_proxy.RunRequestSafe(() => channel.PushPedestrianRequest(((PedestrianRequestSLO)requestSLO).GetDataContract()), channel));
        }
Exemple #7
0
 public ActionResult PushPedestrianRequest(IPedestrianRequest requestSLO)
 {
     throw new NotImplementedException();
 }
Exemple #8
0
 private bool ValidateRequest(IPedestrianRequest requestSLO)
 {
     return(requestSLO.PedestrianId == _model.PersonId && !requestSLO.IsCanceled);
 }
Exemple #9
0
 private bool CompareRequestsInfo(PedestrianProfileRequestLogic logic, IPedestrianRequest slo)
 {
     return(logic.Model.RequestId == slo.Id);
 }