private void btn_delete_Click(object sender, RoutedEventArgs e) { MessageBoxResult messageBoxResult = System.Windows.MessageBox.Show("Delete Record?", "Sales Record", System.Windows.MessageBoxButton.YesNo); if (messageBoxResult == MessageBoxResult.Yes) { foreach (Class.order_details p in tbl_orders.Items) { update_product(p.qty, p.product_id); } Reports.sort_date(DateTime.Now.ToString("MMMM-yyyy")); delete_sales(int.Parse(lbl_invoice.ToString())); MessageBox.Show("Successfully Removed Data!", "Payment", MessageBoxButton.OK, MessageBoxImage.Information); this.Close(); } else { return; } }
private void dteSelectedMonth_MouseDoubleClick(object sender, MouseButtonEventArgs e) { report.sort_date(dteSelectedMonth.DisplayDate.ToString("MMMM-yyyy")); }