private List<getWorkDetails> getWorkInfo(string WorkCenter, string Item) { List<getWorkDetails> x = new List<getWorkDetails>(); string sqlGetTimes = "select start_date, completion_date, complete_quantity from dr_dc_schedule where is_complete = '1' and workcenter_id = '" + WorkCenter + "' and start_date > '" + startValue + "' and start_date < '" + endValue + "' and item_id = '" + Item + "' "; OracleCommand getTimes = new OracleCommand(sqlGetTimes, connShop); OracleDataReader readTimes1 = getTimes.ExecuteReader(); using (readTimes1) { DataTable table = new DataTable(); table.TableName = "Krysiaa"; // Apparantly I need a name to assign a table.. table.Load(readTimes1); dvNewDataViewObject.Table = table; } readTimes1.Dispose(); OracleDataReader readTimes2 = getTimes.ExecuteReader(); TabItem t = new TabItem(); t.Header = Item; t.Name = "itm" + Item; DataGrid dg = new DataGrid(); dg.Name = "dg" + Item; dg.ItemsSource = dvNewDataViewObject; t.Content = dg; TabContAroundPerformGrid.Items.Insert((TabContAroundPerformGrid.Items.Count-1), t);
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)