private void CheckDatas_CellClick(object sender, DataGridViewCellEventArgs e) { if (e.ColumnIndex == 0) { string err = string.Empty; if (CheckDatas.Rows[e.RowIndex].Cells[0].Value.ToString() == "False") { CheckDatas.Rows[e.RowIndex].Cells[0].Value = true; try { sql.SetWebServerce(CheckDatas.Rows[e.RowIndex].Cells[0].Value.ToString(), CheckDatas.Rows[e.RowIndex].Cells[2].Value.ToString(), out err); } catch (Exception ex) { MessageBox.Show(ex.Message, "Error"); } } else { CheckDatas.Rows[e.RowIndex].Cells[0].Value = false; try { sql.SetWebServerce(CheckDatas.Rows[e.RowIndex].Cells[0].Value.ToString(), CheckDatas.Rows[e.RowIndex].Cells[2].Value.ToString(), out err); } catch (Exception ex) { MessageBox.Show(ex.Message, "Error"); } } } }