private void EditPaymentProperty(PaymentMethodPropertyValue selectedItem) { // todo: delete all this //var item = selectedItem.DeepClone(_entityFactory as IKnownSerializationTypes); //ConditionalConfirmation confirmation = new ConditionalConfirmation(); //confirmation.Title = "Enter Property Value"; //confirmation.Content = // Container.Resolve<IPaymentMethodsAddPropertyValueViewModel>(new ParameterOverride("innerItem", item)); //AddEditPaymentPropertyRequest.Raise(confirmation, // (x) => // { // if (x.Confirmed) // { // selectedItem.InjectFrom<CloneInjection>(item); // IsModified = true; // } // }); }
private void RemovePaymentProperty(PaymentMethodPropertyValue selectedItem) { ConditionalConfirmation confirmation = new ConditionalConfirmation(); confirmation.Title = "Value clear confirmation".Localize(); confirmation.Content = string.Format("Clear Property Value '{0}'?".Localize(), selectedItem.Name); // RemovePaymentPropertyRequest// ?? CommonConfirmRequest.Raise(confirmation, (x) => { if (x.Confirmed) { var item = InnerItem.PaymentMethodPropertyValues.SingleOrDefault( pp => pp.PaymentMethodPropertyValueId == selectedItem.PaymentMethodPropertyValueId); if (item != null) { InnerItem.PaymentMethodPropertyValues.Remove(item); item.PaymentMethodId = null; } } }); }