daily pastebin goal
19%
SHARE
TWEET

Untitled

a guest Feb 19th, 2019 72 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. from field in FieldsList
  2.                 join nutM in ResultsList on field.ID equals nutM.fieldID
  3.                 join sTst in TestsList on field.ID equals sTst.fieldID
  4.                 where nutM.cropYear >= startYear && nutM.cropYear <= endYear
  5.                 orderby field.Name, nutM.cropYear
  6.  
  7.                 select new                    {
  8.                     fieldName = field.Name,
  9.                     nutM.cropYear,
  10.                     AppProblems =
  11.                     (
  12.                         Convert.ToDateTime(sTst.TestDate).Year < 1955 ? test missing" :
  13.                         nutM.AppProblems != null && nutM.AppProblems != "" ? nutM.AppProblems :
  14.                         determineTestTooOldOrNot(nutM.cropYear, sTst.TestDate) ? "test too old " + sTst.TestDate :
  15.                         field.Acres/5 > // the number here needs to come from a subquery..subquery is mentioned below. Subquery returns the count after grouping by field name. However I do not know how to access the count value and compare it against field.Acres value.
  16.  
  17.  
  18.                         (from f in BasicDataAccess.Data.FieldsList
  19.                         join c in BasicDataAccess.Data.TestSamplesList on field.ID equals c.fieldID
  20.                         where f.Name == field.Name
  21.                         group f by f.Name into p
  22.                         select new
  23.                         {
  24.                            aSamples = p.Count()
  25.                         })
  26.  
  27.                     )
  28.  
  29.                 }
  30.           )
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top