예제 #1
0
        private void RaiseOpenCustomerProfileInteractionRequest()
        {
            if (InnerItem != null && InnerItem.CustomerId != null)
            {
                var parameters = new[]
                {
                    new KeyValuePair <string, object>("customerId", InnerItem.CustomerId),
                    new KeyValuePair <string, object>("fullName", InnerItem.CustomerName),
                };

                var itemVM = _contactVmFactory.GetViewModelInstance(parameters);

                var confirmation = new ConditionalConfirmation {
                    Title = "Edit customer profile".Localize(), Content = itemVM
                };

                CommonOrderCommandConfirmRequest.Raise(confirmation, (x) =>
                {
                    if (x.Confirmed)
                    {
                        var content            = (x.Content as IOrderContactViewModel);
                        InnerItem.CustomerName = content.FullName;
                    }
                });
            }
        }
예제 #2
0
 private void RaiseHoldOrderInteractionRequest()
 {
     CommonOrderCommandConfirmRequest.Raise(
         new ConditionalConfirmation {
         Content = "Are you sure you want to put the order 'On Hold'?".Localize(), Title = "Order 'On Hold'".Localize()
     },
         (x) =>
     {
         if (x.Confirmed)
         {
             _innerModel.HoldOrder();
             Recalculate();
         }
     });
 }
예제 #3
0
 private void RaiseCancelOrderInteractionRequest()
 {
     CommonOrderCommandConfirmRequest.Raise(
         new ConditionalConfirmation {
         Content = "Are you sure you want to cancel order?".Localize(), Title = "Cancel Order".Localize()
     },
         (x) =>
     {
         if (x.Confirmed)
         {
             _innerModel.CancelOrder();
             Recalculate();
         }
     });
 }