Exemple #1
0
        private void button1_Click(object sender, EventArgs e)
        {
            ProfileForm profileForm = new ProfileForm(newDBcon);

            profileForm.MdiParent = this.MdiParent;
            profileForm.Show();
        }
Exemple #2
0
        private void bnChange_Click(object sender, EventArgs e)
        {
            //MessageBox.Show(((DataView)dgListPerson.DataSource).Count.ToString());
            if (((DataView)dgListPerson.DataSource).Count == 0)
            {
                return;
            }

            int RowIndex = 0;

            RowIndex = dgListPerson.CurrentRow.Index;
            //int RowIndex = (int)dgListPerson[dgListPerson.CurrentRowIndex,0];
            DataRow row = ((DataView)dgListPerson.DataSource)[RowIndex].Row;

            ProfileForm profileForm = new ProfileForm(newDBcon, row);

            profileForm.MdiParent = this.MdiParent;
            profileForm.Show();
        }
Exemple #3
0
        private void dgListPerson_DoubleClick(object sender, EventArgs e)
        {
            if (((DataView)dgListPerson.DataSource).Count == 0)
            {
                return;
            }

            int RowIndex = 0;

            RowIndex = dgListPerson.CurrentRow.Index;

            //MessageBox.Show(((DataView)dgListPerson.DataSource).Count.ToString() + RowIndex.ToString());

            /*
             * if (((DataView)dgListPerson.DataSource).Count == RowIndex + 1)
             *  return;
             */
            DataRow row = ((DataView)dgListPerson.DataSource)[RowIndex].Row;

            ProfileForm profileForm = new ProfileForm(newDBcon, row);

            profileForm.MdiParent = this.MdiParent;
            profileForm.Show();
        }