Example #1
0
        private void btnAddConstraint_Click(object sender, EventArgs e)
        {
            ConstraintForm addForm = new ConstraintForm(this._model);

            if (addForm.ShowDialog() == DialogResult.OK)
            {
                this.UpdateConstraintsDataGrid();
            }

            addForm.Dispose();
        }
Example #2
0
        private void btnEditCriteriaConstraint_Click(object sender, EventArgs e)
        {
            if (this.dgvConstraints.SelectedRows.Count == 0 ||
                this.dgvConstraints.SelectedRows.Count > 1)
            {
                MessageBoxHelper.ShowExclamation("Выберите в списке только одно функциональное ограничение для редактирования");
                return;
            }

            TId            index    = (TId)this.dgvConstraints.SelectedRows[0].Cells[0].Value;
            ConstraintForm editForm = new ConstraintForm(this._model, index);

            if (editForm.ShowDialog() == DialogResult.OK)
            {
                this.UpdateConstraintsDataGrid();
                SelectDataGridRow((index));
            }
            editForm.Dispose();
        }