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)); }
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)); }
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); }
private bool ValidatePedestrianRequest(IPedestrianRequest slo) { return(!slo.IsCanceled); }
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)); }
public ActionResult PushPedestrianRequest(IPedestrianRequest requestSLO) { throw new NotImplementedException(); }
private bool ValidateRequest(IPedestrianRequest requestSLO) { return(requestSLO.PedestrianId == _model.PersonId && !requestSLO.IsCanceled); }
private bool CompareRequestsInfo(PedestrianProfileRequestLogic logic, IPedestrianRequest slo) { return(logic.Model.RequestId == slo.Id); }