static Microsoft.SharePoint.Client.ListItemCollection GetSpListItems(Microsoft.SharePoint.Client.ClientContext ctx, string siteUrl, string listName, string camlXml)//string[] listFields)
        {
            Microsoft.SharePoint.Client.List      list      = ctx.Web.Lists.GetByTitle(listName);
            Microsoft.SharePoint.Client.CamlQuery camlQuery = new Microsoft.SharePoint.Client.CamlQuery()
            {
                ViewXml = camlXml
            };
            Microsoft.SharePoint.Client.ListItemCollection lic = list.GetItems(camlQuery);

            ctx.Load(lic);
            ctx.ExecuteQuery();
            return(lic);
        }
コード例 #2
0
        public Microsoft.SharePoint.Client.CamlQuery CreateCandidateQuery()
        {
            var qry = new Microsoft.SharePoint.Client.CamlQuery();

            qry.ViewXml =
                @"<View>
         <Query>
          <Where>
            <BeginsWith>
              <FieldRef Name='Hire_Status' />
              <Value Type='Text'>" + "Conditional Hire" + @"</Value>
            </BeginsWith>
          </Where>
        </Query>
       </View>";
            return(qry);
        }