This is my first C# project, using VS 2008 and .NET 3.5, required by the client.
I have a List of type GradeVO
This is my connection and where I’m setting values to a DataGridView
DataSet ds = new DataSet();
SqlConnection Conexao = new SqlConnection(@"Data Source=localhost; Initial Catalog=usr_mmidia; User ID=usr_mmidia; Password=123; MultipleActiveResultSets = true");
Conexao.Open();
SqlDataAdapter da = new SqlDataAdapter("MAG_SP_LISTA_SETORES_SQL", Conexao);
da.SelectCommand.Parameters.Add(new SqlParameter(("@p_codfil"), @"500"));
da.SelectCommand.Parameters.Add(new SqlParameter(("@p_categoria"), categoria));
da.SelectCommand.CommandType = CommandType.StoredProcedure;
DataTable t = new DataTable();
da.Fill(t);
dgNivel1.DataSource = t;
This code is working but I need the DataSource to receive a list of GradeVO, is it possible?
Thanks in advance.
you could always do something like :