private void generateReort_button_Click(object sender, RoutedEventArgs e)
        {
            List <String> SerialNumbers = GetSelectedSerialNumbers();

            if (SerialNumbers.Count == 0)
            {
                MessageBox.Show("Please select serial numbers.");
                return;
            }
            DataTable           dtResult       = GCIDB.GetLifetimeData(SelectedPartName, SelectedBatchName, SerialNumbers);
            LifetimeLimitEntity Limits         = GCIDB.GetLifetimeLimits(SelectedPartName);
            LifeTimeReportData  LifetimeReport = new LifeTimeReportData(dtResult, Limits);

            LifetimeReport.GenerateExcelOutput(customerName_textBox.Text, PO_textBox.Text, prodDesc_textBox.Text, SelectedPartName, SelectedBatchName);
            //ExportToExcel.FastExportToExcel(dtResult);
        }
        private void serialNumbers_listBox_SelectionChanged(object sender, SelectionChangedEventArgs e)
        {
            // List<string> SerialNumbers = GetSelectedSerialNumbers();
            //Show that the Button is functioning
            //MessageBox.Show(string.Format("Pulling Legacy Report for Part ID: {0}  Batch ID: {1} and Serial Number: {2}", SelectedPartName, SelectedBatchName, SelectedSerialNumbers));
            GCIDB.Initialize();
            GCIDB.OpenConnection();

            List <String> SerialNumbers = GetSelectedSerialNumbers();

            if (SerialNumbers.Count == 0)
            {
                MessageBox.Show("Please select serial numbers.");
                return;
            }
            DataTable           dtResult       = GCIDB.GetLifetimeData(SelectedPartName, SelectedBatchName, SerialNumbers);
            LifetimeLimitEntity Limits         = GCIDB.GetLifetimeLimits(SelectedPartName);
            LifeTimeReportData  LifetimeReport = new LifeTimeReportData(dtResult, Limits);

            //dt = GCIDB.GetLifetimeData(SelectedPartName, SelectedBatchName, SelectedSerialNumbers);
            dataGrid.DataContext = dtResult;
        }