Ejemplo n.º 1
0
        private void BtnNext_Click(object sender, RoutedEventArgs e)
        {
            // 将选择数量为0的,从数据中删除。倒叙保证下标位置。
            // 如果选择的全是零,那么应该有提示
            int count = productItems.Count();

            foreach (ProductItem item in productItems)
            {
                if (item.Num == 0)
                {
                    count--;
                }
            }

            if (count == 0)
            {
                MessageBox.Show("请至少选择一种刀具,且数量不为零");
                return;
            }
            ConfirmPage confirmPage = new ConfirmPage(productItems.AsList());

            this.NavigationService.Navigate(confirmPage);
        }
Ejemplo n.º 2
0
        private void BtnNext_Click(object sender, RoutedEventArgs e)
        {
            ConfirmPage confirmPage = new ConfirmPage(productItems.AsList());

            this.NavigationService.Navigate(confirmPage);
        }