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 }