Пример #1
0
        private void btnAddNew_Click(object sender, EventArgs e)
        {
            ConditionView conditionView = new ConditionView();

            conditionView.ShowDialog();
            if (conditionView.DialogResult == DialogResult.OK)
            {
                conditions.Add(conditionView.curCondition);
                LoadList();
            }
        }
Пример #2
0
        private void btnModify_Click(object sender, EventArgs e)
        {
            var selectedRowIndex = dgvConditions.SelectedRows[0].Index;

            var item = conditions[selectedRowIndex];

            ConditionView conditionView = new ConditionView(item);

            conditionView.ShowDialog();
            if (conditionView.DialogResult == DialogResult.OK)
            {
                conditions[selectedRowIndex] = conditionView.curCondition;
                LoadList();
            }
        }