Ejemplo n.º 1
0
        void AfterCustomerSaved(AfterCustomerSavedEventArgs customerArgs)
        {
            long startTicks = Log.Trace(String.Format("Enter"), Common.LOG_APPNAME);

            var lookupItem = Customers.Single(l => l.Id == customerArgs.Id);

            lookupItem.DisplayMember = customerArgs.DisplayMember;

            Log.Trace(String.Format("Exit"), Common.LOG_APPNAME, startTicks);
        }
Ejemplo n.º 2
0
        private void AfterCustomerSaved(AfterCustomerSavedEventArgs args)
        {
            var navigationItem = Customers.SingleOrDefault(x => x.CustomerId == args.SavedCustomer.Id);

            if (navigationItem == null)
            {
                Customers.Add(new NavigationItemViewModel(args.SavedCustomer.Id,
                                                          GetCustomerDisplayString(args.SavedCustomer), _eventAggregator)
                {
                    IsSelected = true
                });
            }
            else
            {
                navigationItem.DisplayMember = GetCustomerDisplayString(args.SavedCustomer);
            }
        }