Exemple #1
0
        private void btnAdd_Click(object sender, EventArgs e)
        {
            frmAddModifyTerm f;

            f = new frmAddModifyTerm();

            f.addTerm = true;

            DialogResult result = f.ShowDialog();

            if (result == DialogResult.OK)
            {
                selectedTerm   = f.term;
                txtTermID.Text = selectedTerm.TermsID.ToString();
                this.DisplayTerm();
            }
        }
Exemple #2
0
        private void btnModify_Click(object sender, EventArgs e)
        {
            frmAddModifyTerm f;

            f = new frmAddModifyTerm();

            f.addTerm = false;

            f.term = selectedTerm;

            DialogResult result = f.ShowDialog();

            if (result == DialogResult.OK || result == DialogResult.Retry)
            {
                selectedTerm = f.term;
                this.DisplayTerm();
            }
            else if (result == DialogResult.Abort)
            {
                txtTermID.Text = "";
                this.ClearControls();
            }
        }