コード例 #1
0
ファイル: geshouchaxun.cs プロジェクト: HZhdjhdh/S2229
        private void dataGridView1_DoubleClick(object sender, EventArgs e)
        {
            tianjiagequ t = new tianjiagequ();

            t.Text = this.dataGridView1.SelectedRows[0].Cells[0].Value.ToString();
            t.Show();
        }
コード例 #2
0
        //右键修改代码
        private void 修改ToolStripMenuItem_Click(object sender, EventArgs e)
        {
            tianjiagequ f = new tianjiagequ();

            f.button3.Visible = false;
            f.Show();
            string name = dataGridView1.SelectedRows[0].Cells[1].Value.ToString();

            f.textBox1.Text     = name;
            f.textBox1.ReadOnly = true;
            string typeid = dataGridView1.SelectedRows[0].Cells[5].Value.ToString();

            f.textBox4.Text = typeid.ToString();
            string miaosh = dataGridView1.SelectedRows[0].Cells[2].Value.ToString();

            f.comboBox1.Text = miaosh;
            string miao = dataGridView1.SelectedRows[0].Cells[4].Value.ToString();

            f.textBox2.Text = miao;
            string miaos = dataGridView1.SelectedRows[0].Cells[6].Value.ToString();

            f.textBox3.Text = miaos;
        }