SPQuery query = new SPQuery();
                query.Query = @"<Where>
                                      <And>
                                         <And>
                                            <Eq>
                                               <FieldRef Name='Over_x0020_Due' />
                                               <Value Type='Choice'>ture</Value>
                                            </Eq>
                                            <Eq>
                                               <FieldRef Name='Responsible' />
                                               <Value Type='User'>" + ResName + @"</Value>
                                            </Eq>
                                         </And>
                                         <Or>
                                           <Eq>
                                            <FieldRef Name='Device_x0020_Status' />
                                            <Value Type='Choice'>在用Active</Value>
                                           </Eq>
                                           <Eq>
                                            <FieldRef Name='Device_x0020_Status' />
                                            <Value Type='Choice'>限用Limited</Value>
                                         </Eq>
                                         </Or>
                                      </And>
                                   </Where>";

                query.ViewAttributes = "Scope=\"RecursiveAll\"";  //可查询子文件夹里边的内容

posted on 2011-09-30 11:18  落 枫  阅读(850)  评论(0编辑  收藏  举报