コード例 #1
0
        private void dataGridView3_CellContentClick(object sender, DataGridViewCellEventArgs e)
        {
            FormProduct myForm1 = new FormProduct();

            myForm1.textPROID.Text = dataGridView3.CurrentRow.Cells[0].Value.ToString();
            myForm1.name.Text      = dataGridView3.CurrentRow.Cells[1].Value.ToString();
            myForm1.category.Text  = dataGridView3.CurrentRow.Cells[2].Value.ToString();
            myForm1.weight.Text    = dataGridView3.CurrentRow.Cells[3].Value.ToString();
            myForm1.price.Text     = dataGridView3.CurrentRow.Cells[4].Value.ToString();


            myForm1.ShowDialog();
        }
コード例 #2
0
        private void productToolStripMenuItem_Click(object sender, EventArgs e)
        {
            FormProduct f1 = new FormProduct();

            f1.Show();
        }