private void InvoiceBtn_Click(object sender, RibbonControlEventArgs e) { XLForms.ClientForm clientForm = new XLForms.ClientForm(); clientForm.ShowDialog(); if (clientForm.selectedClient != null) { XLMain.Client client = clientForm.selectedClient; XLMain.FPIClient fpiClient = XLMain.FPIClient.GetFPIClientInvoice(client); List <XLMain.FPIClient> clientList = new List <XLMain.FPIClient>(); clientList.Add(fpiClient); XLDocument.MergeFPIData(clientList.OrderBy(c => c.office).ToList()); } }
private void Merge4Btn_Click(object sender, RibbonControlEventArgs e) { XLForms.ClientForm clientForm = new XLForms.ClientForm(); clientForm.ShowDialog(); if (clientForm.selectedClient != null) { XLMain.Client client = clientForm.selectedClient; List <XLMain.FPIClient> clients = XLMain.FPIClient.GetFPIClients(client); if (clients.Count > 0) { XLDocument.MergeFPIData(clients.OrderBy(c => c.office).ToList()); } else { MessageBox.Show("No clients founds to merge."); } } }