for (int i = 0; i < dg_tixing.RowCount; i++) { string re_value = dg_tixing.Rows[i].Cells[0].EditedFormattedValue.ToString(); if (re_value=="True")//判断勾选的 {
T_KeChengTiXing kc = new T_KeChengTiXing(); kc.course_id = PK_Course; kc.tixing_id = Int32.Parse(dg_tixing.Rows[i].Cells[1].Value.ToString()); T_KeChengTiXingControl kcc = new T_KeChengTiXingControl(); kcc.Add(kc); flag = true;