7/6/2025 1:29:58 PM
|
|
slxdeveloper.com Community Forums |
|
|
|
The Forums on slxdeveloper.com are now retired. The forum archive will remain available for the time being. Thank you for your participation on slxdeveloper.com!
Forum to discuss the use of the SalesLogix Web Platform, Client and Customer Portals, and the Application Architect (For version 7.2 and higher only). View the code of conduct for posting guidelines.
|
|
|
|
Nested or/and in nHibernate - 7.5.1
Posted: 11 May 09 2:17 PM
|
I am creating a DLL to return to a datagrid and I am trying to get a list of all tickets opened as well os those completed in the last 90 days. My nesting is not working and it is returning no rows. Below is the code:
Sage.Platform.RepositoryHelper rep = Sage.Platform.EntityFactory.GetRepositoryHelper(); Sage.Platform.Repository.ICriteria criteria = rep.CreateCriteria(); Sage.Platform.Repository.IQueryable qry = (Sage.Platform.Repository.IQueryable)rep.Repository; Sage.Platform.Repository.IExpressionFactory ef = qry.GetExpressionFactory(); criteria.Add(rep.EF.Eq("Contact", contact)); criteria.Add(rep.EF.Ne("StatusCode", "Closed")); criteria.Add(ef.Disjunction().Add(rep.EF.Eq("StatusCode", "Closed"))); criteria.Add(ef.Conjunction().Add(rep.EF.Gt("CompletedDate", DateTime.Today.AddDays(-90)))); criteria.Add(ef.Conjunction().Add(rep.EF.Eq("Contact", contact))); criteria.CreateCriteria("AssignedTo", "AssignedTo", JoinType.InnerJoin); criteria.SetProjection(rep.PF.ProjectionList() .Add(rep.PF.Property("TicketNumber")) .Add(rep.PF.Property("StatusCode")) .Add(rep.PF.Property("CreateDate"))
etc..................
|
|
|
|
You can
subscribe to receive a daily forum digest in your
user profile. View the site code
of conduct for posting guidelines.
Forum RSS Feed - Subscribe to the forum RSS feed to keep on top of the latest forum activity!
|
|
|
|
|
|
|
|