1

Closed

不支持ModStat类型字段查询

description

ModStat可以作为Number类型,用枚举数字查询,如:
<Where>
<Eq>
<FieldRef Name="_ModerationStatus" />
<Value Type="Number">0</Value>
</Eq>
</Where>
或者作为ModStat类型,用中文文本查询,如:
<Where>
<Eq>
<FieldRef Name="_ModerationStatus" />
<Value Type="ModStat">已批准</Value>
</Eq>
</Where>
 
源代码中已经修改
Closed May 3, 2013 at 7:36 AM by jianyi

comments

jianyi wrote May 3, 2013 at 7:36 AM

else if (_SPFieldType == SPFieldType.Number)
        {
            //查询ModStat字段,可以用Number作为类型,则直接用枚举数字查
            if (Value is SPModerationStatusType)
            {
                valueNode.InnerText = "" + (int)((SPModerationStatusType)Value);
            }
            else
            {
                valueNode.InnerText = "" + Value;
            }
        }

wrote May 3, 2013 at 7:36 AM

wrote May 16, 2013 at 8:11 AM