private void btnDelete_Click(object sender, System.EventArgs e) { int row = dataGridGPRSStation.CurrentRowIndex; if (row == -1) { return; } if (!XGConfig.Default.IsEnableMCS) { MsgBox.Show("删除功能已被禁用!"); return; } DialogResult dr = MsgBox.ShowQuestion(GT.TIP_DELELE_DATAGRID_ROW); if (dr == DialogResult.Yes) { int id = int.Parse(dataGridGPRSStation[row, 0].ToString()); XGDB.DeleteGPRSStation(id); LoadXGStationFromDB(); //XGDB.Resolve(); } }