Exemple #1
0
 public override object Execute()
 {
     m_invoiceToDelete.DeleteItem();
     m_invoiceToDelete.DeleteDatabaseRecord();
     m_invoices.Remove(m_invoiceToDelete);
     return(null);
 }
 /// <summary>
 /// The OnRemoveInvoice
 /// </summary>
 private void OnRemoveInvoice()
 {
     if (SelectedInvoice != null)
     {
         if (SelectedInvoice.Product.Type.Name == "ft")
         {
             SelectedInvoice.Product.Stock +=
                 (SelectedInvoice.Length * SelectedInvoice.Width) * SelectedInvoice.Quantity;
         }
         else
         {
             SelectedInvoice.Product.Stock += SelectedInvoice.Quantity;
         }
         InvoiceList.Remove(SelectedInvoice);
         RaisePropertyChanged(() => Products);
         RaisePropertyChanged(() => SelectedProduct);
     }
     CalculateTotal();
 }