码迷,mamicode.com
首页 > Windows程序 > 详细

C#构造函数传参,将datagridview中的值赋给其他窗体textbox中

时间:2016-07-21 19:37:37      阅读:192      评论:0      收藏:0      [点我收藏+]

标签:

变量被调用的窗体Form1:

private void buttonX8_Click(object sender, EventArgs e)
{
      MessageUpdate f = new MessageUpdate(a2, b2, c2, d2, E2, f2, g2, h2, i2, j2, k2, l2, m2, n2, o2, p2, q2, r2);//a2............r2是该窗体中已赋值的变量
      f.Show();
}

 

调用变量的窗体Form2:

public Form2(string a3, string b3, string c3, string d3, string e3, string f3, string g3, string h3, string i3, string j3, string k3, string l3, string m3, string n3, string o3, string p3, string q3, string r3)
{
InitializeComponent();
textBoxX1.Text = a3;
comboBox1.Text = b3;
textBoxX3.Text = c3;
textBoxX4.Text = d3;
textBoxX5.Text = e3;
comboBox2.Text = f3;
comboBox3.Text = g3;
comboBox4.Text = h3;
comboBox5.Text = i3;
textBoxX10.Text = j3;
textBoxX11.Text = k3;
textBoxX12.Text = l3;
textBoxX13.Text = m3;
textBoxX14.Text = n3;
textBoxX15.Text = o3;
textBoxX2.Text = p3;
textBoxX6.Text = q3;
dateTimePicker1.Text = r3;
}

C#构造函数传参,将datagridview中的值赋给其他窗体textbox中

标签:

原文地址:http://www.cnblogs.com/shuanglangdeliubei/p/5692581.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!