如何在Mdi父菜单单击事件上插入Chlid表单文本框值? [英] How to Insert Chlid Form Textbox Values on Mdi Parent Menu Click event ?
本文介绍了如何在Mdi父菜单单击事件上插入Chlid表单文本框值?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
I Have One Mdi Parent Form and Child Form.I want to save Child form Text box values on mdi parent Menu Button Click Event? i already write the coding but it not working
Mdi Parent Form
private void toolStripButton2_Click(object sender, EventArgs e)
{
Sample Examplesave = new Sample();
Form ActiveForm = this.ActiveMdiChild as Form;
Examplesave.save();
}
Child Form
public void save()
{
//Form ODTurning = this.ActiveMdiChild;
strField = "VC,FP_REV,MAX_DIA,MIN_DIA,LENGTH,D_DUT,RPM,F_MIN,N_PASS,OD_CYCLE,CREATED_DT";
strValue = "'" + Vc.Text + "','" + FeedPerRev.Text + "'";
result = objDO.Saveop("Tbl_TURN", strField, strValue);
if (result == true)
{
MessageBox.Show("INSERTED SUCCESSFULLY");
}
else
{
MessageBox.Show("Please verify your answer");
}
// btnODTsave.PerformClick();
}
I open Child form and give the inputs of two text boxs(vc.text,feedperrev.text) but values didn't pass the values on this method. please give the examples or some tips. Thanks
推荐答案
由于这个问题非常受欢迎,我以前的答案往往不太清楚,可能还不够清楚,我决定写一篇提示/技巧文章,详细的代码示例和解释:一次回答的许多问题 - Windows窗体或WPF Windows之间的协作。
-SA
As the question turned out to be very popular, and my previous answers often were not well understood, probably were not clear enough, I decided to write a Tips/Trick article complete with detailed code samples and explanations: Many Questions Answered at Once — Collaboration between Windows Forms or WPF Windows.
—SA
这篇关于如何在Mdi父菜单单击事件上插入Chlid表单文本框值?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文