public DeliveryPointItemVM(DeliveryPointBundle bundle) { _bundle = bundle; if (bundle == null) { throw new ArgumentNullException(nameof(bundle)); } Id = bundle.Id; Name = bundle.Name; Address = bundle.Address; WorkTime = bundle.WorkTime; Distance = bundle.Distance; Phone = bundle.Phone; AdditionalInfo = bundle.Info; if (bundle.Latitude > 0 && bundle.Longitude > 0) { Coordinates = new Coordinates { Latitude = bundle.Latitude, Longitude = bundle.Longitude }; } }
public DeliveryPointItemVM(DeliveryPoint model) { var orderType = Mvx.Resolve <IBasketConfigService>().Config.OrderViewType; _bundle = new DeliveryPointBundle(model, orderType == Enums.OrderViewType.Partial ? NavigationType.PresentModal : NavigationType.Push); if (model == null) { throw new ArgumentNullException(nameof(model)); } Id = model.Id; Name = model.Name; Address = model.Address; WorkTime = model.WorkTime; Distance = model.Distance; Phone = model.Phone; AdditionalInfo = model.AdditionalInfo; Coordinates = model.Coordinates; }
public void NavigateToDeliveryPointOnMap(DeliveryPointBundle bundle) { NavigateTo <IDeliveryPointOnMapVM>(bundle); }
public void NavigateToDeliveryPointAdditionalInfo(DeliveryPointBundle bundle) { NavigateTo <IDeliveryPointAdditionalInfoVM>(bundle); }
protected virtual void InitFromBundle(DeliveryPointBundle deliveryPointBundle) { Item = new DeliveryPointItemVM(deliveryPointBundle); VmNavigationType = deliveryPointBundle.NavigationType; }