本文整理汇总了C#中CmsData.CMSDataContext.LastDrop方法的典型用法代码示例。如果您正苦于以下问题:C# CMSDataContext.LastDrop方法的具体用法?C# CMSDataContext.LastDrop怎么用?C# CMSDataContext.LastDrop使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CmsData.CMSDataContext
的用法示例。
在下文中一共展示了CMSDataContext.LastDrop方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: VisitedCurrentOrg
internal static Expression VisitedCurrentOrg(CMSDataContext Db,
ParameterExpression parm,
CompareType op,
bool tf)
{
var mindt = Util.Now.AddDays(-Db.VisitLookbackDays).Date;
var ids = new int[]
{
AttendTypeCode.NewVisitor,
AttendTypeCode.RecentVisitor,
AttendTypeCode.VisitingMember
};
Expression<Func<Person, bool>> pred = p => (
from a in p.Attends
where a.AttendanceFlag
where a.MeetingDate >= mindt
let dt = a.Meeting.Organization.FirstMeetingDate
where dt == null || a.MeetingDate >= dt
where a.MeetingDate > Db.LastDrop(a.OrganizationId, a.PeopleId)
where ids.Contains(a.AttendanceTypeId.Value)
where a.OrganizationId == Db.CurrentOrgId
select a
).Any() && !(
from m in p.OrganizationMembers
where m.OrganizationId == Db.CurrentOrgId
where (m.Pending ?? false) == false
select m
).Any();
Expression expr = Expression.Convert(Expression.Invoke(pred, parm), typeof(bool));
if (!(op == CompareType.Equal && tf))
expr = Expression.Not(expr);
return expr;
}