DataSet ds = new DataSet(); MySqlDataAdapter daProfit = new MySqlDataAdapter(); public void FillDataGridProfit() { DataGridViewRow rowProfit = this.dgProfit.RowTemplate; rowProfit.DefaultCellStyle.BackColor = Color.Bisque; MySqlCommand slctProfit = new MySqlCommand("SELECT sum(value),name,IdUser FROM PROFITVIEW where IdUser = '" + this.user.IdUser + "' group by name order by sum(value)", connection); daProfit.SelectCommand = slctProfit; daProfit.Fill(ds, "tblProfit"); dgProfit.DataSource = ds.Tables["tblProfit"]; }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)