重复性输入检测

1 DataRow[] foundRowDept = this.dtbDept.Select("dept_name ='" + cboDept.Text + "'");
2                                 DataRow[] foundRowSubsidiary = this.dtbSubsidiary.Select("subsidiary_name ='" + cboSubsidiary.Text + "'");
3                                 DataRow[] foundRowRoleInfm = this.dtbRoleInfm.Select("subsidiary_name ='" + cboSubsidiary.Text + "'and dept_name ='" + cboDept.Text + "' and role_name='" + txtRoleName.Text.Trim() + "'");
4                                 if (foundRowRoleInfm.Length > 0)
5                                 {
6                                     MessageBox.Show(cboSubsidiary.Text + cboDept.Text + "下已有角色:" + txtRoleName.Text.Trim() + "!!");
7                                     return;
8                                 }

 

posted on 2012-06-16 12:03  烟雨飘零  阅读(236)  评论(0编辑  收藏  举报

导航