private void chkComplete_Unchecked(object sender, RoutedEventArgs e) { var selectedItem = invoiceDataGrid.SelectedItem as InvoiceData; if (selectedItem != null) { selectedItem.Cancelled = false; selectedItem.CancelledBy = 0; selectedItem.CancellationReason = ""; DbInsert.CancelSale(selectedItem); } }
private void chkComplete_Checked(object sender, RoutedEventArgs e) { var selectedItem = invoiceDataGrid.SelectedItem as InvoiceData; if (selectedItem != null) { selectedItem.Cancelled = true; selectedItem.CancelledBy = Globals.LogInID; selectedItem.CancellationReason = "Double Sale"; DbInsert.CancelSale(selectedItem); } }