예제 #1
0
        private void toolStripMenuItem18_Click(object sender, EventArgs e)
        {
            var           editTool = dataGridViewMuseum.SelectedRows[0].DataBoundItem as Museum;
            AddMuseumForm admf     = new AddMuseumForm(editTool);

            if (admf.ShowDialog() == DialogResult.OK)
            {
                museumBindingSource.ResetBindings(false);
                art.isChangeData = true;
            }
        }
예제 #2
0
        private void toolStripMenuItem4_Click(object sender, EventArgs e)
        {
            AddMuseumForm admf = new AddMuseumForm();

            if (admf.ShowDialog() == DialogResult.OK)
            {
                art.AddMuseum(admf.museum);
                museumBindingSource.ResetBindings(false);
                art.isChangeData = true;
                var lastIdx = dataGridViewMuseum.Rows.Count - 1;
                dataGridViewMuseum.Rows[lastIdx].Selected          = true;
                dataGridViewMuseum.FirstDisplayedScrollingRowIndex = lastIdx;
            }
        }