Example #1
0
        private void RaiseEditAddressInteractionRequest(OrderAddress item)
        {
            if (item != null)
            {
                var itemClone = item.DeepClone(EntityFactory as IKnownSerializationTypes);
                var itemVM    = _addressVmFactory.GetViewModelInstance(new KeyValuePair <string, object>("addressItem", itemClone));

                var confirmation = new Confirmation {
                    Title = "Edit order address".Localize(), Content = itemVM
                };

                // CommonOrderCommandConfirmRequest.Raise(confirmation, (x) =>
                DisableableCommandConfirmRequest.Raise(confirmation, (x) =>
                {
                    if (x.Confirmed)
                    {
                        OnUIThread(() => item.InjectFrom <CloneInjection>(itemClone));
                        // fake assign for GUI update trigger
                        item.OrderAddressId = item.OrderAddressId;
                        OnViewModelPropertyChangedUI(null, null);
                    }
                });
            }
        }