private void dgv_MaterialList_CellContentClick(object sender, DataGridViewCellEventArgs e)
{
if (e.ColumnIndex != 0 || e.RowIndex == -1) return;
for (int i = 0; i < dgv_MaterialList.Rows.Count; i++)
{
DataGridViewCheckBoxCell checkcell = (DataGridViewCheckBoxCell)dgv_MaterialList.Rows[i].Cells[0];
if (e.RowIndex == i)
{
checkcell.Value = !Convert.ToBoolean(checkcell.Value);
}
else
{
checkcell.Value = false;
}
}
}