//判断员工id private void txtId_Leave(object sender, EventArgs e) { lblIdShow.Text = ""; lblEmailShow.Text = ""; lblNameShow.Text = ""; if (Tool.isNull(txtId.Text)) { lblIdShow.Text = SHOW_ID_IS_NULL; //txtId.Focus(); return; } if (!empBll.IdIsNumOrChar(txtId.Text)) { lblIdShow.Text = SHOW_ID_IS_ILLEGAL; txtId.Text = ""; // txtId.Focus(); return; } if (empBll.IsIdExist(txtId.Text)) { if (this.Text != TITLE_UPDATE_EMPLOYEE_INFO) { lblIdShow.Text = SHOW_ID_IS_EXIST; // txtId.Focus(); return; } } }