if(this.txtname.text.trim()=="")
{
//得到该文本框的焦点
this.txtname.Focus();
this.txtname.SelectAll();
MessageBox.Show("不能为空","提示");
}
if(this.txtname.text.trim()=="")
{
//得到该文本框的焦点
this.txtname.Focus();
this.txtname.SelectAll();
MessageBox.Show("不能为空","提示");
}