Ejemplo n.º 1
0
        private void edit()
        {
            try
            {
                STParticipant data = GetSelectionData();

                if (data.idpart > 0)
                {
                    DlgParticipant wnd = new DlgParticipant(connect, data);

                    DialogResult result = wnd.ShowDialog();

                    if (result == DialogResult.OK)
                    {
                        flawour = wnd.GetFl();

                        init_data();

                        if (gpos >= 0 && dataGridViewPart.Rows.Count > 0)
                        {
                            dataGridViewPart.Rows[gpos].Selected             = true;
                            dataGridViewPart.FirstDisplayedScrollingRowIndex = gpos;
                        }
                    }
                }
            }
            catch (Exception ex) { MessageBox.Show(ex.Message, ex.Source); }
        }
Ejemplo n.º 2
0
        private void add()
        {
            DlgParticipant wnd = new DlgParticipant(connect, mode);

            DialogResult result = wnd.ShowDialog();

            if (result == DialogResult.OK)
            {
                init_data();

                if (dataGridViewPart.Rows.Count > 0)
                {
                    int x = get_num_row(wnd.RetId());
                    dataGridViewPart.Rows[x].Selected = true;

                    dataGridViewPart.FirstDisplayedScrollingRowIndex = x;
                }
            }
        }