private void del() { string text = null; try { STGame data = GetSelectionData(); if (data.idgame > 0) { text = string.Format("Вы действиетльно желаете удалить игру {0}?", data.idgame); if (MessageBox.Show(text, "Внимание!", MessageBoxButtons.OKCancel, MessageBoxIcon.Warning) == DialogResult.OK) { clGame.Delete(data); init_data(); } } } catch (Exception ex) { MessageBox.Show(ex.Message, ex.Source); } }
private void ToolStripMenuItemDeleteFileInfo_Click(object sender, EventArgs e) { string text = null; try { STFileInfo data = GetSelectionData(); if (data.filename != null) { text = string.Format("Вы действиетльно желаете файл {0}?", data.filename); if (MessageBox.Show(text, "Внимание!", MessageBoxButtons.OKCancel, MessageBoxIcon.Warning) == DialogResult.OK) { clWork.Delete(data); init_data(); CGame clGame = new CGame(connect); clGame.Delete(data.idseason, data.filename); CStats clStats = new CStats(connect); clStats.Delete(data.idseason, data.filename); CCardTrow lcCardTrow = new CCardTrow(connect); lcCardTrow.Delete(data.idseason, data.filename); CStatsCoach clStatsCoach = new CStatsCoach(connect); clStatsCoach.Delete(data.idseason, data.filename); CStatsReferee lcStatsReferee = new CStatsReferee(connect); lcStatsReferee.Delete(data.idseason, data.filename); } } } catch (Exception ex) { MessageBox.Show(ex.Message, ex.Source); } }