예제 #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);
 }