示例#1
0
        public static string View(QueryContext qc)
        {
            string xml = "<View>" +
                        "<Query>" +
                        Where(qc.Query);

            if (qc.OrderByFields.Count > 0)
            {
                xml += OrderBy(qc.OrderByFields);
            }

            xml += "</Query>";

            if (qc.ViewFields != null && qc.ViewFields.Length > 0)
            {
                xml += "<ViewFields>" + ViewFields(qc.ViewFields) + "</ViewFields>";
            }

            if (qc.RowLimit > 0)
            {
                xml += "<RowLimit>" + qc.RowLimit + "</RowLimit>";
            }

            xml += "</View>";

            return xml;
        }
示例#2
0
        public static Select Select(params IFieldRef[] fields)
        {
            QueryContext context = new QueryContext();

            Select s = new Select(context, fields);

            return s;
        }
示例#3
0
        public static Select Select(uint top)
        {
            QueryContext context = new QueryContext();
            context.RowLimit = top;

            Select s = new Select(context, null);

            return s;
        }
示例#4
0
        public static Select Select(uint top, params IFieldRef[] fields)
        {
            QueryContext context = new QueryContext();
            context.RowLimit = top;

            Select s = new Select(context, fields);

            return s;
        }
示例#5
0
        public static Select Select()
        {
            QueryContext context = new QueryContext();

            Select s = new Select(context, null);
            return s;
        }
示例#6
0
 internal Where(QueryContext context, ICAMLExpression expr)
     : base(context)
 {
     context.Query = expr;
 }
示例#7
0
 internal Group(QueryContext context, IFieldRef field)
     : base(context)
 {
     context.GroupByField = field;
 }
示例#8
0
 internal Select(QueryContext context, params IFieldRef[] fields)
     : base(context)
 {
     context.ViewFields = fields;
 }
示例#9
0
 public ReturnableQuerySentence(QueryContext c)
     : base(c)
 {
 }
示例#10
0
 internal QuerySentence(QueryContext context)
 {
     Context = context;
 }
示例#11
0
 internal From(QueryContext context, SPList list)
     : base(context)
 {
     context.List = list;
 }
示例#12
0
 internal Order(QueryContext context, IFieldRef field, bool desc)
     : base(context)
 {
     context.OrderByFields.Add(field, desc);
 }