Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Use this code </p> <pre><code>List&lt;EmployeeCPDReportRecord&gt; employeeCPDRecords = new List&lt;EmployeeCPDReportRecord&gt;(); var q = ( from cpd in pamsEntities.EmployeeCPDs from traineeEvent in pamsEntities.TrainingEventTrainees join Employee e in pamsEntities.Employees on cpd.EmployeeID equals e.emp_no join TrainingEventPart tEventPart in pamsEntities.TrainingEventParts on traineeEvent.TrainingEventPartId equals tEventPart.RecordId where (cpd.EmployeeID == id) &amp;&amp; (startDate &gt;= cpd.StartDate &amp;&amp; endDate &lt;= cpd.EndDate) &amp;&amp; (traineeEvent.EmployeeId == id) &amp;&amp; (traineeEvent.TraineeStatus == 1 || traineeEvent.TraineeStatus == 2) &amp;&amp; (tEventPart.CPDHours &gt; 0 || tEventPart.CPDPoints &gt; 0) &amp;&amp; (cpd.CPDHours &gt; 0 || cpd.CPDPoints &gt; 0) || traineeEvent.StartDate &gt;= startDate || traineeEvent.EndDate &lt;= endDate orderby cpd.StartDate select new EmployeeCPDReportRecord { YourEmployeColumnName=(ContextBase.encryptionEnabled==true?ContextBase.Decrypt(e.surname) + ", " + ContextBase.Decrypt(e.forname1) + " " + ContextBase.Decrypt(e.forname2):e.surname + ", " + e.forname1 + " " + e.forname2), YourEmployeeCPDColumnName=(i.TrainingStartDate !=new DateTime(1900, 1, 1)?"L&amp;D":"Employee CPD") surname = e.surname, forname1 = e.forename1, forname2 = e.forename2, EmployeeID = cpd.EmployeeID, StartDate = cpd.StartDate, EndDate = cpd.EndDate, CPDHours = cpd.CPDHours, CPDPoints = cpd.CPDPoints, Description = cpd.Description, TrainingStartDate = tEventPart.StartDate, TrainingEndDate = tEventPart.EndDate, TrainingCPDHours = tEventPart.CPDHours, TrainingCPDPoints = tEventPart.CPDPoints, TrainingEventDescription = tEventPart.Description }).ToList&lt;EmployeeCPDReportRecord&gt;(); </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload