private void btn_confirm_Click(object sender, EventArgs e) { DataObj dataObj = new DataObj(); dataObj.name = textBox1.Text; dataObj.password = textBox2.Text; dataObj.id = Convert.ToInt16(textBox3.Text); this.Close(); sysGlobal.FrmMain.dataAdd(dataObj); }
public void dataAdd(DataObj te) { textBox1.Text += te.name; textBox1.Text += te.password; textBox1.Text += te.id.ToString(); }