private void saveSimpleButton_Click(System.Object sender, EventArgs e) { try { machineLineGridView.SelectAll(); if (machineLineGridView.SelectedRowsCount > 0) { for (int i = 0; i < machineLineGridView.SelectedRowsCount; i++) { int row = machineLineGridView.GetSelectedRows()[i]; if (row >= 0) { if (m_MachineLines.UpdateMachineLine((int?)machineLineGridView.GetRowCellValue(row, idGridColumn), machineLineGridView.GetRowCellValue(row, nameGridColumn).ToString()) != true) { MessageBox.Show("The Machine Lines was not updated successfully.", "Error Encountered", MessageBoxButtons.OK, MessageBoxIcon.Error); return; } } } } } catch (ApplicationException ex) { MessageBox.Show(ex.Message, "Error Encountered", MessageBoxButtons.OK, MessageBoxIcon.Error); return; } BindGridControl(); }