private void btThem_Click(object sender, EventArgs e)
{
for(int i=0;i<dataGridView1.Rows.Count-1;i++)
{
if(dataGridView1.Rows[i].Cells["Checked"].Value ==true)
{
cmTheoHocLop.Parameters["@X"].Value = tbMSSV.Text;
cmTheoHocLop.Parameters["@Y"].Value = dataGridView1.Rows[i].Cells["MaLop"].Value;
sqlConnection1.Open();
cmTheoHocLop.ExecuteNonQuery();
sqlConnection1.Close();
}
}
}
it has a error :Error 3 Operator '==' cannot be applied to operands of type 'object' and 'bool' D:\lvthao\QLHP\QLHP\FrmDKHP.cs 48 20 QLHP
Thanks so much!!