public static string Show(Window owner)
        {
            var newSeg = new NewCartWindow(owner);
            newSeg.ShowDialog();

            if (newSeg.Cancel)
            {
                return null;
            }

            return newSeg.Name;
        }
Beispiel #2
0
        public static string Show(Window owner)
        {
            var newSeg = new NewCartWindow(owner);

            newSeg.ShowDialog();

            if (newSeg.Cancel)
            {
                return(null);
            }

            return(newSeg.Name);
        }
Beispiel #3
0
        private void newCartButton_Click(object sender, RoutedEventArgs e)
        {
            _context = (ManagerContext)DataContext;
            var name = NewCartWindow.Show(this);

            if (!string.IsNullOrEmpty(name))
            {
                var c = new ManagerCart(name)
                {
                    CanBeDeleted   = true,
                    ShowInCartList = true
                };

                _context.Carts.Add(c);
                _context.PreviewCart = c;
            }
        }