示例#1
0
        /// <summary>
        /// запрашивем список серверов БД
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void button3_Click(object sender, EventArgs e)
        {
            ShowTimeFormDB frm = new ShowTimeFormDB();

            if (frm.ShowDialog(this) == System.Windows.Forms.DialogResult.OK)
            {
                System.Data.DataTable table = frm.DataTables;

                dataGridView1.DataSource = table;

                dataGridView1.SelectionMode = DataGridViewSelectionMode.FullRowSelect;
                dataGridView1.MultiSelect   = false;

                dataGridView1.EditMode = DataGridViewEditMode.EditProgrammatically;
                dataGridView1.ReadOnly = true;
            }
        }
示例#2
0
        /// <summary>
        /// запрашивем список серверов БД
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void button3_Click(object sender, EventArgs e)
        {
            ShowTimeFormDB frm = new ShowTimeFormDB();
            if (frm.ShowDialog(this) == System.Windows.Forms.DialogResult.OK)
            {
                System.Data.DataTable table = frm.DataTables;

                dataGridView1.DataSource = table;

                dataGridView1.SelectionMode = DataGridViewSelectionMode.FullRowSelect;
                dataGridView1.MultiSelect = false;

                dataGridView1.EditMode = DataGridViewEditMode.EditProgrammatically;
                dataGridView1.ReadOnly = true;
            }
        }