示例#1
0
        private void buttonEditText_Click(object sender, EventArgs e)
        {
            TextDetailForm f = new TextDetailForm();

            f.CommunicatorDataSet.Merge(communicatorDataSet);

            f.CommunicatorDataSet.DefaultViewManager.DataViewSettings["Text"].RowFilter = "TextId=" + _currentTextRow.TextId;

            if (f.ShowDialog() == DialogResult.OK)
            {
                communicatorDataSet.Merge(f.CommunicatorDataSet);
                RefreshTextListView();
            }
        }
示例#2
0
        private void buttonAddText_Click(object sender, EventArgs e)
        {
            TextDetailForm f = new TextDetailForm();

            f.CommunicatorDataSet.Merge(communicatorDataSet);

            ADACommunicatorDataSet.TextRow newTextRow = f.CommunicatorDataSet.Text.NewTextRow();
            newTextRow.ScenarioId = _currentScenarioRow.ScenarioId;
            newTextRow.Name       = "";
            newTextRow.Descripton = "";
            f.CommunicatorDataSet.Text.AddTextRow(newTextRow);

            f.CommunicatorDataSet.DefaultViewManager.DataViewSettings["Text"].RowFilter = "TextId=" + newTextRow.TextId;

            if (f.ShowDialog() == DialogResult.OK)
            {
                communicatorDataSet.Merge(f.CommunicatorDataSet);
                _currentTextRow = communicatorDataSet.Text.FindByTextId(newTextRow.TextId);
                RefreshTextListView();
            }
        }