private void findAddress_Click(object sender, EventArgs e)
 {
     FindAddress findaddress = new FindAddress();
     if (listRouteItems.SelectedIndex != -1)
     {
         int index=0;
         for (int i = 0; i < scheduledinvoicesorder.Count; i++)
         {
             if (listRouteItems.SelectedIndex == scheduledinvoicesorder[i])
             {
                 index = i;
             }
         }
             findaddress.SetInvoice(scheduledinvoices[index], 1, viewdate, driver, true);
     }
     if (listAllItems.SelectedIndex != -1)
     {
         findaddress.SetInvoice(viewinvoices[listAllItems.SelectedIndex], 1, viewdate, driver, true);
     }
     findaddress.Show();
     this.Close();
 }
 private void findAddress_Click(object sender, EventArgs e)
 {
     FindAddress findaddress = new FindAddress();
     findaddress.SetInvoice(viewinvoices[listInvoices.SelectedIndex], 0, viewdate, null,true);
     findaddress.Show();
     this.Close();
 }
 private void FindLocation_Click(object sender, EventArgs e)
 {
     FindAddress findaddress = new FindAddress();
     findaddress.SetInvoice(inputinvoice, 2, viewdate, null,caller);
     findaddress.Show();
     this.Close();
 }