Example #1
0
        private void DeleteSaleDetailButtonClick(object sender, RoutedEventArgs e)
        {
            SaleDetailUI index = ((sender as SaleDetailControl).DataContext as SaleDetailUI);

            newSaleViewModel.DeleteProductToSale(index);
        }
Example #2
0
 public void DeleteProductToSale(SaleDetailUI index)
 {
     SaleDetailUIs.Remove(index);
     TotalSale -= (index.SaleDetail.NbProduct * index.SaleDetail.Price) ?? default;
 }