foreach (Control control in pnlTop.Controls)
{
//清空所有文本框
if (control is TextBox )
{
control.Text = string.Empty;
}
//清空下拉框
if (control is ComboBox)
{
(control as ComboBox).Text = string.Empty;
}
//清空复选框
if (control is CheckBox)
{
(control as CheckBox).Checked = false;
}
}