private void CloseSupermarketCheckout_Click(object sender, RoutedEventArgs e) { if (listView.SelectedItems.Count > 0) { SupermarketCheckoutList item = (SupermarketCheckoutList)listView.SelectedItems[0]; _viewModel.CloseSupermarketCheckout(item.Id); _viewModel.Load(); } else { MessageBox.Show("Debe seleccionar una caja", "Información"); } }
private void ServeClient_Click(object sender, RoutedEventArgs e) { if (listView.SelectedItems.Count > 0) { SupermarketCheckoutList item = (SupermarketCheckoutList)listView.SelectedItems[0]; if (item.ClientsToAttend == 0) { MessageBox.Show("La caja no tiene clientes por atender", "Información"); return; } _viewModel.ServeClient(item.Id); _viewModel.Load(); } else { MessageBox.Show("Debe seleccionar una caja", "Información"); } }