我正在尝试用C#winform和Linq制作一个评分系统,但我坚持这个......我不确定我做对了.. 在组合框中,我有数据' Class Standing,Performance Task和Major Exam'。当我选择“站立”时它应该能够显示' Seatwork'和'作业'在Datagridview中,我的数据库中有什么,如果我选择“性能任务”#39;它应该显示口头参与'和'项目'
答案 0 :(得分:0)
private void comboBox1_SelectedIndexChanged(object sender, EventArgs e)
{
if (comboBox1.SelectedIndex == 0)//Class Standing
{
//clear DataGridView
//load data from database to dataGridView1
}
else if (comboBox1.SelectedIndex == 1) //Performance Task
{
//clear DataGridView
//load data from database to dataGridView1
}
else if (comboBox1.SelectedIndex == 2) //Major Exam
{
//clear DataGridView
//load data from database to dataGridView1
}
}
我希望它对你有用