using System;
using System.Collections.Generic;
using System.Text;
using System.Windows.Forms;
namespace WinP.Common
{
public class ClearValue
{
#region--重置控件中的内容
public static void ClearValueClass(Control control)
{
foreach (Control c in control.Controls)
{
//清空文本框
if (c is TextBox)
{
((TextBox)c).Text = "";
}
//下拉列表括为空
if (c is ComboBox)
{
((ComboBox)c).SelectedIndex = 0;
}
//复选框为未选中
if (c is CheckBox)
{
((CheckBox)c).Checked = false;
}
//时间控件获取当前时间
本内容试读结束,登录后可阅读更多
下载后可阅读完整内容,剩余1页未读,立即下载