Esempio n. 1
0
        private void buttonedit_Click(object sender, EventArgs e)
        {
            if (listBox1.SelectedIndex == -1)
            {
                MessageBox.Show("please Select an entry first");
            }

            if (listBox1.SelectedIndex >= 0)
            {
                int index = listBox1.SelectedIndex;
                var form  = new FormCpyDetail(Dc, _cpyList[index], _allPersonList, _glist);
                form.ShowDialog();

                RefreshListbox();
            }
        }
Esempio n. 2
0
        private void buttoninsert_Click(object sender, EventArgs e)

        {
            Company       newCompany = new Company();
            FormCpyDetail form       = new FormCpyDetail(Dc, newCompany, _allPersonList, _glist);

            form.ShowDialog();
            if (_cpyList == null)
            {
                return;
            }
            else
            {
                _cpyList.Add(newCompany);
                RefreshListbox();
            }
        }