private void btnUpdate_Click(object sender, EventArgs e) { if (!chkUpdate.Checked) { MessageBox.Show(UserMessages.ENABLE_EDIT); chkUpdate.Focus(); return; } if (taskData.SelectedRows.Count > 0) { if (MessageBox.Show(UserMessages.ARE_YOU_SURE("Update"), UserMessages.CONFIRMION("Update"), MessageBoxButtons.YesNo) == DialogResult.Yes) { TaskNote task; bool flag = false; foreach (DataGridViewRow row in taskData.SelectedRows) { task = (TaskNote)row.DataBoundItem; flag = taskDTO.update(task, DatabaseConstants.COLUMN_DUEDATE, DatabaseConstants.COLUMN_PRIORITY, DatabaseConstants.COLUMN_STATUS); UserMessages.messageStatus(flag); } refreshTaskData(); } } else { MessageBox.Show(UserMessages.EMPTY_OPERATION("Update")); } }