1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35
| Devart.Data.MySql.MySqlDataAdapter myDataAdapter =
new Devart.Data.MySql.MySqlDataAdapter(
"SELECT * "+
"FROM Table1 as fam join Table2 as hfb "+
"on hfb.id_produit=fam.id_produit and hfb.id_famille=fam.id_famille "+
"where fam.id_produit=14 and fam.id_famille=2 "+
, (Devart.Data.MySql.MySqlConnection)(Devart.Common.GlobalComponentsCache.GetObjectByName("FormPrincipale.mySqlConnection")));
// Set chart data source
//chart1.DataSource = myDataAdapter;
DataSet sourceDataSet = new DataSet();
myDataAdapter.Fill(sourceDataSet, "Quantite");
chart1.DataSource = sourceDataSet.Tables["Quantite"];
// Set series members names for the X and Y values
chart1.Series["SeriesEnCours"].XValueMember = "alias";
chart1.Series["SeriesEnCours"].YValueMembers = "EnCours";
chart1.Series["SeriesEnAttente"].YValueMembers = "EnAttente";
// Data bind to the selected data source
//chart1.DataBind();
//DataSet sourceDataSet = new DataSet();
//myDataAdapter.Fill(sourceDataSet, "Quantite");
gridControl1.DataSource = sourceDataSet.Tables["Quantite"];
gridView1.Columns[0].Visible=false;
gridView1.Columns[1].Visible = false;
gridView1.Columns[2].Visible = false;
gridView1.Columns[3].Visible = false;
gridView1.Columns[4].Caption = "Etape";
gridView1.Columns[5].Caption = "Nombre de pièces en attentes";
gridView1.Columns[6].Caption = "Nombre de pièces en cours"; |
Partager