1
我想將標記作爲projPoints1設置爲epual SQL查詢返回的內容。基於SQL查詢結果更改標籤文本
這是我目前擁有的代碼:
using (QC.SqlCommand cmd = new QC.SqlCommand("SELECT *,[proj] FROM[dbo].[WeeklyStats] WHERE[playerID] = @player1 AND [weeks] = @week1 "))
{
string week1 = Weeks.SelectedValue.ToString();
cmd.Parameters.AddWithValue("@player1", playerArr[0].ToString());
cmd.Parameters.AddWithValue("@week1", week1);
//runs the sql statement and adds them all to the dropdown list
cmd.Connection = connection;
cmd.CommandType = DT.CommandType.Text;
QC.SqlDataReader reader = cmd.ExecuteReader();
projPoints1.Text = ;
connection.Close();
}