zoukankan      html  css  js  c++  java
  • C#构造函数传参,将datagridview中的值赋给其他窗体textbox中

    变量被调用的窗体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;
    }

  • 相关阅读:
    利用Python获取文件类型
    删除目录和文件
    创建目录和空文件
    读取文件内容
    sort方法
    python实例5-表格打印
    ngx.lua中遇到的小问题
    mysql 更改自动增长字段值的重新设定
    全面讲解进程池原理
    测试工程师Docker基础
  • 原文地址:https://www.cnblogs.com/shuanglangdeliubei/p/5692581.html
Copyright © 2011-2022 走看看