protected virtual void toolStripButtonRevert_Click(object sender, System.EventArgs e) { var alteracoes = _ctx.ChangesCount; var pergunta = $"{alteracoes} alteraç" + (alteracoes == 1 ? "ão será desfeita" : "ões serão desfeitas") + ". Confirma?"; if (MessageBox.Show(pergunta, this.Text, MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes) { _ctx.RevertChanges(); } EnableSaveButtons(); }
private void buttonDesfazer_Click(object sender, System.EventArgs e) { _ctx.RevertChanges(); buttonSave.Visible = buttonDesfazer.Visible = _ctx.ModifiedAny; dgvBalance.Refresh(); }
private void toolStripButtonDesfazer_Click(object sender, EventArgs e) { _ctx.RevertChanges(); RefreshDataAcoes(); }