Beispiel #1
0
        private void batchName_listBox1_SelectionChanged(object sender, SelectionChangedEventArgs e)
        {
            if (batchName_listBox1.SelectedIndex == -1)
            {
                MessageBox.Show("Select a Batch Name!");
            }
            else
            {
                SelectedBatchName = batchName_listBox1.SelectedItem.ToString();
                // MessageBox.Show(string.Format("Pulling Legacy Report for Part ID: {0}  Batch ID: {1}", SelectedPartName, SelectedBatchName));

                //connect to DB, get production data then return into datatable
                GCIDB.Initialize();
                GCIDB.OpenConnection();
                dt = GCIDB.GetProductionData(SelectedPartName, SelectedBatchName);
                dataGrid.DataContext = dt;
            }
        }