private void btnDelete_Click(object sender, System.EventArgs e) { int row = dataGridXGTasK.CurrentRowIndex; if (row == -1) { return; } DialogResult dr = MsgBox.ShowQuestion(GT.TIP_DELELE_DATAGRID_ROW); if (dr == DialogResult.Yes) { int id = int.Parse(dataGridXGTasK[row, 0].ToString()); XGDB.DeleteXGTask(id); LoadXGTaskFromDB(); XGDB.Resolve(); } }