private void ClosedDashBoard(object sender, FormClosedEventArgs e)
 {
     if (newInvoice.CompanyID != 0)
     {
         InvoiceDetailsForm form = new InvoiceDetailsForm(newInvoice);
         form.FormClosed += ClesedInvoiceDetailsForm;
         form.ShowDialog();
     }
 }
 private void ShowInvoiceDetails()
 {
     if (listView1.SelectedItems.Count > 0)
     {
         var theInvoice          = (Invoice)listView1.SelectedItems[0].Tag;
         InvoiceDetailsForm form = new InvoiceDetailsForm(theInvoice);
         form.FormClosed += ClesedInvoiceDetailsForm;
         form.ShowDialog();
     }
 }