private void dgvLinelist_CellClick(object sender, DataGridViewCellEventArgs e) { if (e.ColumnIndex == 8) { int line_id = dgvLinelist[3, e.RowIndex].Value.ToInt(); if (dgvLinelist[8, e.RowIndex].Value.ToString() == "사용") { if (service.UseTypeChange(line_id, "N")) { dgvLinelist[8, e.RowIndex].Value = "미사용"; } } else if (dgvLinelist[8, e.RowIndex].Value.ToString() == "미사용") { if (service.UseTypeChange(line_id, "Y")) { dgvLinelist[8, e.RowIndex].Value = "사용"; } } dgvLinelist.ClearSelection(); } }