获取界面所有的TextBox
foreach (Control txtobj in this.PMain.Controls)
{
if (txtobj is TextBox) //if(txtobj is Button)
{
if (string.IsNullOrEmpty(txtobj.Text))
{
MsgBox.MsgInfo("界面数据不能为空,请检查!");
return;
}
}
}
posted on 2020-06-16 15:04 AbelAngelo 阅读(170) 评论(0) 编辑 收藏 举报