// Decompiled with JetBrains decompiler
// Type: SE0085.CTdB.clsEngineCTdB
// Assembly: SE0085CTdB, Version=1.0.0.1, Culture=neutral, PublicKeyToken=null
// MVID: F67560B6-58CB-4471-AAC9-80007CA3AF52
// Assembly location: C:\Users\Abishek\Downloads\SchneiderCode_Breaker_09292016\Breaker Schedule-20160930T014118Z\Breaker Schedule\Solution for gathering Breaker Data\DMS\bin\Debug\SE0085CTdB.dll

using Microsoft.VisualBasic.CompilerServices;
using SE0085.CTdB.My;
using SE0085.dBc;
using SE0085.StCl;
using System;
using System.Collections;
using System.Collections.Generic;
using System.Data;
using System.Data.OleDb;
using System.Linq;
using System.Linq.Expressions;
using System.Reflection;
using System.Runtime.CompilerServices;

namespace SE0085.CTdB
{
  public class clsEngineCTdB
  {
    private string _CTConnection;
    private string _VMSConnection;

    public string Revision
    {
      [MethodImpl(MethodImplOptions.NoInlining | MethodImplOptions.NoOptimization)] get
      {
        return "Version; " + Conversions.ToString(MyProject.Application.Info.Version.Major) + "." + Conversions.ToString(MyProject.Application.Info.Version.Minor) + "." + Conversions.ToString((int) MyProject.Application.Info.Version.MajorRevision) + "." + Conversions.ToString((int) MyProject.Application.Info.Version.MinorRevision);
      }
    }

    public string Author
    {
      get
      {
        return "Terry Taylor";
      }
    }

    public clsEngineCTdB()
    {
      clsDBC clsDbc = new clsDBC();
      clsDbc.GetServer((object) "SE0085VMSEntities1");
      this._VMSConnection = Conversions.ToString(clsDbc.ConnectionString);
      clsDbc.GetServer((object) "SE0085CTEntities1");
      this._CTConnection = Conversions.ToString(clsDbc.ConnectionString);
    }

    ~clsEngineCTdB()
    {
      // ISSUE: explicit finalizer call
      base.Finalize();
    }

    public List<scOrderData> rtnOrderDataAllOpen()
    {
      List<scOrderData> scOrderDataList = new List<scOrderData>();
      using (SE0085CTEntities1 se0085CtEntities1 = new SE0085CTEntities1())
      {
        se0085CtEntities1.Database.Connection.ConnectionString = this._CTConnection;
        ParameterExpression parameterExpression1;
        ParameterExpression parameterExpression2;
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: type reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: type reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: type reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: type reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: type reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: type reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: type reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: type reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: type reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: type reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: type reference
        // ISSUE: method reference
        IQueryable<scOrderData> source = (IQueryable<scOrderData>) Queryable.Select((IQueryable<M0>) Queryable.ThenBy(Queryable.ThenBy(Queryable.ThenBy(Queryable.OrderBy(Queryable.Where((IQueryable<M0>) Queryable.Join((IQueryable<M0>) Queryable.Join((IQueryable<M0>) Queryable.Join((IQueryable<M0>) se0085CtEntities1.SEOrders.Distinct<SEOrder>(), (IEnumerable<M1>) se0085CtEntities1.OrderLines.Distinct<OrderLine>(), (Expression<Func<M0, M2>>) (od => od.OrderId), (Expression<Func<M1, M2>>) (ol => ol.SEOrder.OrderId), (Expression<Func<M0, M1, M3>>) ((od, ol) => new{ od = od, ol = ol })), (IEnumerable<M1>) se0085CtEntities1.AssemblyLines, (Expression<Func<M0, M2>>) (data => data.ol.AssemblyLine.AssemLineId), (Expression<Func<M1, M2>>) (al => al.AssemLineId), (Expression<Func<M0, M1, M3>>) ((data, al) => new
        {
          \u0024VB\u0024It1 = data,
          al = al
        })), (IEnumerable<M1>) se0085CtEntities1.SEPlants, (Expression<Func<M0, M2>>) (data => data.al.SEPlant.SEPlantId), (Expression<Func<M1, M2>>) (pl => pl.SEPlantId), (Expression<Func<M0, M1, M3>>) ((data, pl) => new
        {
          od = data.\u0024VB\u0024It1.od,
          ol = data.\u0024VB\u0024It1.ol,
          al = data.al,
          pl = pl
        })), (Expression<Func<M0, bool>>) Expression.Lambda<Func<VB\u0024AnonymousType_2<SEOrder, OrderLine, AssemblyLine, SEPlant>, bool>>((Expression) Expression.Coalesce((Expression) Expression.Equal(\u0024VB\u0024It.ol.OrderLineShipped, (bool?) false, true, (MethodInfo) null), (Expression) Expression.Constant((object) false, typeof (bool))), new ParameterExpression[1]
        {
          parameterExpression1
        })), (Expression<Func<M0, M1>>) (data => data.od.OrderFO)), (Expression<Func<M0, M1>>) (data => data.ol.OrderLineNum)), (Expression<Func<M0, M1>>) (data => data.ol.OrderLineSL)), (Expression<Func<M0, M1>>) (data => data.ol.OrderLineSS)), (Expression<Func<M0, M1>>) Expression.Lambda<Func<VB\u0024AnonymousType_2<SEOrder, OrderLine, AssemblyLine, SEPlant>, scOrderData>>((Expression) Expression.MemberInit(Expression.New((ConstructorInfo) MethodBase.GetMethodFromHandle(__methodref (scOrderData.\u002Ector)), (Expression[]) null), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scOrderData.set_AssemblyLineId)), (Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_2<SEOrder, OrderLine, AssemblyLine, SEPlant>.get_al), __typeref (VB\u0024AnonymousType_2<SEOrder, OrderLine, AssemblyLine, SEPlant>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (AssemblyLine.get_AssemLineId)))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scOrderData.set_AssemLineAbbrv)), (Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_2<SEOrder, OrderLine, AssemblyLine, SEPlant>.get_al), __typeref (VB\u0024AnonymousType_2<SEOrder, OrderLine, AssemblyLine, SEPlant>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (AssemblyLine.get_AssemLineAbbrv)))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scOrderData.set_OrderId)), (Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_2<SEOrder, OrderLine, AssemblyLine, SEPlant>.get_od), __typeref (VB\u0024AnonymousType_2<SEOrder, OrderLine, AssemblyLine, SEPlant>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (SEOrder.get_OrderId)))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scOrderData.set_OrderFO)), (Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_2<SEOrder, OrderLine, AssemblyLine, SEPlant>.get_od), __typeref (VB\u0024AnonymousType_2<SEOrder, OrderLine, AssemblyLine, SEPlant>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (SEOrder.get_OrderFO)))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scOrderData.set_OrderJobName)), (Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_2<SEOrder, OrderLine, AssemblyLine, SEPlant>.get_od), __typeref (VB\u0024AnonymousType_2<SEOrder, OrderLine, AssemblyLine, SEPlant>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (SEOrder.get_OrderJobName)))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scOrderData.set_OrderLineId)), (Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_2<SEOrder, OrderLine, AssemblyLine, SEPlant>.get_ol), __typeref (VB\u0024AnonymousType_2<SEOrder, OrderLine, AssemblyLine, SEPlant>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (OrderLine.get_OrderLineId)))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scOrderData.set_OrderLineNum)), (Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_2<SEOrder, OrderLine, AssemblyLine, SEPlant>.get_ol), __typeref (VB\u0024AnonymousType_2<SEOrder, OrderLine, AssemblyLine, SEPlant>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (OrderLine.get_OrderLineNum)))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scOrderData.set_OrderLineSL)), (Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_2<SEOrder, OrderLine, AssemblyLine, SEPlant>.get_ol), __typeref (VB\u0024AnonymousType_2<SEOrder, OrderLine, AssemblyLine, SEPlant>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (OrderLine.get_OrderLineSL)))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scOrderData.set_OrderLineSS)), (Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_2<SEOrder, OrderLine, AssemblyLine, SEPlant>.get_ol), __typeref (VB\u0024AnonymousType_2<SEOrder, OrderLine, AssemblyLine, SEPlant>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (OrderLine.get_OrderLineSS)))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scOrderData.set_OrderLineShipDt)), (Expression) Expression.Convert((Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_2<SEOrder, OrderLine, AssemblyLine, SEPlant>.get_ol), __typeref (VB\u0024AnonymousType_2<SEOrder, OrderLine, AssemblyLine, SEPlant>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (OrderLine.get_OrderLineShipDt))), typeof (DateTime))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scOrderData.set_OrderLineAssyStartDt)), (Expression) Expression.Convert((Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_2<SEOrder, OrderLine, AssemblyLine, SEPlant>.get_ol), __typeref (VB\u0024AnonymousType_2<SEOrder, OrderLine, AssemblyLine, SEPlant>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (OrderLine.get_OrderLineAssyStartDt))), typeof (DateTime)))), new ParameterExpression[1]
        {
          parameterExpression2
        }));
        if (source != null && source.Count<scOrderData>() > 0)
          scOrderDataList = source.ToList<scOrderData>();
        se0085CtEntities1.Database.Connection.Close();
      }
      return scOrderDataList;
    }

    public Hashtable rtnOrderDataAllOpenGearHash()
    {
      Hashtable hashtable = new Hashtable();
      using (SE0085CTEntities1 se0085CtEntities1 = new SE0085CTEntities1())
      {
        se0085CtEntities1.Database.Connection.ConnectionString = this._CTConnection;
        ParameterExpression parameterExpression1;
        ParameterExpression parameterExpression2;
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: type reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: type reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: type reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: type reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: type reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: type reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: type reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: type reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: type reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: type reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: type reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: type reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: type reference
        // ISSUE: method reference
        IQueryable<scOrderData> source = (IQueryable<scOrderData>) Queryable.Select((IQueryable<M0>) Queryable.ThenBy(Queryable.ThenBy(Queryable.ThenBy(Queryable.OrderBy(Queryable.Where((IQueryable<M0>) Queryable.Join((IQueryable<M0>) Queryable.Join((IQueryable<M0>) Queryable.Join((IQueryable<M0>) se0085CtEntities1.SEOrders.Distinct<SEOrder>(), (IEnumerable<M1>) se0085CtEntities1.OrderLines.Distinct<OrderLine>(), (Expression<Func<M0, M2>>) (od => od.OrderId), (Expression<Func<M1, M2>>) (ol => ol.SEOrder.OrderId), (Expression<Func<M0, M1, M3>>) ((od, ol) => new{ od = od, ol = ol })), (IEnumerable<M1>) se0085CtEntities1.AssemblyLines, (Expression<Func<M0, M2>>) (data => data.ol.AssemblyLine.AssemLineId), (Expression<Func<M1, M2>>) (al => al.AssemLineId), (Expression<Func<M0, M1, M3>>) ((data, al) => new
        {
          \u0024VB\u0024It1 = data,
          al = al
        })), (IEnumerable<M1>) se0085CtEntities1.SEPlants, (Expression<Func<M0, M2>>) (data => data.al.SEPlant.SEPlantId), (Expression<Func<M1, M2>>) (pl => pl.SEPlantId), (Expression<Func<M0, M1, M3>>) ((data, pl) => new
        {
          od = data.\u0024VB\u0024It1.od,
          ol = data.\u0024VB\u0024It1.ol,
          al = data.al,
          pl = pl
        })), (Expression<Func<M0, bool>>) Expression.Lambda<Func<VB\u0024AnonymousType_2<SEOrder, OrderLine, AssemblyLine, SEPlant>, bool>>((Expression) Expression.Coalesce((Expression) Expression.And((Expression) Expression.Equal(\u0024VB\u0024It.ol.OrderLineShipped, (bool?) false, true, (MethodInfo) null), (Expression) Expression.Convert((Expression) Expression.Or((Expression) Expression.Or((Expression) Expression.Or((Expression) Expression.Equal((Expression) Expression.Call((Expression) null, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (Microsoft.VisualBasic.CompilerServices.Operators.CompareString)), (Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression1, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_2<SEOrder, OrderLine, AssemblyLine, SEPlant>.get_al), __typeref (VB\u0024AnonymousType_2<SEOrder, OrderLine, AssemblyLine, SEPlant>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (AssemblyLine.get_AssemLineAbbrv))), (Expression) Expression.Constant((object) "SWBD", typeof (string)), (Expression) Expression.Constant((object) false, typeof (bool))), (Expression) Expression.Constant((object) 0, typeof (int))), (Expression) Expression.Equal((Expression) Expression.Call((Expression) null, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (Microsoft.VisualBasic.CompilerServices.Operators.CompareString)), (Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression1, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_2<SEOrder, OrderLine, AssemblyLine, SEPlant>.get_al), __typeref (VB\u0024AnonymousType_2<SEOrder, OrderLine, AssemblyLine, SEPlant>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (AssemblyLine.get_AssemLineAbbrv))), (Expression) Expression.Constant((object) "LVDO", typeof (string)), (Expression) Expression.Constant((object) false, typeof (bool))), (Expression) Expression.Constant((object) 0, typeof (int)))), (Expression) Expression.Equal((Expression) Expression.Call((Expression) null, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (Microsoft.VisualBasic.CompilerServices.Operators.CompareString)), (Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression1, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_2<SEOrder, OrderLine, AssemblyLine, SEPlant>.get_al), __typeref (VB\u0024AnonymousType_2<SEOrder, OrderLine, AssemblyLine, SEPlant>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (AssemblyLine.get_AssemLineAbbrv))), (Expression) Expression.Constant((object) "NW221B", typeof (string)), (Expression) Expression.Constant((object) false, typeof (bool))), (Expression) Expression.Constant((object) 0, typeof (int)))), (Expression) Expression.Equal((Expression) Expression.Call((Expression) null, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (Microsoft.VisualBasic.CompilerServices.Operators.CompareString)), (Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression1, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_2<SEOrder, OrderLine, AssemblyLine, SEPlant>.get_al), __typeref (VB\u0024AnonymousType_2<SEOrder, OrderLine, AssemblyLine, SEPlant>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (AssemblyLine.get_AssemLineAbbrv))), (Expression) Expression.Constant((object) "NW221C", typeof (string)), (Expression) Expression.Constant((object) false, typeof (bool))), (Expression) Expression.Constant((object) 0, typeof (int)))), typeof (bool?))), (Expression) Expression.Constant((object) false, typeof (bool))), new ParameterExpression[1]
        {
          parameterExpression1
        })), (Expression<Func<M0, M1>>) (data => data.od.OrderFO)), (Expression<Func<M0, M1>>) (data => data.ol.OrderLineNum)), (Expression<Func<M0, M1>>) (data => data.ol.OrderLineSL)), (Expression<Func<M0, M1>>) (data => data.ol.OrderLineSS)), (Expression<Func<M0, M1>>) Expression.Lambda<Func<VB\u0024AnonymousType_2<SEOrder, OrderLine, AssemblyLine, SEPlant>, scOrderData>>((Expression) Expression.MemberInit(Expression.New((ConstructorInfo) MethodBase.GetMethodFromHandle(__methodref (scOrderData.\u002Ector)), (Expression[]) null), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scOrderData.set_AssemblyLineId)), (Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_2<SEOrder, OrderLine, AssemblyLine, SEPlant>.get_al), __typeref (VB\u0024AnonymousType_2<SEOrder, OrderLine, AssemblyLine, SEPlant>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (AssemblyLine.get_AssemLineId)))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scOrderData.set_AssemLineAbbrv)), (Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_2<SEOrder, OrderLine, AssemblyLine, SEPlant>.get_al), __typeref (VB\u0024AnonymousType_2<SEOrder, OrderLine, AssemblyLine, SEPlant>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (AssemblyLine.get_AssemLineAbbrv)))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scOrderData.set_OrderId)), (Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_2<SEOrder, OrderLine, AssemblyLine, SEPlant>.get_od), __typeref (VB\u0024AnonymousType_2<SEOrder, OrderLine, AssemblyLine, SEPlant>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (SEOrder.get_OrderId)))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scOrderData.set_OrderFO)), (Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_2<SEOrder, OrderLine, AssemblyLine, SEPlant>.get_od), __typeref (VB\u0024AnonymousType_2<SEOrder, OrderLine, AssemblyLine, SEPlant>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (SEOrder.get_OrderFO)))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scOrderData.set_OrderJobName)), (Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_2<SEOrder, OrderLine, AssemblyLine, SEPlant>.get_od), __typeref (VB\u0024AnonymousType_2<SEOrder, OrderLine, AssemblyLine, SEPlant>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (SEOrder.get_OrderJobName)))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scOrderData.set_OrderLineId)), (Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_2<SEOrder, OrderLine, AssemblyLine, SEPlant>.get_ol), __typeref (VB\u0024AnonymousType_2<SEOrder, OrderLine, AssemblyLine, SEPlant>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (OrderLine.get_OrderLineId)))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scOrderData.set_OrderLineNum)), (Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_2<SEOrder, OrderLine, AssemblyLine, SEPlant>.get_ol), __typeref (VB\u0024AnonymousType_2<SEOrder, OrderLine, AssemblyLine, SEPlant>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (OrderLine.get_OrderLineNum)))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scOrderData.set_OrderLineSL)), (Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_2<SEOrder, OrderLine, AssemblyLine, SEPlant>.get_ol), __typeref (VB\u0024AnonymousType_2<SEOrder, OrderLine, AssemblyLine, SEPlant>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (OrderLine.get_OrderLineSL)))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scOrderData.set_OrderLineSS)), (Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_2<SEOrder, OrderLine, AssemblyLine, SEPlant>.get_ol), __typeref (VB\u0024AnonymousType_2<SEOrder, OrderLine, AssemblyLine, SEPlant>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (OrderLine.get_OrderLineSS))))), new ParameterExpression[1]
        {
          parameterExpression2
        }));
        if (source != null && source.Count<scOrderData>() > 0)
        {
          List<scOrderData> list = source.ToList<scOrderData>();
          List<scOrderData>.Enumerator enumerator;
          try
          {
            enumerator = list.GetEnumerator();
            while (enumerator.MoveNext())
            {
              scOrderData current = enumerator.Current;
              hashtable.Add((object) current.FOLineSLSS, (object) current);
            }
          }
          finally
          {
            enumerator.Dispose();
          }
        }
        se0085CtEntities1.Database.Connection.Close();
      }
      return hashtable;
    }

    public scOrderData rtnOrderData(string FOLineSLSS)
    {
      // ISSUE: object of a compiler-generated type is created
      // ISSUE: variable of a compiler-generated type
      clsEngineCTdB._Closure\u0024__1 closure1 = new clsEngineCTdB._Closure\u0024__1();
      // ISSUE: reference to a compiler-generated field
      closure1.\u0024VB\u0024Local_ldOrder = new scOrderData();
      // ISSUE: reference to a compiler-generated field
      closure1.\u0024VB\u0024Local_ldOrder.FactoryOrder = FOLineSLSS;
      using (SE0085CTEntities1 se0085CtEntities1 = new SE0085CTEntities1())
      {
        se0085CtEntities1.Database.Connection.ConnectionString = this._CTConnection;
        ParameterExpression parameterExpression;
        // ISSUE: method reference
        // ISSUE: reference to a compiler-generated field
        // ISSUE: method reference
        // ISSUE: reference to a compiler-generated field
        // ISSUE: method reference
        // ISSUE: reference to a compiler-generated field
        // ISSUE: method reference
        // ISSUE: reference to a compiler-generated field
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: type reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: type reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: type reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: type reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: type reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: type reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: type reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: type reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: type reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: type reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: type reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: type reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: type reference
        // ISSUE: method reference
        IQueryable<scOrderData> source = (IQueryable<scOrderData>) Queryable.Select(Queryable.Where((IQueryable<M0>) Queryable.Join((IQueryable<M0>) Queryable.Join((IQueryable<M0>) Queryable.Join((IQueryable<M0>) se0085CtEntities1.SEOrders, (IEnumerable<M1>) se0085CtEntities1.OrderLines, (Expression<Func<M0, M2>>) (od => od.OrderId), (Expression<Func<M1, M2>>) (ol => ol.SEOrder.OrderId), (Expression<Func<M0, M1, M3>>) ((od, ol) => new{ od = od, ol = ol })), (IEnumerable<M1>) se0085CtEntities1.AssemblyLines, (Expression<Func<M0, M2>>) (data => data.ol.AssemblyLine.AssemLineId), (Expression<Func<M1, M2>>) (al => al.AssemLineId), (Expression<Func<M0, M1, M3>>) ((data, al) => new
        {
          \u0024VB\u0024It1 = data,
          al = al
        })), (IEnumerable<M1>) se0085CtEntities1.SEPlants, (Expression<Func<M0, M2>>) (data => data.al.SEPlant.SEPlantId), (Expression<Func<M1, M2>>) (pl => pl.SEPlantId), (Expression<Func<M0, M1, M3>>) ((data, pl) => new
        {
          od = data.\u0024VB\u0024It1.od,
          ol = data.\u0024VB\u0024It1.ol,
          al = data.al,
          pl = pl
        })), (Expression<Func<M0, bool>>) (data => Expression.Call((Expression) null, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (Microsoft.VisualBasic.CompilerServices.Operators.CompareString)), data.od.OrderFO, closure1.\u0024VB\u0024Local_ldOrder.OrderFO, false) == 0 & Expression.Call((Expression) null, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (Microsoft.VisualBasic.CompilerServices.Operators.CompareString)), data.ol.OrderLineNum, closure1.\u0024VB\u0024Local_ldOrder.OrderLineNum, false) == 0 & Expression.Call((Expression) null, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (Microsoft.VisualBasic.CompilerServices.Operators.CompareString)), data.ol.OrderLineSL, closure1.\u0024VB\u0024Local_ldOrder.OrderLineSL, false) == 0 & Expression.Call((Expression) null, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (Microsoft.VisualBasic.CompilerServices.Operators.CompareString)), data.ol.OrderLineSS, closure1.\u0024VB\u0024Local_ldOrder.OrderLineSS, false) == 0)), (Expression<Func<M0, M1>>) Expression.Lambda<Func<VB\u0024AnonymousType_2<SEOrder, OrderLine, AssemblyLine, SEPlant>, scOrderData>>((Expression) Expression.MemberInit(Expression.New((ConstructorInfo) MethodBase.GetMethodFromHandle(__methodref (scOrderData.\u002Ector)), (Expression[]) null), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scOrderData.set_AssemblyLineId)), (Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_2<SEOrder, OrderLine, AssemblyLine, SEPlant>.get_al), __typeref (VB\u0024AnonymousType_2<SEOrder, OrderLine, AssemblyLine, SEPlant>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (AssemblyLine.get_AssemLineId)))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scOrderData.set_AssemLineAbbrv)), (Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_2<SEOrder, OrderLine, AssemblyLine, SEPlant>.get_al), __typeref (VB\u0024AnonymousType_2<SEOrder, OrderLine, AssemblyLine, SEPlant>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (AssemblyLine.get_AssemLineAbbrv)))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scOrderData.set_OrderId)), (Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_2<SEOrder, OrderLine, AssemblyLine, SEPlant>.get_od), __typeref (VB\u0024AnonymousType_2<SEOrder, OrderLine, AssemblyLine, SEPlant>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (SEOrder.get_OrderId)))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scOrderData.set_OrderFO)), (Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_2<SEOrder, OrderLine, AssemblyLine, SEPlant>.get_od), __typeref (VB\u0024AnonymousType_2<SEOrder, OrderLine, AssemblyLine, SEPlant>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (SEOrder.get_OrderFO)))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scOrderData.set_OrderJobName)), (Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_2<SEOrder, OrderLine, AssemblyLine, SEPlant>.get_od), __typeref (VB\u0024AnonymousType_2<SEOrder, OrderLine, AssemblyLine, SEPlant>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (SEOrder.get_OrderJobName)))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scOrderData.set_OrderLineId)), (Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_2<SEOrder, OrderLine, AssemblyLine, SEPlant>.get_ol), __typeref (VB\u0024AnonymousType_2<SEOrder, OrderLine, AssemblyLine, SEPlant>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (OrderLine.get_OrderLineId)))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scOrderData.set_OrderLineNum)), (Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_2<SEOrder, OrderLine, AssemblyLine, SEPlant>.get_ol), __typeref (VB\u0024AnonymousType_2<SEOrder, OrderLine, AssemblyLine, SEPlant>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (OrderLine.get_OrderLineNum)))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scOrderData.set_OrderLineSL)), (Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_2<SEOrder, OrderLine, AssemblyLine, SEPlant>.get_ol), __typeref (VB\u0024AnonymousType_2<SEOrder, OrderLine, AssemblyLine, SEPlant>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (OrderLine.get_OrderLineSL)))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scOrderData.set_OrderLineSS)), (Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_2<SEOrder, OrderLine, AssemblyLine, SEPlant>.get_ol), __typeref (VB\u0024AnonymousType_2<SEOrder, OrderLine, AssemblyLine, SEPlant>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (OrderLine.get_OrderLineSS)))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scOrderData.set_OrderLineTargetDt)), (Expression) Expression.Convert((Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_2<SEOrder, OrderLine, AssemblyLine, SEPlant>.get_ol), __typeref (VB\u0024AnonymousType_2<SEOrder, OrderLine, AssemblyLine, SEPlant>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (OrderLine.get_OrderLineTargetDt))), typeof (DateTime))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scOrderData.set_OrderLineShipDt)), (Expression) Expression.Convert((Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_2<SEOrder, OrderLine, AssemblyLine, SEPlant>.get_ol), __typeref (VB\u0024AnonymousType_2<SEOrder, OrderLine, AssemblyLine, SEPlant>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (OrderLine.get_OrderLineShipDt))), typeof (DateTime))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scOrderData.set_OrderLineShippedbln)), (Expression) Expression.Convert((Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_2<SEOrder, OrderLine, AssemblyLine, SEPlant>.get_ol), __typeref (VB\u0024AnonymousType_2<SEOrder, OrderLine, AssemblyLine, SEPlant>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (OrderLine.get_OrderLineShipped))), typeof (bool))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scOrderData.set_OrderLineAssyStartDt)), (Expression) Expression.Convert((Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_2<SEOrder, OrderLine, AssemblyLine, SEPlant>.get_ol), __typeref (VB\u0024AnonymousType_2<SEOrder, OrderLine, AssemblyLine, SEPlant>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (OrderLine.get_OrderLineAssyStartDt))), typeof (DateTime)))), new ParameterExpression[1]
        {
          parameterExpression
        }));
        if (source != null && source.Count<scOrderData>() > 0)
        {
          // ISSUE: reference to a compiler-generated field
          closure1.\u0024VB\u0024Local_ldOrder = source.First<scOrderData>();
        }
        se0085CtEntities1.Database.Connection.Close();
      }
      // ISSUE: reference to a compiler-generated field
      return closure1.\u0024VB\u0024Local_ldOrder;
    }

    public int rtnOrderLineId(string FOLineSLSS)
    {
      // ISSUE: object of a compiler-generated type is created
      // ISSUE: variable of a compiler-generated type
      clsEngineCTdB._Closure\u0024__2 closure2 = new clsEngineCTdB._Closure\u0024__2();
      // ISSUE: reference to a compiler-generated field
      closure2.\u0024VB\u0024Local_ldOrder = new scOrderData();
      // ISSUE: reference to a compiler-generated field
      closure2.\u0024VB\u0024Local_ldOrder.FactoryOrder = FOLineSLSS;
      int num = 0;
      using (SE0085CTEntities1 se0085CtEntities1 = new SE0085CTEntities1())
      {
        se0085CtEntities1.Database.Connection.ConnectionString = this._CTConnection;
        // ISSUE: method reference
        // ISSUE: reference to a compiler-generated field
        // ISSUE: method reference
        // ISSUE: reference to a compiler-generated field
        // ISSUE: method reference
        // ISSUE: reference to a compiler-generated field
        // ISSUE: method reference
        // ISSUE: reference to a compiler-generated field
        IQueryable<int> source = (IQueryable<int>) Queryable.Select(Queryable.Where((IQueryable<M0>) Queryable.Join((IQueryable<M0>) Queryable.Join((IQueryable<M0>) Queryable.Join((IQueryable<M0>) se0085CtEntities1.SEOrders, (IEnumerable<M1>) se0085CtEntities1.OrderLines, (Expression<Func<M0, M2>>) (od => od.OrderId), (Expression<Func<M1, M2>>) (ol => ol.SEOrder.OrderId), (Expression<Func<M0, M1, M3>>) ((od, ol) => new{ od = od, ol = ol })), (IEnumerable<M1>) se0085CtEntities1.AssemblyLines, (Expression<Func<M0, M2>>) (data => data.ol.AssemblyLine.AssemLineId), (Expression<Func<M1, M2>>) (al => al.AssemLineId), (Expression<Func<M0, M1, M3>>) ((data, al) => new
        {
          \u0024VB\u0024It1 = data,
          al = al
        })), (IEnumerable<M1>) se0085CtEntities1.SEPlants, (Expression<Func<M0, M2>>) (data => data.al.SEPlant.SEPlantId), (Expression<Func<M1, M2>>) (pl => pl.SEPlantId), (Expression<Func<M0, M1, M3>>) ((data, pl) => new
        {
          od = data.\u0024VB\u0024It1.od,
          ol = data.\u0024VB\u0024It1.ol,
          al = data.al,
          pl = pl
        })), (Expression<Func<M0, bool>>) (data => Expression.Call((Expression) null, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (Microsoft.VisualBasic.CompilerServices.Operators.CompareString)), data.od.OrderFO, closure2.\u0024VB\u0024Local_ldOrder.OrderFO, false) == 0 & Expression.Call((Expression) null, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (Microsoft.VisualBasic.CompilerServices.Operators.CompareString)), data.ol.OrderLineNum, closure2.\u0024VB\u0024Local_ldOrder.OrderLineNum, false) == 0 & Expression.Call((Expression) null, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (Microsoft.VisualBasic.CompilerServices.Operators.CompareString)), data.ol.OrderLineSL, closure2.\u0024VB\u0024Local_ldOrder.OrderLineSL, false) == 0 & Expression.Call((Expression) null, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (Microsoft.VisualBasic.CompilerServices.Operators.CompareString)), data.ol.OrderLineSS, closure2.\u0024VB\u0024Local_ldOrder.OrderLineSS, false) == 0)), (Expression<Func<M0, M1>>) (data => data.ol.OrderLineId));
        if (source != null && source.Count<int>() > 0)
          num = source.First<int>();
        se0085CtEntities1.Database.Connection.Close();
      }
      return num;
    }

    public List<scODVSummary> rtnOVDataAllSummary(string AssemblyLine, DateTime TargetDateStart, DateTime TargetDateEnd, int Rec2Take = 32767, int Rec2Skip = 0, bool IncludeNotes = true)
    {
      // ISSUE: object of a compiler-generated type is created
      // ISSUE: variable of a compiler-generated type
      clsEngineCTdB._Closure\u0024__3 closure3 = new clsEngineCTdB._Closure\u0024__3();
      // ISSUE: reference to a compiler-generated field
      closure3.\u0024VB\u0024Local_AssemblyLine = AssemblyLine;
      // ISSUE: reference to a compiler-generated field
      closure3.\u0024VB\u0024Local_TargetDateStart = TargetDateStart;
      // ISSUE: reference to a compiler-generated field
      closure3.\u0024VB\u0024Local_TargetDateEnd = TargetDateEnd;
      List<scODVSummary> scOdvSummaryList = new List<scODVSummary>();
      int index = 0;
      using (SE0085CTEntities1 se0085CtEntities1 = new SE0085CTEntities1())
      {
        se0085CtEntities1.Database.Connection.ConnectionString = this._CTConnection;
        ParameterExpression parameterExpression1;
        ParameterExpression parameterExpression2;
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: type reference
        // ISSUE: method reference
        // ISSUE: field reference
        // ISSUE: method reference
        // ISSUE: type reference
        // ISSUE: method reference
        // ISSUE: field reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: type reference
        // ISSUE: method reference
        // ISSUE: field reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: type reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: type reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: type reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: type reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: type reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: type reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: type reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: type reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: type reference
        // ISSUE: method reference
        IQueryable<scODVSummary> source = ((IQueryable<scODVSummary>) Queryable.Select((IQueryable<M0>) Queryable.ThenBy(Queryable.ThenBy(Queryable.ThenBy(Queryable.ThenBy(Queryable.ThenBy(Queryable.OrderBy(Queryable.Where((IQueryable<M0>) Queryable.Join((IQueryable<M0>) Queryable.Join((IQueryable<M0>) Queryable.Join((IQueryable<M0>) Queryable.Join((IQueryable<M0>) se0085CtEntities1.SEOrders.Distinct<SEOrder>(), (IEnumerable<M1>) se0085CtEntities1.OrderLines.Distinct<OrderLine>(), (Expression<Func<M0, M2>>) (od => od.OrderId), (Expression<Func<M1, M2>>) (ol => ol.SEOrder.OrderId), (Expression<Func<M0, M1, M3>>) ((od, ol) => new{ od = od, ol = ol })), (IEnumerable<M1>) se0085CtEntities1.AssemblyLines, (Expression<Func<M0, M2>>) (data => data.ol.AssemblyLine.AssemLineId), (Expression<Func<M1, M2>>) (al => al.AssemLineId), (Expression<Func<M0, M1, M3>>) ((data, al) => new
        {
          \u0024VB\u0024It1 = data,
          al = al
        })), (IEnumerable<M1>) se0085CtEntities1.SEPlants, (Expression<Func<M0, M2>>) (data => data.al.SEPlant.SEPlantId), (Expression<Func<M1, M2>>) (pl => pl.SEPlantId), (Expression<Func<M0, M1, M3>>) ((data, pl) => new
        {
          \u0024VB\u0024It1 = data,
          pl = pl
        })), (IEnumerable<M1>) se0085CtEntities1.OrderLinesExts, (Expression<Func<M0, M2>>) (data => data.\u0024VB\u0024It1.\u0024VB\u0024It1.ol.OrderLineId), (Expression<Func<M1, M2>>) (oe => oe.OrderLine.OrderLineId), (Expression<Func<M0, M1, M3>>) ((data, oe) => new
        {
          od = data.\u0024VB\u0024It1.\u0024VB\u0024It1.od,
          ol = data.\u0024VB\u0024It1.\u0024VB\u0024It1.ol,
          al = data.\u0024VB\u0024It1.al,
          pl = data.pl,
          oe = oe
        })), (Expression<Func<M0, bool>>) Expression.Lambda<Func<VB\u0024AnonymousType_4<SEOrder, OrderLine, AssemblyLine, SEPlant, OrderLinesExt>, bool>>((Expression) Expression.Coalesce((Expression) Expression.And((Expression) Expression.And((Expression) Expression.And((Expression) Expression.And((Expression) Expression.Equal(\u0024VB\u0024It.ol.OrderLineShipped, (bool?) false, true, (MethodInfo) null), (Expression) Expression.Convert((Expression) Expression.Equal((Expression) Expression.Call((Expression) null, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (Microsoft.VisualBasic.CompilerServices.Operators.CompareString)), (Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression1, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_4<SEOrder, OrderLine, AssemblyLine, SEPlant, OrderLinesExt>.get_al), __typeref (VB\u0024AnonymousType_4<SEOrder, OrderLine, AssemblyLine, SEPlant, OrderLinesExt>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (AssemblyLine.get_AssemLineAbbrv))), (Expression) Expression.Field((Expression) Expression.Constant((object) closure3, typeof (clsEngineCTdB._Closure\u0024__3)), FieldInfo.GetFieldFromHandle(__fieldref (clsEngineCTdB._Closure\u0024__3.\u0024VB\u0024Local_AssemblyLine))), (Expression) Expression.Constant((object) false, typeof (bool))), (Expression) Expression.Constant((object) 0, typeof (int))), typeof (bool?))), (Expression) Expression.GreaterThanOrEqual((Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression1, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_4<SEOrder, OrderLine, AssemblyLine, SEPlant, OrderLinesExt>.get_ol), __typeref (VB\u0024AnonymousType_4<SEOrder, OrderLine, AssemblyLine, SEPlant, OrderLinesExt>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (OrderLine.get_OrderLineTargetDt))), (Expression) Expression.Convert((Expression) Expression.Field((Expression) Expression.Constant((object) closure3, typeof (clsEngineCTdB._Closure\u0024__3)), FieldInfo.GetFieldFromHandle(__fieldref (clsEngineCTdB._Closure\u0024__3.\u0024VB\u0024Local_TargetDateStart))), typeof (DateTime?)), true, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (DateTime.op_GreaterThanOrEqual)))), (Expression) Expression.LessThanOrEqual((Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression1, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_4<SEOrder, OrderLine, AssemblyLine, SEPlant, OrderLinesExt>.get_ol), __typeref (VB\u0024AnonymousType_4<SEOrder, OrderLine, AssemblyLine, SEPlant, OrderLinesExt>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (OrderLine.get_OrderLineTargetDt))), (Expression) Expression.Convert((Expression) Expression.Field((Expression) Expression.Constant((object) closure3, typeof (clsEngineCTdB._Closure\u0024__3)), FieldInfo.GetFieldFromHandle(__fieldref (clsEngineCTdB._Closure\u0024__3.\u0024VB\u0024Local_TargetDateEnd))), typeof (DateTime?)), true, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (DateTime.op_LessThanOrEqual)))), (Expression) Expression.LessThan((Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression1, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_4<SEOrder, OrderLine, AssemblyLine, SEPlant, OrderLinesExt>.get_ol), __typeref (VB\u0024AnonymousType_4<SEOrder, OrderLine, AssemblyLine, SEPlant, OrderLinesExt>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (OrderLine.get_OrderLineShipDt))), (Expression) Expression.Convert((Expression) Expression.Convert((Expression) Expression.Constant((object) "12-31-2020", typeof (string)), typeof (DateTime), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (Conversions.ToDate))), typeof (DateTime?)), true, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (DateTime.op_LessThan)))), (Expression) Expression.Constant((object) false, typeof (bool))), new ParameterExpression[1]
        {
          parameterExpression1
        })), (Expression<Func<M0, M1>>) (data => data.ol.OrderLineShipDt)), (Expression<Func<M0, M1>>) (data => data.oe.OrderLineOrgShipDt)), (Expression<Func<M0, M1>>) (data => data.od.OrderFO)), (Expression<Func<M0, M1>>) (data => data.ol.OrderLineNum)), (Expression<Func<M0, M1>>) (data => data.ol.OrderLineSL)), (Expression<Func<M0, M1>>) (data => data.ol.OrderLineSS)), (Expression<Func<M0, M1>>) Expression.Lambda<Func<VB\u0024AnonymousType_4<SEOrder, OrderLine, AssemblyLine, SEPlant, OrderLinesExt>, scODVSummary>>((Expression) Expression.MemberInit(Expression.New((ConstructorInfo) MethodBase.GetMethodFromHandle(__methodref (scODVSummary.\u002Ector)), (Expression[]) null), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scODVSummary.set_OrderFO)), (Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_4<SEOrder, OrderLine, AssemblyLine, SEPlant, OrderLinesExt>.get_od), __typeref (VB\u0024AnonymousType_4<SEOrder, OrderLine, AssemblyLine, SEPlant, OrderLinesExt>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (SEOrder.get_OrderFO)))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scODVSummary.set_OrderJobName)), (Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_4<SEOrder, OrderLine, AssemblyLine, SEPlant, OrderLinesExt>.get_od), __typeref (VB\u0024AnonymousType_4<SEOrder, OrderLine, AssemblyLine, SEPlant, OrderLinesExt>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (SEOrder.get_OrderJobName)))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scODVSummary.set_OrderLineId)), (Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_4<SEOrder, OrderLine, AssemblyLine, SEPlant, OrderLinesExt>.get_ol), __typeref (VB\u0024AnonymousType_4<SEOrder, OrderLine, AssemblyLine, SEPlant, OrderLinesExt>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (OrderLine.get_OrderLineId)))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scODVSummary.set_OrderLineNum)), (Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_4<SEOrder, OrderLine, AssemblyLine, SEPlant, OrderLinesExt>.get_ol), __typeref (VB\u0024AnonymousType_4<SEOrder, OrderLine, AssemblyLine, SEPlant, OrderLinesExt>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (OrderLine.get_OrderLineNum)))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scODVSummary.set_OrderLineSL)), (Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_4<SEOrder, OrderLine, AssemblyLine, SEPlant, OrderLinesExt>.get_ol), __typeref (VB\u0024AnonymousType_4<SEOrder, OrderLine, AssemblyLine, SEPlant, OrderLinesExt>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (OrderLine.get_OrderLineSL)))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scODVSummary.set_OrderLineSS)), (Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_4<SEOrder, OrderLine, AssemblyLine, SEPlant, OrderLinesExt>.get_ol), __typeref (VB\u0024AnonymousType_4<SEOrder, OrderLine, AssemblyLine, SEPlant, OrderLinesExt>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (OrderLine.get_OrderLineSS)))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scODVSummary.set_OrderLineTargetDt)), (Expression) Expression.Convert((Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_4<SEOrder, OrderLine, AssemblyLine, SEPlant, OrderLinesExt>.get_ol), __typeref (VB\u0024AnonymousType_4<SEOrder, OrderLine, AssemblyLine, SEPlant, OrderLinesExt>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (OrderLine.get_OrderLineTargetDt))), typeof (DateTime))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scODVSummary.set_OrderLineShipDt)), (Expression) Expression.Convert((Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_4<SEOrder, OrderLine, AssemblyLine, SEPlant, OrderLinesExt>.get_ol), __typeref (VB\u0024AnonymousType_4<SEOrder, OrderLine, AssemblyLine, SEPlant, OrderLinesExt>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (OrderLine.get_OrderLineShipDt))), typeof (DateTime)))), new ParameterExpression[1]
        {
          parameterExpression2
        }))).Take<scODVSummary>(Rec2Take).Skip<scODVSummary>(Rec2Skip);
        if (source != null && source.Count<scODVSummary>() > 0)
        {
          scOdvSummaryList = source.ToList<scODVSummary>();
          List<scODVSummary>.Enumerator enumerator;
          if (scOdvSummaryList != null)
          {
            if (scOdvSummaryList.Count > 0)
            {
              try
              {
                enumerator = scOdvSummaryList.GetEnumerator();
                while (enumerator.MoveNext())
                {
                  int orderLineId = enumerator.Current.OrderLineId;
                  scOdvSummaryList[index].OrderNotes = !IncludeNotes ? "" : this.rtnOrderLineLastCmt(orderLineId).OrderLineComment;
                  checked { ++index; }
                }
              }
              finally
              {
                enumerator.Dispose();
              }
            }
          }
        }
        se0085CtEntities1.Database.Connection.Close();
      }
      return scOdvSummaryList;
    }

    public List<scODVSummary> rtnOVDataSummaryByFO(string AssemblyLine, string FO, int Rec2Take = 32767, int Rec2Skip = 0, bool IncludeNotes = true)
    {
      // ISSUE: object of a compiler-generated type is created
      // ISSUE: variable of a compiler-generated type
      clsEngineCTdB._Closure\u0024__4 closure4 = new clsEngineCTdB._Closure\u0024__4();
      // ISSUE: reference to a compiler-generated field
      closure4.\u0024VB\u0024Local_AssemblyLine = AssemblyLine;
      // ISSUE: reference to a compiler-generated field
      closure4.\u0024VB\u0024Local_FO = FO;
      List<scODVSummary> scOdvSummaryList = new List<scODVSummary>();
      int index = 0;
      using (SE0085CTEntities1 se0085CtEntities1 = new SE0085CTEntities1())
      {
        se0085CtEntities1.Database.Connection.ConnectionString = this._CTConnection;
        // ISSUE: reference to a compiler-generated field
        if (closure4.\u0024VB\u0024Local_FO.Length == 8)
        {
          ParameterExpression parameterExpression1;
          ParameterExpression parameterExpression2;
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: type reference
          // ISSUE: method reference
          // ISSUE: field reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: type reference
          // ISSUE: method reference
          // ISSUE: field reference
          // ISSUE: method reference
          // ISSUE: type reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: type reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: type reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: type reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: type reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: type reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: type reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: type reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: type reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: type reference
          // ISSUE: method reference
          IQueryable<scODVSummary> source = ((IQueryable<scODVSummary>) Queryable.Select((IQueryable<M0>) Queryable.ThenBy(Queryable.ThenBy(Queryable.ThenBy(Queryable.ThenBy(Queryable.ThenBy(Queryable.OrderBy(Queryable.Where((IQueryable<M0>) Queryable.Join((IQueryable<M0>) Queryable.Join((IQueryable<M0>) Queryable.Join((IQueryable<M0>) Queryable.Join((IQueryable<M0>) se0085CtEntities1.SEOrders.Distinct<SEOrder>(), (IEnumerable<M1>) se0085CtEntities1.OrderLines.Distinct<OrderLine>(), (Expression<Func<M0, M2>>) (od => od.OrderId), (Expression<Func<M1, M2>>) (ol => ol.SEOrder.OrderId), (Expression<Func<M0, M1, M3>>) ((od, ol) => new{ od = od, ol = ol })), (IEnumerable<M1>) se0085CtEntities1.AssemblyLines, (Expression<Func<M0, M2>>) (data => data.ol.AssemblyLine.AssemLineId), (Expression<Func<M1, M2>>) (al => al.AssemLineId), (Expression<Func<M0, M1, M3>>) ((data, al) => new
          {
            \u0024VB\u0024It1 = data,
            al = al
          })), (IEnumerable<M1>) se0085CtEntities1.SEPlants, (Expression<Func<M0, M2>>) (data => data.al.SEPlant.SEPlantId), (Expression<Func<M1, M2>>) (pl => pl.SEPlantId), (Expression<Func<M0, M1, M3>>) ((data, pl) => new
          {
            \u0024VB\u0024It1 = data,
            pl = pl
          })), (IEnumerable<M1>) se0085CtEntities1.OrderLinesExts, (Expression<Func<M0, M2>>) (data => data.\u0024VB\u0024It1.\u0024VB\u0024It1.ol.OrderLineId), (Expression<Func<M1, M2>>) (oe => oe.OrderLine.OrderLineId), (Expression<Func<M0, M1, M3>>) ((data, oe) => new
          {
            od = data.\u0024VB\u0024It1.\u0024VB\u0024It1.od,
            ol = data.\u0024VB\u0024It1.\u0024VB\u0024It1.ol,
            al = data.\u0024VB\u0024It1.al,
            pl = data.pl,
            oe = oe
          })), (Expression<Func<M0, bool>>) Expression.Lambda<Func<VB\u0024AnonymousType_4<SEOrder, OrderLine, AssemblyLine, SEPlant, OrderLinesExt>, bool>>((Expression) Expression.Coalesce((Expression) Expression.And((Expression) Expression.And((Expression) Expression.And((Expression) Expression.And((Expression) Expression.Equal(\u0024VB\u0024It.ol.OrderLineShipped, (bool?) false, true, (MethodInfo) null), (Expression) Expression.Convert((Expression) Expression.Equal((Expression) Expression.Call((Expression) null, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (Microsoft.VisualBasic.CompilerServices.Operators.CompareString)), (Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression1, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_4<SEOrder, OrderLine, AssemblyLine, SEPlant, OrderLinesExt>.get_al), __typeref (VB\u0024AnonymousType_4<SEOrder, OrderLine, AssemblyLine, SEPlant, OrderLinesExt>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (AssemblyLine.get_AssemLineAbbrv))), (Expression) Expression.Field((Expression) Expression.Constant((object) closure4, typeof (clsEngineCTdB._Closure\u0024__4)), FieldInfo.GetFieldFromHandle(__fieldref (clsEngineCTdB._Closure\u0024__4.\u0024VB\u0024Local_AssemblyLine))), (Expression) Expression.Constant((object) false, typeof (bool))), (Expression) Expression.Constant((object) 0, typeof (int))), typeof (bool?))), (Expression) Expression.Convert((Expression) Expression.Equal((Expression) Expression.Call((Expression) null, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (Microsoft.VisualBasic.CompilerServices.Operators.CompareString)), (Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression1, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_4<SEOrder, OrderLine, AssemblyLine, SEPlant, OrderLinesExt>.get_od), __typeref (VB\u0024AnonymousType_4<SEOrder, OrderLine, AssemblyLine, SEPlant, OrderLinesExt>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (SEOrder.get_OrderFO))), (Expression) Expression.Field((Expression) Expression.Constant((object) closure4, typeof (clsEngineCTdB._Closure\u0024__4)), FieldInfo.GetFieldFromHandle(__fieldref (clsEngineCTdB._Closure\u0024__4.\u0024VB\u0024Local_FO))), (Expression) Expression.Constant((object) false, typeof (bool))), (Expression) Expression.Constant((object) 0, typeof (int))), typeof (bool?))), (Expression) Expression.GreaterThan((Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression1, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_4<SEOrder, OrderLine, AssemblyLine, SEPlant, OrderLinesExt>.get_ol), __typeref (VB\u0024AnonymousType_4<SEOrder, OrderLine, AssemblyLine, SEPlant, OrderLinesExt>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (OrderLine.get_OrderLineTargetDt))), (Expression) Expression.Convert((Expression) Expression.Convert((Expression) Expression.Constant((object) "01/01/1901", typeof (string)), typeof (DateTime), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (Conversions.ToDate))), typeof (DateTime?)), true, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (DateTime.op_GreaterThan)))), (Expression) Expression.LessThan((Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression1, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_4<SEOrder, OrderLine, AssemblyLine, SEPlant, OrderLinesExt>.get_ol), __typeref (VB\u0024AnonymousType_4<SEOrder, OrderLine, AssemblyLine, SEPlant, OrderLinesExt>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (OrderLine.get_OrderLineShipDt))), (Expression) Expression.Convert((Expression) Expression.Convert((Expression) Expression.Constant((object) "12-31-2020", typeof (string)), typeof (DateTime), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (Conversions.ToDate))), typeof (DateTime?)), true, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (DateTime.op_LessThan)))), (Expression) Expression.Constant((object) false, typeof (bool))), new ParameterExpression[1]
          {
            parameterExpression1
          })), (Expression<Func<M0, M1>>) (data => data.ol.OrderLineShipDt)), (Expression<Func<M0, M1>>) (data => data.oe.OrderLineOrgShipDt)), (Expression<Func<M0, M1>>) (data => data.od.OrderFO)), (Expression<Func<M0, M1>>) (data => data.ol.OrderLineNum)), (Expression<Func<M0, M1>>) (data => data.ol.OrderLineSL)), (Expression<Func<M0, M1>>) (data => data.ol.OrderLineSS)), (Expression<Func<M0, M1>>) Expression.Lambda<Func<VB\u0024AnonymousType_4<SEOrder, OrderLine, AssemblyLine, SEPlant, OrderLinesExt>, scODVSummary>>((Expression) Expression.MemberInit(Expression.New((ConstructorInfo) MethodBase.GetMethodFromHandle(__methodref (scODVSummary.\u002Ector)), (Expression[]) null), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scODVSummary.set_OrderFO)), (Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_4<SEOrder, OrderLine, AssemblyLine, SEPlant, OrderLinesExt>.get_od), __typeref (VB\u0024AnonymousType_4<SEOrder, OrderLine, AssemblyLine, SEPlant, OrderLinesExt>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (SEOrder.get_OrderFO)))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scODVSummary.set_OrderJobName)), (Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_4<SEOrder, OrderLine, AssemblyLine, SEPlant, OrderLinesExt>.get_od), __typeref (VB\u0024AnonymousType_4<SEOrder, OrderLine, AssemblyLine, SEPlant, OrderLinesExt>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (SEOrder.get_OrderJobName)))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scODVSummary.set_OrderLineId)), (Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_4<SEOrder, OrderLine, AssemblyLine, SEPlant, OrderLinesExt>.get_ol), __typeref (VB\u0024AnonymousType_4<SEOrder, OrderLine, AssemblyLine, SEPlant, OrderLinesExt>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (OrderLine.get_OrderLineId)))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scODVSummary.set_OrderLineNum)), (Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_4<SEOrder, OrderLine, AssemblyLine, SEPlant, OrderLinesExt>.get_ol), __typeref (VB\u0024AnonymousType_4<SEOrder, OrderLine, AssemblyLine, SEPlant, OrderLinesExt>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (OrderLine.get_OrderLineNum)))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scODVSummary.set_OrderLineSL)), (Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_4<SEOrder, OrderLine, AssemblyLine, SEPlant, OrderLinesExt>.get_ol), __typeref (VB\u0024AnonymousType_4<SEOrder, OrderLine, AssemblyLine, SEPlant, OrderLinesExt>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (OrderLine.get_OrderLineSL)))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scODVSummary.set_OrderLineSS)), (Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_4<SEOrder, OrderLine, AssemblyLine, SEPlant, OrderLinesExt>.get_ol), __typeref (VB\u0024AnonymousType_4<SEOrder, OrderLine, AssemblyLine, SEPlant, OrderLinesExt>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (OrderLine.get_OrderLineSS)))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scODVSummary.set_OrderLineTargetDt)), (Expression) Expression.Convert((Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_4<SEOrder, OrderLine, AssemblyLine, SEPlant, OrderLinesExt>.get_ol), __typeref (VB\u0024AnonymousType_4<SEOrder, OrderLine, AssemblyLine, SEPlant, OrderLinesExt>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (OrderLine.get_OrderLineTargetDt))), typeof (DateTime))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scODVSummary.set_OrderLineShipDt)), (Expression) Expression.Convert((Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_4<SEOrder, OrderLine, AssemblyLine, SEPlant, OrderLinesExt>.get_ol), __typeref (VB\u0024AnonymousType_4<SEOrder, OrderLine, AssemblyLine, SEPlant, OrderLinesExt>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (OrderLine.get_OrderLineShipDt))), typeof (DateTime)))), new ParameterExpression[1]
          {
            parameterExpression2
          }))).Take<scODVSummary>(Rec2Take).Skip<scODVSummary>(Rec2Skip);
          if (source != null && source.Count<scODVSummary>() > 0)
          {
            scOdvSummaryList = source.ToList<scODVSummary>();
            List<scODVSummary>.Enumerator enumerator;
            if (scOdvSummaryList != null)
            {
              if (scOdvSummaryList.Count > 0)
              {
                try
                {
                  enumerator = scOdvSummaryList.GetEnumerator();
                  while (enumerator.MoveNext())
                  {
                    int orderLineId = enumerator.Current.OrderLineId;
                    scOdvSummaryList[index].OrderNotes = !IncludeNotes ? "" : this.rtnOrderLineLastCmt(orderLineId).OrderLineComment;
                    checked { ++index; }
                  }
                }
                finally
                {
                  enumerator.Dispose();
                }
              }
            }
          }
        }
        else
        {
          // ISSUE: reference to a compiler-generated field
          if (closure4.\u0024VB\u0024Local_FO.Length == 11)
          {
            ParameterExpression parameterExpression1;
            ParameterExpression parameterExpression2;
            // ISSUE: method reference
            // ISSUE: method reference
            // ISSUE: type reference
            // ISSUE: method reference
            // ISSUE: field reference
            // ISSUE: method reference
            // ISSUE: method reference
            // ISSUE: type reference
            // ISSUE: method reference
            // ISSUE: field reference
            // ISSUE: method reference
            // ISSUE: method reference
            // ISSUE: method reference
            // ISSUE: type reference
            // ISSUE: method reference
            // ISSUE: field reference
            // ISSUE: method reference
            // ISSUE: method reference
            // ISSUE: type reference
            // ISSUE: method reference
            // ISSUE: method reference
            // ISSUE: method reference
            // ISSUE: method reference
            // ISSUE: type reference
            // ISSUE: method reference
            // ISSUE: method reference
            // ISSUE: method reference
            // ISSUE: method reference
            // ISSUE: method reference
            // ISSUE: method reference
            // ISSUE: type reference
            // ISSUE: method reference
            // ISSUE: method reference
            // ISSUE: method reference
            // ISSUE: type reference
            // ISSUE: method reference
            // ISSUE: method reference
            // ISSUE: method reference
            // ISSUE: type reference
            // ISSUE: method reference
            // ISSUE: method reference
            // ISSUE: method reference
            // ISSUE: type reference
            // ISSUE: method reference
            // ISSUE: method reference
            // ISSUE: method reference
            // ISSUE: type reference
            // ISSUE: method reference
            // ISSUE: method reference
            // ISSUE: method reference
            // ISSUE: type reference
            // ISSUE: method reference
            // ISSUE: method reference
            // ISSUE: method reference
            // ISSUE: type reference
            // ISSUE: method reference
            // ISSUE: method reference
            // ISSUE: method reference
            // ISSUE: type reference
            // ISSUE: method reference
            IQueryable<scODVSummary> source = ((IQueryable<scODVSummary>) Queryable.Select((IQueryable<M0>) Queryable.ThenBy(Queryable.ThenBy(Queryable.ThenBy(Queryable.ThenBy(Queryable.ThenBy(Queryable.OrderBy(Queryable.Where((IQueryable<M0>) Queryable.Join((IQueryable<M0>) Queryable.Join((IQueryable<M0>) Queryable.Join((IQueryable<M0>) Queryable.Join((IQueryable<M0>) se0085CtEntities1.SEOrders.Distinct<SEOrder>(), (IEnumerable<M1>) se0085CtEntities1.OrderLines.Distinct<OrderLine>(), (Expression<Func<M0, M2>>) (od => od.OrderId), (Expression<Func<M1, M2>>) (ol => ol.SEOrder.OrderId), (Expression<Func<M0, M1, M3>>) ((od, ol) => new{ od = od, ol = ol })), (IEnumerable<M1>) se0085CtEntities1.AssemblyLines, (Expression<Func<M0, M2>>) (data => data.ol.AssemblyLine.AssemLineId), (Expression<Func<M1, M2>>) (al => al.AssemLineId), (Expression<Func<M0, M1, M3>>) ((data, al) => new
            {
              \u0024VB\u0024It1 = data,
              al = al
            })), (IEnumerable<M1>) se0085CtEntities1.SEPlants, (Expression<Func<M0, M2>>) (data => data.al.SEPlant.SEPlantId), (Expression<Func<M1, M2>>) (pl => pl.SEPlantId), (Expression<Func<M0, M1, M3>>) ((data, pl) => new
            {
              \u0024VB\u0024It1 = data,
              pl = pl
            })), (IEnumerable<M1>) se0085CtEntities1.OrderLinesExts, (Expression<Func<M0, M2>>) (data => data.\u0024VB\u0024It1.\u0024VB\u0024It1.ol.OrderLineId), (Expression<Func<M1, M2>>) (oe => oe.OrderLine.OrderLineId), (Expression<Func<M0, M1, M3>>) ((data, oe) => new
            {
              od = data.\u0024VB\u0024It1.\u0024VB\u0024It1.od,
              ol = data.\u0024VB\u0024It1.\u0024VB\u0024It1.ol,
              al = data.\u0024VB\u0024It1.al,
              pl = data.pl,
              oe = oe
            })), (Expression<Func<M0, bool>>) Expression.Lambda<Func<VB\u0024AnonymousType_4<SEOrder, OrderLine, AssemblyLine, SEPlant, OrderLinesExt>, bool>>((Expression) Expression.Coalesce((Expression) Expression.And((Expression) Expression.And((Expression) Expression.And((Expression) Expression.And((Expression) Expression.And((Expression) Expression.Equal(\u0024VB\u0024It.ol.OrderLineShipped, (bool?) false, true, (MethodInfo) null), (Expression) Expression.Convert((Expression) Expression.Equal((Expression) Expression.Call((Expression) null, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (Microsoft.VisualBasic.CompilerServices.Operators.CompareString)), (Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression1, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_4<SEOrder, OrderLine, AssemblyLine, SEPlant, OrderLinesExt>.get_al), __typeref (VB\u0024AnonymousType_4<SEOrder, OrderLine, AssemblyLine, SEPlant, OrderLinesExt>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (AssemblyLine.get_AssemLineAbbrv))), (Expression) Expression.Field((Expression) Expression.Constant((object) closure4, typeof (clsEngineCTdB._Closure\u0024__4)), FieldInfo.GetFieldFromHandle(__fieldref (clsEngineCTdB._Closure\u0024__4.\u0024VB\u0024Local_AssemblyLine))), (Expression) Expression.Constant((object) false, typeof (bool))), (Expression) Expression.Constant((object) 0, typeof (int))), typeof (bool?))), (Expression) Expression.Convert((Expression) Expression.Equal((Expression) Expression.Call((Expression) null, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (Microsoft.VisualBasic.CompilerServices.Operators.CompareString)), (Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression1, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_4<SEOrder, OrderLine, AssemblyLine, SEPlant, OrderLinesExt>.get_od), __typeref (VB\u0024AnonymousType_4<SEOrder, OrderLine, AssemblyLine, SEPlant, OrderLinesExt>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (SEOrder.get_OrderFO))), (Expression) Expression.Call((Expression) Expression.Field((Expression) Expression.Constant((object) closure4, typeof (clsEngineCTdB._Closure\u0024__4)), FieldInfo.GetFieldFromHandle(__fieldref (clsEngineCTdB._Closure\u0024__4.\u0024VB\u0024Local_FO))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (string.Substring)), new Expression[2]
            {
              (Expression) Expression.Constant((object) 0, typeof (int)),
              (Expression) Expression.Constant((object) 8, typeof (int))
            }), (Expression) Expression.Constant((object) false, typeof (bool))), (Expression) Expression.Constant((object) 0, typeof (int))), typeof (bool?))), (Expression) Expression.Convert((Expression) Expression.Equal((Expression) Expression.Call((Expression) null, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (Microsoft.VisualBasic.CompilerServices.Operators.CompareString)), (Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression1, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_4<SEOrder, OrderLine, AssemblyLine, SEPlant, OrderLinesExt>.get_ol), __typeref (VB\u0024AnonymousType_4<SEOrder, OrderLine, AssemblyLine, SEPlant, OrderLinesExt>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (OrderLine.get_OrderLineNum))), (Expression) Expression.Call((Expression) Expression.Field((Expression) Expression.Constant((object) closure4, typeof (clsEngineCTdB._Closure\u0024__4)), FieldInfo.GetFieldFromHandle(__fieldref (clsEngineCTdB._Closure\u0024__4.\u0024VB\u0024Local_FO))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (string.Substring)), new Expression[2]
            {
              (Expression) Expression.Constant((object) 8, typeof (int)),
              (Expression) Expression.Constant((object) 3, typeof (int))
            }), (Expression) Expression.Constant((object) false, typeof (bool))), (Expression) Expression.Constant((object) 0, typeof (int))), typeof (bool?))), (Expression) Expression.GreaterThan((Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression1, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_4<SEOrder, OrderLine, AssemblyLine, SEPlant, OrderLinesExt>.get_ol), __typeref (VB\u0024AnonymousType_4<SEOrder, OrderLine, AssemblyLine, SEPlant, OrderLinesExt>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (OrderLine.get_OrderLineTargetDt))), (Expression) Expression.Convert((Expression) Expression.Convert((Expression) Expression.Constant((object) "01/01/1901", typeof (string)), typeof (DateTime), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (Conversions.ToDate))), typeof (DateTime?)), true, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (DateTime.op_GreaterThan)))), (Expression) Expression.LessThan((Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression1, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_4<SEOrder, OrderLine, AssemblyLine, SEPlant, OrderLinesExt>.get_ol), __typeref (VB\u0024AnonymousType_4<SEOrder, OrderLine, AssemblyLine, SEPlant, OrderLinesExt>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (OrderLine.get_OrderLineShipDt))), (Expression) Expression.Convert((Expression) Expression.Convert((Expression) Expression.Constant((object) "12-31-2020", typeof (string)), typeof (DateTime), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (Conversions.ToDate))), typeof (DateTime?)), true, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (DateTime.op_LessThan)))), (Expression) Expression.Constant((object) false, typeof (bool))), new ParameterExpression[1]
            {
              parameterExpression1
            })), (Expression<Func<M0, M1>>) (data => data.ol.OrderLineTargetDt)), (Expression<Func<M0, M1>>) (data => data.oe.OrderLineOrgShipDt)), (Expression<Func<M0, M1>>) (data => data.od.OrderFO)), (Expression<Func<M0, M1>>) (data => data.ol.OrderLineNum)), (Expression<Func<M0, M1>>) (data => data.ol.OrderLineSL)), (Expression<Func<M0, M1>>) (data => data.ol.OrderLineSS)), (Expression<Func<M0, M1>>) Expression.Lambda<Func<VB\u0024AnonymousType_4<SEOrder, OrderLine, AssemblyLine, SEPlant, OrderLinesExt>, scODVSummary>>((Expression) Expression.MemberInit(Expression.New((ConstructorInfo) MethodBase.GetMethodFromHandle(__methodref (scODVSummary.\u002Ector)), (Expression[]) null), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scODVSummary.set_OrderFO)), (Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_4<SEOrder, OrderLine, AssemblyLine, SEPlant, OrderLinesExt>.get_od), __typeref (VB\u0024AnonymousType_4<SEOrder, OrderLine, AssemblyLine, SEPlant, OrderLinesExt>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (SEOrder.get_OrderFO)))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scODVSummary.set_OrderJobName)), (Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_4<SEOrder, OrderLine, AssemblyLine, SEPlant, OrderLinesExt>.get_od), __typeref (VB\u0024AnonymousType_4<SEOrder, OrderLine, AssemblyLine, SEPlant, OrderLinesExt>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (SEOrder.get_OrderJobName)))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scODVSummary.set_OrderLineId)), (Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_4<SEOrder, OrderLine, AssemblyLine, SEPlant, OrderLinesExt>.get_ol), __typeref (VB\u0024AnonymousType_4<SEOrder, OrderLine, AssemblyLine, SEPlant, OrderLinesExt>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (OrderLine.get_OrderLineId)))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scODVSummary.set_OrderLineNum)), (Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_4<SEOrder, OrderLine, AssemblyLine, SEPlant, OrderLinesExt>.get_ol), __typeref (VB\u0024AnonymousType_4<SEOrder, OrderLine, AssemblyLine, SEPlant, OrderLinesExt>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (OrderLine.get_OrderLineNum)))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scODVSummary.set_OrderLineSL)), (Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_4<SEOrder, OrderLine, AssemblyLine, SEPlant, OrderLinesExt>.get_ol), __typeref (VB\u0024AnonymousType_4<SEOrder, OrderLine, AssemblyLine, SEPlant, OrderLinesExt>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (OrderLine.get_OrderLineSL)))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scODVSummary.set_OrderLineSS)), (Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_4<SEOrder, OrderLine, AssemblyLine, SEPlant, OrderLinesExt>.get_ol), __typeref (VB\u0024AnonymousType_4<SEOrder, OrderLine, AssemblyLine, SEPlant, OrderLinesExt>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (OrderLine.get_OrderLineSS)))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scODVSummary.set_OrderLineTargetDt)), (Expression) Expression.Convert((Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_4<SEOrder, OrderLine, AssemblyLine, SEPlant, OrderLinesExt>.get_ol), __typeref (VB\u0024AnonymousType_4<SEOrder, OrderLine, AssemblyLine, SEPlant, OrderLinesExt>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (OrderLine.get_OrderLineTargetDt))), typeof (DateTime))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scODVSummary.set_OrderLineShipDt)), (Expression) Expression.Convert((Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_4<SEOrder, OrderLine, AssemblyLine, SEPlant, OrderLinesExt>.get_ol), __typeref (VB\u0024AnonymousType_4<SEOrder, OrderLine, AssemblyLine, SEPlant, OrderLinesExt>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (OrderLine.get_OrderLineShipDt))), typeof (DateTime)))), new ParameterExpression[1]
            {
              parameterExpression2
            }))).Take<scODVSummary>(Rec2Take).Skip<scODVSummary>(Rec2Skip);
            if (source != null && source.Count<scODVSummary>() > 0)
            {
              scOdvSummaryList = source.ToList<scODVSummary>();
              List<scODVSummary>.Enumerator enumerator;
              if (scOdvSummaryList != null)
              {
                if (scOdvSummaryList.Count > 0)
                {
                  try
                  {
                    enumerator = scOdvSummaryList.GetEnumerator();
                    while (enumerator.MoveNext())
                    {
                      int orderLineId = enumerator.Current.OrderLineId;
                      scOdvSummaryList[index].OrderNotes = !IncludeNotes ? "" : this.rtnOrderLineLastCmt(orderLineId).OrderLineComment;
                      checked { ++index; }
                    }
                  }
                  finally
                  {
                    enumerator.Dispose();
                  }
                }
              }
            }
          }
        }
        se0085CtEntities1.Database.Connection.Close();
      }
      return scOdvSummaryList;
    }

    public List<scODVSummary> rtnOVDataSummaryByFOLineSLSS(string AssemblyLine, string FOLineSLSS, int Rec2Take = 32767, int Rec2Skip = 0, bool IncludeNotes = true)
    {
      // ISSUE: object of a compiler-generated type is created
      // ISSUE: variable of a compiler-generated type
      clsEngineCTdB._Closure\u0024__5 closure5 = new clsEngineCTdB._Closure\u0024__5();
      // ISSUE: reference to a compiler-generated field
      closure5.\u0024VB\u0024Local_AssemblyLine = AssemblyLine;
      List<scODVSummary> scOdvSummaryList = new List<scODVSummary>();
      int index = 0;
      // ISSUE: reference to a compiler-generated field
      closure5.\u0024VB\u0024Local_ldOrder = new scOrderData();
      // ISSUE: reference to a compiler-generated field
      closure5.\u0024VB\u0024Local_ldOrder.FactoryOrder = FOLineSLSS;
      using (SE0085CTEntities1 se0085CtEntities1 = new SE0085CTEntities1())
      {
        se0085CtEntities1.Database.Connection.ConnectionString = this._CTConnection;
        ParameterExpression parameterExpression1;
        ParameterExpression parameterExpression2;
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: type reference
        // ISSUE: method reference
        // ISSUE: field reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: type reference
        // ISSUE: method reference
        // ISSUE: field reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: type reference
        // ISSUE: method reference
        // ISSUE: field reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: type reference
        // ISSUE: method reference
        // ISSUE: field reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: type reference
        // ISSUE: method reference
        // ISSUE: field reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: type reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: type reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: type reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: type reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: type reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: type reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: type reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: type reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: type reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: type reference
        // ISSUE: method reference
        IQueryable<scODVSummary> source = ((IQueryable<scODVSummary>) Queryable.Select((IQueryable<M0>) Queryable.ThenBy(Queryable.ThenBy(Queryable.ThenBy(Queryable.ThenBy(Queryable.ThenBy(Queryable.OrderBy(Queryable.Where((IQueryable<M0>) Queryable.Join((IQueryable<M0>) Queryable.Join((IQueryable<M0>) Queryable.Join((IQueryable<M0>) Queryable.Join((IQueryable<M0>) se0085CtEntities1.SEOrders.Distinct<SEOrder>(), (IEnumerable<M1>) se0085CtEntities1.OrderLines.Distinct<OrderLine>(), (Expression<Func<M0, M2>>) (od => od.OrderId), (Expression<Func<M1, M2>>) (ol => ol.SEOrder.OrderId), (Expression<Func<M0, M1, M3>>) ((od, ol) => new{ od = od, ol = ol })), (IEnumerable<M1>) se0085CtEntities1.AssemblyLines, (Expression<Func<M0, M2>>) (data => data.ol.AssemblyLine.AssemLineId), (Expression<Func<M1, M2>>) (al => al.AssemLineId), (Expression<Func<M0, M1, M3>>) ((data, al) => new
        {
          \u0024VB\u0024It1 = data,
          al = al
        })), (IEnumerable<M1>) se0085CtEntities1.SEPlants, (Expression<Func<M0, M2>>) (data => data.al.SEPlant.SEPlantId), (Expression<Func<M1, M2>>) (pl => pl.SEPlantId), (Expression<Func<M0, M1, M3>>) ((data, pl) => new
        {
          \u0024VB\u0024It1 = data,
          pl = pl
        })), (IEnumerable<M1>) se0085CtEntities1.OrderLinesExts, (Expression<Func<M0, M2>>) (data => data.\u0024VB\u0024It1.\u0024VB\u0024It1.ol.OrderLineId), (Expression<Func<M1, M2>>) (oe => oe.OrderLine.OrderLineId), (Expression<Func<M0, M1, M3>>) ((data, oe) => new
        {
          od = data.\u0024VB\u0024It1.\u0024VB\u0024It1.od,
          ol = data.\u0024VB\u0024It1.\u0024VB\u0024It1.ol,
          al = data.\u0024VB\u0024It1.al,
          pl = data.pl,
          oe = oe
        })), (Expression<Func<M0, bool>>) Expression.Lambda<Func<VB\u0024AnonymousType_4<SEOrder, OrderLine, AssemblyLine, SEPlant, OrderLinesExt>, bool>>((Expression) Expression.Coalesce((Expression) Expression.And((Expression) Expression.And((Expression) Expression.And((Expression) Expression.And((Expression) Expression.And((Expression) Expression.And((Expression) Expression.And((Expression) Expression.Equal(\u0024VB\u0024It.ol.OrderLineShipped, (bool?) false, true, (MethodInfo) null), (Expression) Expression.Convert((Expression) Expression.Equal((Expression) Expression.Call((Expression) null, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (Microsoft.VisualBasic.CompilerServices.Operators.CompareString)), (Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression1, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_4<SEOrder, OrderLine, AssemblyLine, SEPlant, OrderLinesExt>.get_al), __typeref (VB\u0024AnonymousType_4<SEOrder, OrderLine, AssemblyLine, SEPlant, OrderLinesExt>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (AssemblyLine.get_AssemLineAbbrv))), (Expression) Expression.Field((Expression) Expression.Constant((object) closure5, typeof (clsEngineCTdB._Closure\u0024__5)), FieldInfo.GetFieldFromHandle(__fieldref (clsEngineCTdB._Closure\u0024__5.\u0024VB\u0024Local_AssemblyLine))), (Expression) Expression.Constant((object) false, typeof (bool))), (Expression) Expression.Constant((object) 0, typeof (int))), typeof (bool?))), (Expression) Expression.Convert((Expression) Expression.Equal((Expression) Expression.Call((Expression) null, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (Microsoft.VisualBasic.CompilerServices.Operators.CompareString)), (Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression1, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_4<SEOrder, OrderLine, AssemblyLine, SEPlant, OrderLinesExt>.get_od), __typeref (VB\u0024AnonymousType_4<SEOrder, OrderLine, AssemblyLine, SEPlant, OrderLinesExt>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (SEOrder.get_OrderFO))), (Expression) Expression.Property((Expression) Expression.Field((Expression) Expression.Constant((object) closure5, typeof (clsEngineCTdB._Closure\u0024__5)), FieldInfo.GetFieldFromHandle(__fieldref (clsEngineCTdB._Closure\u0024__5.\u0024VB\u0024Local_ldOrder))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scOrderData.get_OrderFO))), (Expression) Expression.Constant((object) false, typeof (bool))), (Expression) Expression.Constant((object) 0, typeof (int))), typeof (bool?))), (Expression) Expression.Convert((Expression) Expression.Equal((Expression) Expression.Call((Expression) null, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (Microsoft.VisualBasic.CompilerServices.Operators.CompareString)), (Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression1, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_4<SEOrder, OrderLine, AssemblyLine, SEPlant, OrderLinesExt>.get_ol), __typeref (VB\u0024AnonymousType_4<SEOrder, OrderLine, AssemblyLine, SEPlant, OrderLinesExt>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (OrderLine.get_OrderLineNum))), (Expression) Expression.Property((Expression) Expression.Field((Expression) Expression.Constant((object) closure5, typeof (clsEngineCTdB._Closure\u0024__5)), FieldInfo.GetFieldFromHandle(__fieldref (clsEngineCTdB._Closure\u0024__5.\u0024VB\u0024Local_ldOrder))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scOrderData.get_OrderLineNum))), (Expression) Expression.Constant((object) false, typeof (bool))), (Expression) Expression.Constant((object) 0, typeof (int))), typeof (bool?))), (Expression) Expression.Convert((Expression) Expression.Equal((Expression) Expression.Call((Expression) null, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (Microsoft.VisualBasic.CompilerServices.Operators.CompareString)), (Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression1, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_4<SEOrder, OrderLine, AssemblyLine, SEPlant, OrderLinesExt>.get_ol), __typeref (VB\u0024AnonymousType_4<SEOrder, OrderLine, AssemblyLine, SEPlant, OrderLinesExt>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (OrderLine.get_OrderLineSL))), (Expression) Expression.Property((Expression) Expression.Field((Expression) Expression.Constant((object) closure5, typeof (clsEngineCTdB._Closure\u0024__5)), FieldInfo.GetFieldFromHandle(__fieldref (clsEngineCTdB._Closure\u0024__5.\u0024VB\u0024Local_ldOrder))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scOrderData.get_OrderLineSL))), (Expression) Expression.Constant((object) false, typeof (bool))), (Expression) Expression.Constant((object) 0, typeof (int))), typeof (bool?))), (Expression) Expression.Convert((Expression) Expression.Equal((Expression) Expression.Call((Expression) null, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (Microsoft.VisualBasic.CompilerServices.Operators.CompareString)), (Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression1, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_4<SEOrder, OrderLine, AssemblyLine, SEPlant, OrderLinesExt>.get_ol), __typeref (VB\u0024AnonymousType_4<SEOrder, OrderLine, AssemblyLine, SEPlant, OrderLinesExt>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (OrderLine.get_OrderLineSS))), (Expression) Expression.Property((Expression) Expression.Field((Expression) Expression.Constant((object) closure5, typeof (clsEngineCTdB._Closure\u0024__5)), FieldInfo.GetFieldFromHandle(__fieldref (clsEngineCTdB._Closure\u0024__5.\u0024VB\u0024Local_ldOrder))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scOrderData.get_OrderLineSS))), (Expression) Expression.Constant((object) false, typeof (bool))), (Expression) Expression.Constant((object) 0, typeof (int))), typeof (bool?))), (Expression) Expression.GreaterThan((Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression1, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_4<SEOrder, OrderLine, AssemblyLine, SEPlant, OrderLinesExt>.get_ol), __typeref (VB\u0024AnonymousType_4<SEOrder, OrderLine, AssemblyLine, SEPlant, OrderLinesExt>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (OrderLine.get_OrderLineTargetDt))), (Expression) Expression.Convert((Expression) Expression.Convert((Expression) Expression.Constant((object) "01/01/1901", typeof (string)), typeof (DateTime), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (Conversions.ToDate))), typeof (DateTime?)), true, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (DateTime.op_GreaterThan)))), (Expression) Expression.LessThan((Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression1, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_4<SEOrder, OrderLine, AssemblyLine, SEPlant, OrderLinesExt>.get_ol), __typeref (VB\u0024AnonymousType_4<SEOrder, OrderLine, AssemblyLine, SEPlant, OrderLinesExt>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (OrderLine.get_OrderLineShipDt))), (Expression) Expression.Convert((Expression) Expression.Convert((Expression) Expression.Constant((object) "12-31-2020", typeof (string)), typeof (DateTime), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (Conversions.ToDate))), typeof (DateTime?)), true, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (DateTime.op_LessThan)))), (Expression) Expression.Constant((object) false, typeof (bool))), new ParameterExpression[1]
        {
          parameterExpression1
        })), (Expression<Func<M0, M1>>) (data => data.ol.OrderLineShipDt)), (Expression<Func<M0, M1>>) (data => data.oe.OrderLineOrgShipDt)), (Expression<Func<M0, M1>>) (data => data.od.OrderFO)), (Expression<Func<M0, M1>>) (data => data.ol.OrderLineNum)), (Expression<Func<M0, M1>>) (data => data.ol.OrderLineSL)), (Expression<Func<M0, M1>>) (data => data.ol.OrderLineSS)), (Expression<Func<M0, M1>>) Expression.Lambda<Func<VB\u0024AnonymousType_4<SEOrder, OrderLine, AssemblyLine, SEPlant, OrderLinesExt>, scODVSummary>>((Expression) Expression.MemberInit(Expression.New((ConstructorInfo) MethodBase.GetMethodFromHandle(__methodref (scODVSummary.\u002Ector)), (Expression[]) null), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scODVSummary.set_OrderFO)), (Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_4<SEOrder, OrderLine, AssemblyLine, SEPlant, OrderLinesExt>.get_od), __typeref (VB\u0024AnonymousType_4<SEOrder, OrderLine, AssemblyLine, SEPlant, OrderLinesExt>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (SEOrder.get_OrderFO)))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scODVSummary.set_OrderJobName)), (Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_4<SEOrder, OrderLine, AssemblyLine, SEPlant, OrderLinesExt>.get_od), __typeref (VB\u0024AnonymousType_4<SEOrder, OrderLine, AssemblyLine, SEPlant, OrderLinesExt>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (SEOrder.get_OrderJobName)))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scODVSummary.set_OrderLineId)), (Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_4<SEOrder, OrderLine, AssemblyLine, SEPlant, OrderLinesExt>.get_ol), __typeref (VB\u0024AnonymousType_4<SEOrder, OrderLine, AssemblyLine, SEPlant, OrderLinesExt>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (OrderLine.get_OrderLineId)))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scODVSummary.set_OrderLineNum)), (Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_4<SEOrder, OrderLine, AssemblyLine, SEPlant, OrderLinesExt>.get_ol), __typeref (VB\u0024AnonymousType_4<SEOrder, OrderLine, AssemblyLine, SEPlant, OrderLinesExt>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (OrderLine.get_OrderLineNum)))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scODVSummary.set_OrderLineSL)), (Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_4<SEOrder, OrderLine, AssemblyLine, SEPlant, OrderLinesExt>.get_ol), __typeref (VB\u0024AnonymousType_4<SEOrder, OrderLine, AssemblyLine, SEPlant, OrderLinesExt>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (OrderLine.get_OrderLineSL)))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scODVSummary.set_OrderLineSS)), (Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_4<SEOrder, OrderLine, AssemblyLine, SEPlant, OrderLinesExt>.get_ol), __typeref (VB\u0024AnonymousType_4<SEOrder, OrderLine, AssemblyLine, SEPlant, OrderLinesExt>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (OrderLine.get_OrderLineSS)))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scODVSummary.set_OrderLineTargetDt)), (Expression) Expression.Convert((Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_4<SEOrder, OrderLine, AssemblyLine, SEPlant, OrderLinesExt>.get_ol), __typeref (VB\u0024AnonymousType_4<SEOrder, OrderLine, AssemblyLine, SEPlant, OrderLinesExt>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (OrderLine.get_OrderLineTargetDt))), typeof (DateTime))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scODVSummary.set_OrderLineShipDt)), (Expression) Expression.Convert((Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_4<SEOrder, OrderLine, AssemblyLine, SEPlant, OrderLinesExt>.get_ol), __typeref (VB\u0024AnonymousType_4<SEOrder, OrderLine, AssemblyLine, SEPlant, OrderLinesExt>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (OrderLine.get_OrderLineShipDt))), typeof (DateTime)))), new ParameterExpression[1]
        {
          parameterExpression2
        }))).Take<scODVSummary>(Rec2Take).Skip<scODVSummary>(Rec2Skip);
        if (source != null && source.Count<scODVSummary>() > 0)
        {
          scOdvSummaryList = source.ToList<scODVSummary>();
          List<scODVSummary>.Enumerator enumerator;
          if (scOdvSummaryList != null)
          {
            if (scOdvSummaryList.Count > 0)
            {
              try
              {
                enumerator = scOdvSummaryList.GetEnumerator();
                while (enumerator.MoveNext())
                {
                  int orderLineId = enumerator.Current.OrderLineId;
                  scOdvSummaryList[index].OrderNotes = !IncludeNotes ? "" : this.rtnOrderLineLastCmt(orderLineId).OrderLineComment;
                  checked { ++index; }
                }
              }
              finally
              {
                enumerator.Dispose();
              }
            }
          }
        }
        se0085CtEntities1.Database.Connection.Close();
      }
      return scOdvSummaryList;
    }

    public List<scODVSummary> rtnOVDataSummaryByJob(string AssemblyLine, string JobName, int Rec2Take = 32767, int Rec2Skip = 0, bool IncludeNotes = true)
    {
      // ISSUE: object of a compiler-generated type is created
      // ISSUE: variable of a compiler-generated type
      clsEngineCTdB._Closure\u0024__6 closure6 = new clsEngineCTdB._Closure\u0024__6();
      // ISSUE: reference to a compiler-generated field
      closure6.\u0024VB\u0024Local_AssemblyLine = AssemblyLine;
      // ISSUE: reference to a compiler-generated field
      closure6.\u0024VB\u0024Local_JobName = JobName;
      List<scODVSummary> scOdvSummaryList = new List<scODVSummary>();
      int index = 0;
      using (SE0085CTEntities1 se0085CtEntities1 = new SE0085CTEntities1())
      {
        se0085CtEntities1.Database.Connection.ConnectionString = this._CTConnection;
        ParameterExpression parameterExpression1;
        ParameterExpression parameterExpression2;
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: type reference
        // ISSUE: method reference
        // ISSUE: field reference
        // ISSUE: method reference
        // ISSUE: type reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: field reference
        // ISSUE: method reference
        // ISSUE: type reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: type reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: type reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: type reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: type reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: type reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: type reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: type reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: type reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: type reference
        // ISSUE: method reference
        IQueryable<scODVSummary> source = ((IQueryable<scODVSummary>) Queryable.Select((IQueryable<M0>) Queryable.ThenBy(Queryable.ThenBy(Queryable.ThenBy(Queryable.ThenBy(Queryable.ThenBy(Queryable.OrderBy(Queryable.Where((IQueryable<M0>) Queryable.Join((IQueryable<M0>) Queryable.Join((IQueryable<M0>) Queryable.Join((IQueryable<M0>) Queryable.Join((IQueryable<M0>) se0085CtEntities1.SEOrders.Distinct<SEOrder>(), (IEnumerable<M1>) se0085CtEntities1.OrderLines.Distinct<OrderLine>(), (Expression<Func<M0, M2>>) (od => od.OrderId), (Expression<Func<M1, M2>>) (ol => ol.SEOrder.OrderId), (Expression<Func<M0, M1, M3>>) ((od, ol) => new{ od = od, ol = ol })), (IEnumerable<M1>) se0085CtEntities1.AssemblyLines, (Expression<Func<M0, M2>>) (data => data.ol.AssemblyLine.AssemLineId), (Expression<Func<M1, M2>>) (al => al.AssemLineId), (Expression<Func<M0, M1, M3>>) ((data, al) => new
        {
          \u0024VB\u0024It1 = data,
          al = al
        })), (IEnumerable<M1>) se0085CtEntities1.SEPlants, (Expression<Func<M0, M2>>) (data => data.al.SEPlant.SEPlantId), (Expression<Func<M1, M2>>) (pl => pl.SEPlantId), (Expression<Func<M0, M1, M3>>) ((data, pl) => new
        {
          \u0024VB\u0024It1 = data,
          pl = pl
        })), (IEnumerable<M1>) se0085CtEntities1.OrderLinesExts, (Expression<Func<M0, M2>>) (data => data.\u0024VB\u0024It1.\u0024VB\u0024It1.ol.OrderLineId), (Expression<Func<M1, M2>>) (oe => oe.OrderLine.OrderLineId), (Expression<Func<M0, M1, M3>>) ((data, oe) => new
        {
          od = data.\u0024VB\u0024It1.\u0024VB\u0024It1.od,
          ol = data.\u0024VB\u0024It1.\u0024VB\u0024It1.ol,
          al = data.\u0024VB\u0024It1.al,
          pl = data.pl,
          oe = oe
        })), (Expression<Func<M0, bool>>) Expression.Lambda<Func<VB\u0024AnonymousType_4<SEOrder, OrderLine, AssemblyLine, SEPlant, OrderLinesExt>, bool>>((Expression) Expression.Coalesce((Expression) Expression.And((Expression) Expression.And((Expression) Expression.And((Expression) Expression.And((Expression) Expression.Equal(\u0024VB\u0024It.ol.OrderLineShipped, (bool?) false, true, (MethodInfo) null), (Expression) Expression.Convert((Expression) Expression.Equal((Expression) Expression.Call((Expression) null, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (Microsoft.VisualBasic.CompilerServices.Operators.CompareString)), (Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression1, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_4<SEOrder, OrderLine, AssemblyLine, SEPlant, OrderLinesExt>.get_al), __typeref (VB\u0024AnonymousType_4<SEOrder, OrderLine, AssemblyLine, SEPlant, OrderLinesExt>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (AssemblyLine.get_AssemLineAbbrv))), (Expression) Expression.Field((Expression) Expression.Constant((object) closure6, typeof (clsEngineCTdB._Closure\u0024__6)), FieldInfo.GetFieldFromHandle(__fieldref (clsEngineCTdB._Closure\u0024__6.\u0024VB\u0024Local_AssemblyLine))), (Expression) Expression.Constant((object) false, typeof (bool))), (Expression) Expression.Constant((object) 0, typeof (int))), typeof (bool?))), (Expression) Expression.Convert((Expression) Expression.Call((Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression1, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_4<SEOrder, OrderLine, AssemblyLine, SEPlant, OrderLinesExt>.get_od), __typeref (VB\u0024AnonymousType_4<SEOrder, OrderLine, AssemblyLine, SEPlant, OrderLinesExt>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (SEOrder.get_OrderJobName))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (string.Contains)), new Expression[1]
        {
          (Expression) Expression.Field((Expression) Expression.Constant((object) closure6, typeof (clsEngineCTdB._Closure\u0024__6)), FieldInfo.GetFieldFromHandle(__fieldref (clsEngineCTdB._Closure\u0024__6.\u0024VB\u0024Local_JobName)))
        }), typeof (bool?))), (Expression) Expression.GreaterThan((Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression1, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_4<SEOrder, OrderLine, AssemblyLine, SEPlant, OrderLinesExt>.get_ol), __typeref (VB\u0024AnonymousType_4<SEOrder, OrderLine, AssemblyLine, SEPlant, OrderLinesExt>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (OrderLine.get_OrderLineTargetDt))), (Expression) Expression.Convert((Expression) Expression.Convert((Expression) Expression.Constant((object) "01/01/1901", typeof (string)), typeof (DateTime), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (Conversions.ToDate))), typeof (DateTime?)), true, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (DateTime.op_GreaterThan)))), (Expression) Expression.LessThan((Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression1, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_4<SEOrder, OrderLine, AssemblyLine, SEPlant, OrderLinesExt>.get_ol), __typeref (VB\u0024AnonymousType_4<SEOrder, OrderLine, AssemblyLine, SEPlant, OrderLinesExt>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (OrderLine.get_OrderLineShipDt))), (Expression) Expression.Convert((Expression) Expression.Convert((Expression) Expression.Constant((object) "12-31-2020", typeof (string)), typeof (DateTime), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (Conversions.ToDate))), typeof (DateTime?)), true, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (DateTime.op_LessThan)))), (Expression) Expression.Constant((object) false, typeof (bool))), new ParameterExpression[1]
        {
          parameterExpression1
        })), (Expression<Func<M0, M1>>) (data => data.ol.OrderLineShipDt)), (Expression<Func<M0, M1>>) (data => data.oe.OrderLineOrgShipDt)), (Expression<Func<M0, M1>>) (data => data.od.OrderFO)), (Expression<Func<M0, M1>>) (data => data.ol.OrderLineNum)), (Expression<Func<M0, M1>>) (data => data.ol.OrderLineSL)), (Expression<Func<M0, M1>>) (data => data.ol.OrderLineSS)), (Expression<Func<M0, M1>>) Expression.Lambda<Func<VB\u0024AnonymousType_4<SEOrder, OrderLine, AssemblyLine, SEPlant, OrderLinesExt>, scODVSummary>>((Expression) Expression.MemberInit(Expression.New((ConstructorInfo) MethodBase.GetMethodFromHandle(__methodref (scODVSummary.\u002Ector)), (Expression[]) null), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scODVSummary.set_OrderFO)), (Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_4<SEOrder, OrderLine, AssemblyLine, SEPlant, OrderLinesExt>.get_od), __typeref (VB\u0024AnonymousType_4<SEOrder, OrderLine, AssemblyLine, SEPlant, OrderLinesExt>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (SEOrder.get_OrderFO)))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scODVSummary.set_OrderJobName)), (Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_4<SEOrder, OrderLine, AssemblyLine, SEPlant, OrderLinesExt>.get_od), __typeref (VB\u0024AnonymousType_4<SEOrder, OrderLine, AssemblyLine, SEPlant, OrderLinesExt>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (SEOrder.get_OrderJobName)))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scODVSummary.set_OrderLineId)), (Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_4<SEOrder, OrderLine, AssemblyLine, SEPlant, OrderLinesExt>.get_ol), __typeref (VB\u0024AnonymousType_4<SEOrder, OrderLine, AssemblyLine, SEPlant, OrderLinesExt>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (OrderLine.get_OrderLineId)))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scODVSummary.set_OrderLineNum)), (Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_4<SEOrder, OrderLine, AssemblyLine, SEPlant, OrderLinesExt>.get_ol), __typeref (VB\u0024AnonymousType_4<SEOrder, OrderLine, AssemblyLine, SEPlant, OrderLinesExt>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (OrderLine.get_OrderLineNum)))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scODVSummary.set_OrderLineSL)), (Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_4<SEOrder, OrderLine, AssemblyLine, SEPlant, OrderLinesExt>.get_ol), __typeref (VB\u0024AnonymousType_4<SEOrder, OrderLine, AssemblyLine, SEPlant, OrderLinesExt>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (OrderLine.get_OrderLineSL)))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scODVSummary.set_OrderLineSS)), (Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_4<SEOrder, OrderLine, AssemblyLine, SEPlant, OrderLinesExt>.get_ol), __typeref (VB\u0024AnonymousType_4<SEOrder, OrderLine, AssemblyLine, SEPlant, OrderLinesExt>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (OrderLine.get_OrderLineSS)))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scODVSummary.set_OrderLineTargetDt)), (Expression) Expression.Convert((Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_4<SEOrder, OrderLine, AssemblyLine, SEPlant, OrderLinesExt>.get_ol), __typeref (VB\u0024AnonymousType_4<SEOrder, OrderLine, AssemblyLine, SEPlant, OrderLinesExt>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (OrderLine.get_OrderLineTargetDt))), typeof (DateTime))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scODVSummary.set_OrderLineShipDt)), (Expression) Expression.Convert((Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_4<SEOrder, OrderLine, AssemblyLine, SEPlant, OrderLinesExt>.get_ol), __typeref (VB\u0024AnonymousType_4<SEOrder, OrderLine, AssemblyLine, SEPlant, OrderLinesExt>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (OrderLine.get_OrderLineShipDt))), typeof (DateTime)))), new ParameterExpression[1]
        {
          parameterExpression2
        }))).Take<scODVSummary>(Rec2Take).Skip<scODVSummary>(Rec2Skip);
        if (source != null && source.Count<scODVSummary>() > 0)
        {
          scOdvSummaryList = source.ToList<scODVSummary>();
          List<scODVSummary>.Enumerator enumerator;
          if (scOdvSummaryList != null)
          {
            if (scOdvSummaryList.Count > 0)
            {
              try
              {
                enumerator = scOdvSummaryList.GetEnumerator();
                while (enumerator.MoveNext())
                {
                  int orderLineId = enumerator.Current.OrderLineId;
                  scOdvSummaryList[index].OrderNotes = !IncludeNotes ? "" : this.rtnOrderLineLastCmt(orderLineId).OrderLineComment;
                  checked { ++index; }
                }
              }
              finally
              {
                enumerator.Dispose();
              }
            }
          }
        }
        se0085CtEntities1.Database.Connection.Close();
      }
      return scOdvSummaryList;
    }

    public List<scOrderData> rtnOVDataAllOpen(string AssemblyLine, DateTime ShipDateStart, DateTime ShipDateEnd)
    {
      // ISSUE: object of a compiler-generated type is created
      // ISSUE: variable of a compiler-generated type
      clsEngineCTdB._Closure\u0024__7 closure7 = new clsEngineCTdB._Closure\u0024__7();
      // ISSUE: reference to a compiler-generated field
      closure7.\u0024VB\u0024Local_ShipDateEnd = ShipDateEnd;
      // ISSUE: reference to a compiler-generated field
      closure7.\u0024VB\u0024Local_AssemblyLine = AssemblyLine;
      // ISSUE: reference to a compiler-generated field
      closure7.\u0024VB\u0024Local_ShipDateStart = ShipDateStart;
      List<scOrderData> scOrderDataList = new List<scOrderData>();
      using (SE0085CTEntities1 se0085CtEntities1 = new SE0085CTEntities1())
      {
        se0085CtEntities1.Database.Connection.ConnectionString = this._CTConnection;
        ParameterExpression parameterExpression1;
        ParameterExpression parameterExpression2;
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: type reference
        // ISSUE: method reference
        // ISSUE: field reference
        // ISSUE: method reference
        // ISSUE: type reference
        // ISSUE: method reference
        // ISSUE: field reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: type reference
        // ISSUE: method reference
        // ISSUE: field reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: type reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: type reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: type reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: type reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: type reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: type reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: type reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: type reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: type reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: type reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: type reference
        // ISSUE: method reference
        IQueryable<scOrderData> source = (IQueryable<scOrderData>) Queryable.Select((IQueryable<M0>) Queryable.ThenBy(Queryable.ThenBy(Queryable.ThenBy(Queryable.ThenBy(Queryable.OrderBy(Queryable.Where((IQueryable<M0>) Queryable.Join((IQueryable<M0>) Queryable.Join((IQueryable<M0>) Queryable.Join((IQueryable<M0>) se0085CtEntities1.SEOrders.Distinct<SEOrder>(), (IEnumerable<M1>) se0085CtEntities1.OrderLines.Distinct<OrderLine>(), (Expression<Func<M0, M2>>) (od => od.OrderId), (Expression<Func<M1, M2>>) (ol => ol.SEOrder.OrderId), (Expression<Func<M0, M1, M3>>) ((od, ol) => new{ od = od, ol = ol })), (IEnumerable<M1>) se0085CtEntities1.AssemblyLines, (Expression<Func<M0, M2>>) (data => data.ol.AssemblyLine.AssemLineId), (Expression<Func<M1, M2>>) (al => al.AssemLineId), (Expression<Func<M0, M1, M3>>) ((data, al) => new
        {
          \u0024VB\u0024It1 = data,
          al = al
        })), (IEnumerable<M1>) se0085CtEntities1.SEPlants, (Expression<Func<M0, M2>>) (data => data.al.SEPlant.SEPlantId), (Expression<Func<M1, M2>>) (pl => pl.SEPlantId), (Expression<Func<M0, M1, M3>>) ((data, pl) => new
        {
          od = data.\u0024VB\u0024It1.od,
          ol = data.\u0024VB\u0024It1.ol,
          al = data.al,
          pl = pl
        })), (Expression<Func<M0, bool>>) Expression.Lambda<Func<VB\u0024AnonymousType_2<SEOrder, OrderLine, AssemblyLine, SEPlant>, bool>>((Expression) Expression.Coalesce((Expression) Expression.And((Expression) Expression.And((Expression) Expression.And((Expression) Expression.Equal(\u0024VB\u0024It.ol.OrderLineShipped, (bool?) false, true, (MethodInfo) null), (Expression) Expression.Convert((Expression) Expression.Equal((Expression) Expression.Call((Expression) null, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (Microsoft.VisualBasic.CompilerServices.Operators.CompareString)), (Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression1, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_2<SEOrder, OrderLine, AssemblyLine, SEPlant>.get_al), __typeref (VB\u0024AnonymousType_2<SEOrder, OrderLine, AssemblyLine, SEPlant>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (AssemblyLine.get_AssemLineAbbrv))), (Expression) Expression.Field((Expression) Expression.Constant((object) closure7, typeof (clsEngineCTdB._Closure\u0024__7)), FieldInfo.GetFieldFromHandle(__fieldref (clsEngineCTdB._Closure\u0024__7.\u0024VB\u0024Local_AssemblyLine))), (Expression) Expression.Constant((object) false, typeof (bool))), (Expression) Expression.Constant((object) 0, typeof (int))), typeof (bool?))), (Expression) Expression.GreaterThanOrEqual((Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression1, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_2<SEOrder, OrderLine, AssemblyLine, SEPlant>.get_ol), __typeref (VB\u0024AnonymousType_2<SEOrder, OrderLine, AssemblyLine, SEPlant>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (OrderLine.get_OrderLineShipDt))), (Expression) Expression.Convert((Expression) Expression.Field((Expression) Expression.Constant((object) closure7, typeof (clsEngineCTdB._Closure\u0024__7)), FieldInfo.GetFieldFromHandle(__fieldref (clsEngineCTdB._Closure\u0024__7.\u0024VB\u0024Local_ShipDateStart))), typeof (DateTime?)), true, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (DateTime.op_GreaterThanOrEqual)))), (Expression) Expression.LessThanOrEqual((Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression1, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_2<SEOrder, OrderLine, AssemblyLine, SEPlant>.get_ol), __typeref (VB\u0024AnonymousType_2<SEOrder, OrderLine, AssemblyLine, SEPlant>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (OrderLine.get_OrderLineShipDt))), (Expression) Expression.Convert((Expression) Expression.Field((Expression) Expression.Constant((object) closure7, typeof (clsEngineCTdB._Closure\u0024__7)), FieldInfo.GetFieldFromHandle(__fieldref (clsEngineCTdB._Closure\u0024__7.\u0024VB\u0024Local_ShipDateEnd))), typeof (DateTime?)), true, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (DateTime.op_LessThanOrEqual)))), (Expression) Expression.Constant((object) false, typeof (bool))), new ParameterExpression[1]
        {
          parameterExpression1
        })), (Expression<Func<M0, M1>>) (data => data.ol.OrderLineShipDt)), (Expression<Func<M0, M1>>) (data => data.od.OrderFO)), (Expression<Func<M0, M1>>) (data => data.ol.OrderLineNum)), (Expression<Func<M0, M1>>) (data => data.ol.OrderLineSL)), (Expression<Func<M0, M1>>) (data => data.ol.OrderLineSS)), (Expression<Func<M0, M1>>) Expression.Lambda<Func<VB\u0024AnonymousType_2<SEOrder, OrderLine, AssemblyLine, SEPlant>, scOrderData>>((Expression) Expression.MemberInit(Expression.New((ConstructorInfo) MethodBase.GetMethodFromHandle(__methodref (scOrderData.\u002Ector)), (Expression[]) null), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scOrderData.set_AssemblyLineId)), (Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_2<SEOrder, OrderLine, AssemblyLine, SEPlant>.get_al), __typeref (VB\u0024AnonymousType_2<SEOrder, OrderLine, AssemblyLine, SEPlant>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (AssemblyLine.get_AssemLineId)))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scOrderData.set_AssemLineAbbrv)), (Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_2<SEOrder, OrderLine, AssemblyLine, SEPlant>.get_al), __typeref (VB\u0024AnonymousType_2<SEOrder, OrderLine, AssemblyLine, SEPlant>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (AssemblyLine.get_AssemLineAbbrv)))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scOrderData.set_OrderId)), (Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_2<SEOrder, OrderLine, AssemblyLine, SEPlant>.get_od), __typeref (VB\u0024AnonymousType_2<SEOrder, OrderLine, AssemblyLine, SEPlant>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (SEOrder.get_OrderId)))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scOrderData.set_OrderFO)), (Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_2<SEOrder, OrderLine, AssemblyLine, SEPlant>.get_od), __typeref (VB\u0024AnonymousType_2<SEOrder, OrderLine, AssemblyLine, SEPlant>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (SEOrder.get_OrderFO)))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scOrderData.set_OrderJobName)), (Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_2<SEOrder, OrderLine, AssemblyLine, SEPlant>.get_od), __typeref (VB\u0024AnonymousType_2<SEOrder, OrderLine, AssemblyLine, SEPlant>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (SEOrder.get_OrderJobName)))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scOrderData.set_OrderLineId)), (Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_2<SEOrder, OrderLine, AssemblyLine, SEPlant>.get_ol), __typeref (VB\u0024AnonymousType_2<SEOrder, OrderLine, AssemblyLine, SEPlant>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (OrderLine.get_OrderLineId)))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scOrderData.set_OrderLineNum)), (Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_2<SEOrder, OrderLine, AssemblyLine, SEPlant>.get_ol), __typeref (VB\u0024AnonymousType_2<SEOrder, OrderLine, AssemblyLine, SEPlant>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (OrderLine.get_OrderLineNum)))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scOrderData.set_OrderLineSL)), (Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_2<SEOrder, OrderLine, AssemblyLine, SEPlant>.get_ol), __typeref (VB\u0024AnonymousType_2<SEOrder, OrderLine, AssemblyLine, SEPlant>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (OrderLine.get_OrderLineSL)))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scOrderData.set_OrderLineSS)), (Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_2<SEOrder, OrderLine, AssemblyLine, SEPlant>.get_ol), __typeref (VB\u0024AnonymousType_2<SEOrder, OrderLine, AssemblyLine, SEPlant>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (OrderLine.get_OrderLineSS)))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scOrderData.set_OrderLineShipDt)), (Expression) Expression.Convert((Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_2<SEOrder, OrderLine, AssemblyLine, SEPlant>.get_ol), __typeref (VB\u0024AnonymousType_2<SEOrder, OrderLine, AssemblyLine, SEPlant>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (OrderLine.get_OrderLineShipDt))), typeof (DateTime))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scOrderData.set_OrderLineAssyStartDt)), (Expression) Expression.Convert((Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_2<SEOrder, OrderLine, AssemblyLine, SEPlant>.get_ol), __typeref (VB\u0024AnonymousType_2<SEOrder, OrderLine, AssemblyLine, SEPlant>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (OrderLine.get_OrderLineAssyStartDt))), typeof (DateTime)))), new ParameterExpression[1]
        {
          parameterExpression2
        }));
        if (source != null && source.Count<scOrderData>() > 0)
          scOrderDataList = source.ToList<scOrderData>();
        se0085CtEntities1.Database.Connection.Close();
      }
      return scOrderDataList;
    }

    public List<scODVSummary> rtnOVDataShipped(DateTime DateStart, DateTime DateEnd)
    {
      // ISSUE: object of a compiler-generated type is created
      // ISSUE: variable of a compiler-generated type
      clsEngineCTdB._Closure\u0024__8 closure8 = new clsEngineCTdB._Closure\u0024__8();
      // ISSUE: reference to a compiler-generated field
      closure8.\u0024VB\u0024Local_DateStart = DateStart;
      // ISSUE: reference to a compiler-generated field
      closure8.\u0024VB\u0024Local_DateEnd = DateEnd;
      List<scODVSummary> scOdvSummaryList = new List<scODVSummary>();
      int index = 0;
      using (SE0085CTEntities1 se0085CtEntities1 = new SE0085CTEntities1())
      {
        se0085CtEntities1.Database.Connection.ConnectionString = this._CTConnection;
        ParameterExpression parameterExpression1;
        ParameterExpression parameterExpression2;
        // ISSUE: method reference
        // ISSUE: type reference
        // ISSUE: method reference
        // ISSUE: field reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: type reference
        // ISSUE: method reference
        // ISSUE: field reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: type reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: type reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: type reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: type reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: type reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: type reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: type reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: type reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: type reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: type reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: type reference
        // ISSUE: method reference
        IQueryable<scODVSummary> source = (IQueryable<scODVSummary>) Queryable.Select((IQueryable<M0>) Queryable.ThenBy(Queryable.ThenBy(Queryable.ThenBy(Queryable.ThenBy(Queryable.ThenBy(Queryable.OrderBy(Queryable.Where((IQueryable<M0>) Queryable.Join((IQueryable<M0>) Queryable.Join((IQueryable<M0>) Queryable.Join((IQueryable<M0>) Queryable.Join((IQueryable<M0>) se0085CtEntities1.SEOrders.Distinct<SEOrder>(), (IEnumerable<M1>) se0085CtEntities1.OrderLines.Distinct<OrderLine>(), (Expression<Func<M0, M2>>) (od => od.OrderId), (Expression<Func<M1, M2>>) (ol => ol.SEOrder.OrderId), (Expression<Func<M0, M1, M3>>) ((od, ol) => new{ od = od, ol = ol })), (IEnumerable<M1>) se0085CtEntities1.AssemblyLines, (Expression<Func<M0, M2>>) (data => data.ol.AssemblyLine.AssemLineId), (Expression<Func<M1, M2>>) (al => al.AssemLineId), (Expression<Func<M0, M1, M3>>) ((data, al) => new
        {
          \u0024VB\u0024It1 = data,
          al = al
        })), (IEnumerable<M1>) se0085CtEntities1.SEPlants, (Expression<Func<M0, M2>>) (data => data.al.SEPlant.SEPlantId), (Expression<Func<M1, M2>>) (pl => pl.SEPlantId), (Expression<Func<M0, M1, M3>>) ((data, pl) => new
        {
          \u0024VB\u0024It1 = data,
          pl = pl
        })), (IEnumerable<M1>) se0085CtEntities1.OrderLinesExts, (Expression<Func<M0, M2>>) (data => data.\u0024VB\u0024It1.\u0024VB\u0024It1.ol.OrderLineId), (Expression<Func<M1, M2>>) (oe => oe.OrderLine.OrderLineId), (Expression<Func<M0, M1, M3>>) ((data, oe) => new
        {
          od = data.\u0024VB\u0024It1.\u0024VB\u0024It1.od,
          ol = data.\u0024VB\u0024It1.\u0024VB\u0024It1.ol,
          al = data.\u0024VB\u0024It1.al,
          pl = data.pl,
          oe = oe
        })), (Expression<Func<M0, bool>>) Expression.Lambda<Func<VB\u0024AnonymousType_4<SEOrder, OrderLine, AssemblyLine, SEPlant, OrderLinesExt>, bool>>((Expression) Expression.Coalesce((Expression) Expression.And((Expression) Expression.And((Expression) Expression.And((Expression) Expression.Equal(\u0024VB\u0024It.ol.OrderLineShipped, (bool?) true, true, (MethodInfo) null), (Expression) Expression.GreaterThanOrEqual((Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression1, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_4<SEOrder, OrderLine, AssemblyLine, SEPlant, OrderLinesExt>.get_ol), __typeref (VB\u0024AnonymousType_4<SEOrder, OrderLine, AssemblyLine, SEPlant, OrderLinesExt>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (OrderLine.get_OrderLineShippedDt))), (Expression) Expression.Convert((Expression) Expression.Field((Expression) Expression.Constant((object) closure8, typeof (clsEngineCTdB._Closure\u0024__8)), FieldInfo.GetFieldFromHandle(__fieldref (clsEngineCTdB._Closure\u0024__8.\u0024VB\u0024Local_DateStart))), typeof (DateTime?)), true, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (DateTime.op_GreaterThanOrEqual)))), (Expression) Expression.LessThanOrEqual((Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression1, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_4<SEOrder, OrderLine, AssemblyLine, SEPlant, OrderLinesExt>.get_ol), __typeref (VB\u0024AnonymousType_4<SEOrder, OrderLine, AssemblyLine, SEPlant, OrderLinesExt>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (OrderLine.get_OrderLineShippedDt))), (Expression) Expression.Convert((Expression) Expression.Field((Expression) Expression.Constant((object) closure8, typeof (clsEngineCTdB._Closure\u0024__8)), FieldInfo.GetFieldFromHandle(__fieldref (clsEngineCTdB._Closure\u0024__8.\u0024VB\u0024Local_DateEnd))), typeof (DateTime?)), true, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (DateTime.op_LessThanOrEqual)))), (Expression) Expression.LessThan((Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression1, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_4<SEOrder, OrderLine, AssemblyLine, SEPlant, OrderLinesExt>.get_ol), __typeref (VB\u0024AnonymousType_4<SEOrder, OrderLine, AssemblyLine, SEPlant, OrderLinesExt>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (OrderLine.get_OrderLineShipDt))), (Expression) Expression.Convert((Expression) Expression.Convert((Expression) Expression.Constant((object) "12-31-2020", typeof (string)), typeof (DateTime), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (Conversions.ToDate))), typeof (DateTime?)), true, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (DateTime.op_LessThan)))), (Expression) Expression.Constant((object) false, typeof (bool))), new ParameterExpression[1]
        {
          parameterExpression1
        })), (Expression<Func<M0, M1>>) (data => data.ol.AssemblyLine.AssemLineId)), (Expression<Func<M0, M1>>) (data => data.ol.OrderLineShippedDt)), (Expression<Func<M0, M1>>) (data => data.od.OrderFO)), (Expression<Func<M0, M1>>) (data => data.ol.OrderLineNum)), (Expression<Func<M0, M1>>) (data => data.ol.OrderLineSL)), (Expression<Func<M0, M1>>) (data => data.ol.OrderLineSS)), (Expression<Func<M0, M1>>) Expression.Lambda<Func<VB\u0024AnonymousType_4<SEOrder, OrderLine, AssemblyLine, SEPlant, OrderLinesExt>, scODVSummary>>((Expression) Expression.MemberInit(Expression.New((ConstructorInfo) MethodBase.GetMethodFromHandle(__methodref (scODVSummary.\u002Ector)), (Expression[]) null), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scODVSummary.set_AssemLineAbbrv)), (Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_4<SEOrder, OrderLine, AssemblyLine, SEPlant, OrderLinesExt>.get_al), __typeref (VB\u0024AnonymousType_4<SEOrder, OrderLine, AssemblyLine, SEPlant, OrderLinesExt>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (AssemblyLine.get_AssemLineAbbrv)))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scODVSummary.set_OrderFO)), (Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_4<SEOrder, OrderLine, AssemblyLine, SEPlant, OrderLinesExt>.get_od), __typeref (VB\u0024AnonymousType_4<SEOrder, OrderLine, AssemblyLine, SEPlant, OrderLinesExt>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (SEOrder.get_OrderFO)))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scODVSummary.set_OrderJobName)), (Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_4<SEOrder, OrderLine, AssemblyLine, SEPlant, OrderLinesExt>.get_od), __typeref (VB\u0024AnonymousType_4<SEOrder, OrderLine, AssemblyLine, SEPlant, OrderLinesExt>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (SEOrder.get_OrderJobName)))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scODVSummary.set_OrderLineId)), (Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_4<SEOrder, OrderLine, AssemblyLine, SEPlant, OrderLinesExt>.get_ol), __typeref (VB\u0024AnonymousType_4<SEOrder, OrderLine, AssemblyLine, SEPlant, OrderLinesExt>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (OrderLine.get_OrderLineId)))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scODVSummary.set_OrderLineNum)), (Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_4<SEOrder, OrderLine, AssemblyLine, SEPlant, OrderLinesExt>.get_ol), __typeref (VB\u0024AnonymousType_4<SEOrder, OrderLine, AssemblyLine, SEPlant, OrderLinesExt>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (OrderLine.get_OrderLineNum)))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scODVSummary.set_OrderLineSL)), (Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_4<SEOrder, OrderLine, AssemblyLine, SEPlant, OrderLinesExt>.get_ol), __typeref (VB\u0024AnonymousType_4<SEOrder, OrderLine, AssemblyLine, SEPlant, OrderLinesExt>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (OrderLine.get_OrderLineSL)))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scODVSummary.set_OrderLineSS)), (Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_4<SEOrder, OrderLine, AssemblyLine, SEPlant, OrderLinesExt>.get_ol), __typeref (VB\u0024AnonymousType_4<SEOrder, OrderLine, AssemblyLine, SEPlant, OrderLinesExt>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (OrderLine.get_OrderLineSS)))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scODVSummary.set_OrderLineTargetDt)), (Expression) Expression.Convert((Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_4<SEOrder, OrderLine, AssemblyLine, SEPlant, OrderLinesExt>.get_ol), __typeref (VB\u0024AnonymousType_4<SEOrder, OrderLine, AssemblyLine, SEPlant, OrderLinesExt>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (OrderLine.get_OrderLineTargetDt))), typeof (DateTime))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scODVSummary.set_OrderLineShipDt)), (Expression) Expression.Convert((Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_4<SEOrder, OrderLine, AssemblyLine, SEPlant, OrderLinesExt>.get_ol), __typeref (VB\u0024AnonymousType_4<SEOrder, OrderLine, AssemblyLine, SEPlant, OrderLinesExt>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (OrderLine.get_OrderLineShipDt))), typeof (DateTime))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scODVSummary.set_OrderLineShippedDt)), (Expression) Expression.Convert((Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_4<SEOrder, OrderLine, AssemblyLine, SEPlant, OrderLinesExt>.get_ol), __typeref (VB\u0024AnonymousType_4<SEOrder, OrderLine, AssemblyLine, SEPlant, OrderLinesExt>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (OrderLine.get_OrderLineShippedDt))), typeof (DateTime)))), new ParameterExpression[1]
        {
          parameterExpression2
        }));
        if (source != null && source.Count<scODVSummary>() > 0)
        {
          scOdvSummaryList = source.ToList<scODVSummary>();
          List<scODVSummary>.Enumerator enumerator;
          if (scOdvSummaryList != null)
          {
            if (scOdvSummaryList.Count > 0)
            {
              try
              {
                enumerator = scOdvSummaryList.GetEnumerator();
                while (enumerator.MoveNext())
                {
                  int orderLineId = enumerator.Current.OrderLineId;
                  scOdvSummaryList[index].OrderNotes = this.rtnOrderLineLastCmt(orderLineId).OrderLineComment;
                  checked { ++index; }
                }
              }
              finally
              {
                enumerator.Dispose();
              }
            }
          }
        }
        se0085CtEntities1.Database.Connection.Close();
      }
      return scOdvSummaryList;
    }

    public List<scODVSummary> rtnOVDataOnHold()
    {
      List<scODVSummary> scOdvSummaryList = new List<scODVSummary>();
      int index = 0;
      using (SE0085CTEntities1 se0085CtEntities1 = new SE0085CTEntities1())
      {
        se0085CtEntities1.Database.Connection.ConnectionString = this._CTConnection;
        ParameterExpression parameterExpression1;
        ParameterExpression parameterExpression2;
        // ISSUE: method reference
        // ISSUE: type reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: type reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: type reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: type reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: type reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: type reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: type reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: type reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: type reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: type reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: type reference
        // ISSUE: method reference
        IQueryable<scODVSummary> source = (IQueryable<scODVSummary>) Queryable.Select((IQueryable<M0>) Queryable.ThenBy(Queryable.ThenBy(Queryable.ThenBy(Queryable.ThenBy(Queryable.ThenBy(Queryable.OrderBy(Queryable.Where((IQueryable<M0>) Queryable.Join((IQueryable<M0>) Queryable.Join((IQueryable<M0>) Queryable.Join((IQueryable<M0>) Queryable.Join((IQueryable<M0>) se0085CtEntities1.SEOrders.Distinct<SEOrder>(), (IEnumerable<M1>) se0085CtEntities1.OrderLines.Distinct<OrderLine>(), (Expression<Func<M0, M2>>) (od => od.OrderId), (Expression<Func<M1, M2>>) (ol => ol.SEOrder.OrderId), (Expression<Func<M0, M1, M3>>) ((od, ol) => new{ od = od, ol = ol })), (IEnumerable<M1>) se0085CtEntities1.AssemblyLines, (Expression<Func<M0, M2>>) (data => data.ol.AssemblyLine.AssemLineId), (Expression<Func<M1, M2>>) (al => al.AssemLineId), (Expression<Func<M0, M1, M3>>) ((data, al) => new
        {
          \u0024VB\u0024It1 = data,
          al = al
        })), (IEnumerable<M1>) se0085CtEntities1.SEPlants, (Expression<Func<M0, M2>>) (data => data.al.SEPlant.SEPlantId), (Expression<Func<M1, M2>>) (pl => pl.SEPlantId), (Expression<Func<M0, M1, M3>>) ((data, pl) => new
        {
          \u0024VB\u0024It1 = data,
          pl = pl
        })), (IEnumerable<M1>) se0085CtEntities1.OrderLinesExts, (Expression<Func<M0, M2>>) (data => data.\u0024VB\u0024It1.\u0024VB\u0024It1.ol.OrderLineId), (Expression<Func<M1, M2>>) (oe => oe.OrderLine.OrderLineId), (Expression<Func<M0, M1, M3>>) ((data, oe) => new
        {
          od = data.\u0024VB\u0024It1.\u0024VB\u0024It1.od,
          ol = data.\u0024VB\u0024It1.\u0024VB\u0024It1.ol,
          al = data.\u0024VB\u0024It1.al,
          pl = data.pl,
          oe = oe
        })), (Expression<Func<M0, bool>>) Expression.Lambda<Func<VB\u0024AnonymousType_4<SEOrder, OrderLine, AssemblyLine, SEPlant, OrderLinesExt>, bool>>((Expression) Expression.Coalesce((Expression) Expression.And((Expression) Expression.Equal(\u0024VB\u0024It.ol.OrderLineShipped, (bool?) false, true, (MethodInfo) null), (Expression) Expression.GreaterThan((Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression1, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_4<SEOrder, OrderLine, AssemblyLine, SEPlant, OrderLinesExt>.get_ol), __typeref (VB\u0024AnonymousType_4<SEOrder, OrderLine, AssemblyLine, SEPlant, OrderLinesExt>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (OrderLine.get_OrderLineShipDt))), (Expression) Expression.Convert((Expression) Expression.Convert((Expression) Expression.Constant((object) "12-31-2020", typeof (string)), typeof (DateTime), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (Conversions.ToDate))), typeof (DateTime?)), true, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (DateTime.op_GreaterThan)))), (Expression) Expression.Constant((object) false, typeof (bool))), new ParameterExpression[1]
        {
          parameterExpression1
        })), (Expression<Func<M0, M1>>) (data => data.ol.AssemblyLine.AssemLineId)), (Expression<Func<M0, M1>>) (data => data.od.OrderJobName)), (Expression<Func<M0, M1>>) (data => data.od.OrderFO)), (Expression<Func<M0, M1>>) (data => data.ol.OrderLineNum)), (Expression<Func<M0, M1>>) (data => data.ol.OrderLineSL)), (Expression<Func<M0, M1>>) (data => data.ol.OrderLineSS)), (Expression<Func<M0, M1>>) Expression.Lambda<Func<VB\u0024AnonymousType_4<SEOrder, OrderLine, AssemblyLine, SEPlant, OrderLinesExt>, scODVSummary>>((Expression) Expression.MemberInit(Expression.New((ConstructorInfo) MethodBase.GetMethodFromHandle(__methodref (scODVSummary.\u002Ector)), (Expression[]) null), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scODVSummary.set_AssemLineAbbrv)), (Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_4<SEOrder, OrderLine, AssemblyLine, SEPlant, OrderLinesExt>.get_al), __typeref (VB\u0024AnonymousType_4<SEOrder, OrderLine, AssemblyLine, SEPlant, OrderLinesExt>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (AssemblyLine.get_AssemLineAbbrv)))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scODVSummary.set_OrderFO)), (Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_4<SEOrder, OrderLine, AssemblyLine, SEPlant, OrderLinesExt>.get_od), __typeref (VB\u0024AnonymousType_4<SEOrder, OrderLine, AssemblyLine, SEPlant, OrderLinesExt>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (SEOrder.get_OrderFO)))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scODVSummary.set_OrderJobName)), (Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_4<SEOrder, OrderLine, AssemblyLine, SEPlant, OrderLinesExt>.get_od), __typeref (VB\u0024AnonymousType_4<SEOrder, OrderLine, AssemblyLine, SEPlant, OrderLinesExt>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (SEOrder.get_OrderJobName)))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scODVSummary.set_OrderLineId)), (Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_4<SEOrder, OrderLine, AssemblyLine, SEPlant, OrderLinesExt>.get_ol), __typeref (VB\u0024AnonymousType_4<SEOrder, OrderLine, AssemblyLine, SEPlant, OrderLinesExt>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (OrderLine.get_OrderLineId)))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scODVSummary.set_OrderLineNum)), (Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_4<SEOrder, OrderLine, AssemblyLine, SEPlant, OrderLinesExt>.get_ol), __typeref (VB\u0024AnonymousType_4<SEOrder, OrderLine, AssemblyLine, SEPlant, OrderLinesExt>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (OrderLine.get_OrderLineNum)))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scODVSummary.set_OrderLineSL)), (Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_4<SEOrder, OrderLine, AssemblyLine, SEPlant, OrderLinesExt>.get_ol), __typeref (VB\u0024AnonymousType_4<SEOrder, OrderLine, AssemblyLine, SEPlant, OrderLinesExt>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (OrderLine.get_OrderLineSL)))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scODVSummary.set_OrderLineSS)), (Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_4<SEOrder, OrderLine, AssemblyLine, SEPlant, OrderLinesExt>.get_ol), __typeref (VB\u0024AnonymousType_4<SEOrder, OrderLine, AssemblyLine, SEPlant, OrderLinesExt>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (OrderLine.get_OrderLineSS)))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scODVSummary.set_OrderLineTargetDt)), (Expression) Expression.Convert((Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_4<SEOrder, OrderLine, AssemblyLine, SEPlant, OrderLinesExt>.get_ol), __typeref (VB\u0024AnonymousType_4<SEOrder, OrderLine, AssemblyLine, SEPlant, OrderLinesExt>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (OrderLine.get_OrderLineTargetDt))), typeof (DateTime))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scODVSummary.set_OrderLineShipDt)), (Expression) Expression.Convert((Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_4<SEOrder, OrderLine, AssemblyLine, SEPlant, OrderLinesExt>.get_ol), __typeref (VB\u0024AnonymousType_4<SEOrder, OrderLine, AssemblyLine, SEPlant, OrderLinesExt>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (OrderLine.get_OrderLineShipDt))), typeof (DateTime))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scODVSummary.set_OrderLineShippedDt)), (Expression) Expression.Convert((Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_4<SEOrder, OrderLine, AssemblyLine, SEPlant, OrderLinesExt>.get_ol), __typeref (VB\u0024AnonymousType_4<SEOrder, OrderLine, AssemblyLine, SEPlant, OrderLinesExt>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (OrderLine.get_OrderLineShippedDt))), typeof (DateTime)))), new ParameterExpression[1]
        {
          parameterExpression2
        }));
        if (source != null && source.Count<scODVSummary>() > 0)
        {
          scOdvSummaryList = source.ToList<scODVSummary>();
          List<scODVSummary>.Enumerator enumerator;
          if (scOdvSummaryList != null)
          {
            if (scOdvSummaryList.Count > 0)
            {
              try
              {
                enumerator = scOdvSummaryList.GetEnumerator();
                while (enumerator.MoveNext())
                {
                  int orderLineId = enumerator.Current.OrderLineId;
                  scOdvSummaryList[index].OrderNotes = this.rtnOrderLineLastCmt(orderLineId).OrderLineComment;
                  checked { ++index; }
                }
              }
              finally
              {
                enumerator.Dispose();
              }
            }
          }
        }
        se0085CtEntities1.Database.Connection.Close();
      }
      return scOdvSummaryList;
    }

    public scOrderLinesExt rtnOrderLineExtById(int OrderLineId)
    {
      // ISSUE: object of a compiler-generated type is created
      // ISSUE: variable of a compiler-generated type
      clsEngineCTdB._Closure\u0024__9 closure9 = new clsEngineCTdB._Closure\u0024__9();
      // ISSUE: reference to a compiler-generated field
      closure9.\u0024VB\u0024Local_OrderLineId = OrderLineId;
      scOrderLinesExt scOrderLinesExt = new scOrderLinesExt();
      // ISSUE: reference to a compiler-generated field
      if (closure9.\u0024VB\u0024Local_OrderLineId > 0)
      {
        using (SE0085CTEntities1 se0085CtEntities1 = new SE0085CTEntities1())
        {
          se0085CtEntities1.Database.Connection.ConnectionString = this._CTConnection;
          ParameterExpression parameterExpression1;
          ParameterExpression parameterExpression2;
          // ISSUE: reference to a compiler-generated field
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: method reference
          IQueryable<scOrderLinesExt> source = (IQueryable<scOrderLinesExt>) Queryable.Select<OrderLinesExt, scOrderLinesExt>(Queryable.Where<OrderLinesExt>((IQueryable<M0>) se0085CtEntities1.OrderLinesExts, (Expression<Func<M0, bool>>) Expression.Lambda<Func<OrderLinesExt, bool>>((Expression) Expression.Equal(ol.OrderLine.OrderLineId, closure9.\u0024VB\u0024Local_OrderLineId, true, (MethodInfo) null), new ParameterExpression[1]
          {
            parameterExpression1
          })), (Expression<Func<M0, M1>>) Expression.Lambda<Func<OrderLinesExt, scOrderLinesExt>>((Expression) Expression.MemberInit(Expression.New((ConstructorInfo) MethodBase.GetMethodFromHandle(__methodref (scOrderLinesExt.\u002Ector)), (Expression[]) null), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scOrderLinesExt.set_OrderLineExtId)), (Expression) Expression.Property((Expression) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (OrderLinesExt.get_OrderLineExtId)))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scOrderLinesExt.set_OrderLineId)), (Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (OrderLinesExt.get_OrderLine))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (OrderLine.get_OrderLineId)))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scOrderLinesExt.set_OrderLineSER)), (Expression) Expression.Property((Expression) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (OrderLinesExt.get_OrderLineSER)))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scOrderLinesExt.set_OrderLineBook)), (Expression) Expression.Convert((Expression) Expression.Property((Expression) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (OrderLinesExt.get_OrderLineBook))), typeof (Decimal))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scOrderLinesExt.set_OrderLineNet)), (Expression) Expression.Convert((Expression) Expression.Property((Expression) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (OrderLinesExt.get_OrderLineNet))), typeof (Decimal))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scOrderLinesExt.set_OrderLineOrgTargetDt)), (Expression) Expression.Convert((Expression) Expression.Property((Expression) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (OrderLinesExt.get_OrderLineOrgTargetDt))), typeof (DateTime))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scOrderLinesExt.set_OrderLineOrgShipDt)), (Expression) Expression.Convert((Expression) Expression.Property((Expression) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (OrderLinesExt.get_OrderLineOrgShipDt))), typeof (DateTime))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scOrderLinesExt.set_OrderLineOrgAssyStDt)), (Expression) Expression.Convert((Expression) Expression.Property((Expression) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (OrderLinesExt.get_OrderLineOrgAssyStDt))), typeof (DateTime))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scOrderLinesExt.set_OrderLineCurAssyStDt)), (Expression) Expression.Convert((Expression) Expression.Property((Expression) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (OrderLinesExt.get_OrderLineCurAssyStDt))), typeof (DateTime))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scOrderLinesExt.set_OrderLineActAssyStDt)), (Expression) Expression.Convert((Expression) Expression.Property((Expression) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (OrderLinesExt.get_OrderLineActAssyStDt))), typeof (DateTime))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scOrderLinesExt.set_OrderLineOrgEngrRelDt)), (Expression) Expression.Convert((Expression) Expression.Property((Expression) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (OrderLinesExt.get_OrderLineOrgEngrRelDt))), typeof (DateTime))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scOrderLinesExt.set_OrderLineCurEngrRelDt)), (Expression) Expression.Convert((Expression) Expression.Property((Expression) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (OrderLinesExt.get_OrderLineCurEngrRelDt))), typeof (DateTime))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scOrderLinesExt.set_OrderLineActEngrRelDt)), (Expression) Expression.Convert((Expression) Expression.Property((Expression) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (OrderLinesExt.get_OrderLineActEngrRelDt))), typeof (DateTime))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scOrderLinesExt.set_OrderLineNB4Dt)), (Expression) Expression.Convert((Expression) Expression.Property((Expression) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (OrderLinesExt.get_OrderLineNB4Dt))), typeof (DateTime))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scOrderLinesExt.set_OrderLineEngrGrp)), (Expression) Expression.Property((Expression) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (OrderLinesExt.get_OrderLineEngrGrp)))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scOrderLinesExt.set_OrderLineMechClpx)), (Expression) Expression.Property((Expression) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (OrderLinesExt.get_OrderLineMechClpx)))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scOrderLinesExt.set_OrderLineElecClpx)), (Expression) Expression.Property((Expression) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (OrderLinesExt.get_OrderLineElecClpx)))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scOrderLinesExt.set_OrderLineEngComposite)), (Expression) Expression.ConvertChecked((Expression) Expression.Property((Expression) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (OrderLinesExt.get_OrderLineEngComposite))), typeof (long))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scOrderLinesExt.set_OrderLinePeltCode)), (Expression) Expression.Property((Expression) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (OrderLinesExt.get_OrderLinePeltCode))))), new ParameterExpression[1]
          {
            parameterExpression2
          }));
          if (source != null && source.Count<scOrderLinesExt>() > 0)
          {
            scOrderLinesExt = source.First<scOrderLinesExt>();
            scOrderLinesExt.OrderLineOE = this.rtnOrderLineAssocAssign(scOrderLinesExt.OrderLineId, emOLAssignType.OrderEngr);
            scOrderLinesExt.OrderLineME = this.rtnOrderLineAssocAssign(scOrderLinesExt.OrderLineId, emOLAssignType.MechEngr);
            scOrderLinesExt.OrderComments = this.rtnOrderLineComments(scOrderLinesExt.OrderLineId);
            scOrderLinesExt.OrderStatus = this.rtnOrderLineStatus(scOrderLinesExt.OrderLineId, 0);
          }
          se0085CtEntities1.Database.Connection.Close();
        }
      }
      return scOrderLinesExt;
    }

    public List<scOrderLineComment> rtnOrderLineComments(int OrderLineId)
    {
      // ISSUE: object of a compiler-generated type is created
      // ISSUE: variable of a compiler-generated type
      clsEngineCTdB._Closure\u0024__10 closure10 = new clsEngineCTdB._Closure\u0024__10();
      // ISSUE: reference to a compiler-generated field
      closure10.\u0024VB\u0024Local_OrderLineId = OrderLineId;
      List<scOrderLineComment> orderLineCommentList = new List<scOrderLineComment>();
      // ISSUE: reference to a compiler-generated field
      if (closure10.\u0024VB\u0024Local_OrderLineId > 0)
      {
        using (SE0085CTEntities1 se0085CtEntities1 = new SE0085CTEntities1())
        {
          se0085CtEntities1.Database.Connection.ConnectionString = this._CTConnection;
          ParameterExpression parameterExpression1;
          ParameterExpression parameterExpression2;
          // ISSUE: reference to a compiler-generated field
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: method reference
          IQueryable<scOrderLineComment> source = (IQueryable<scOrderLineComment>) Queryable.Select<OrderLineComment, scOrderLineComment>((IQueryable<M0>) Queryable.OrderByDescending<OrderLineComment, DateTime?>(Queryable.Where<OrderLineComment>((IQueryable<M0>) se0085CtEntities1.OrderLineComments, (Expression<Func<M0, bool>>) Expression.Lambda<Func<OrderLineComment, bool>>((Expression) Expression.Equal(lc.OrderLine.OrderLineId, closure10.\u0024VB\u0024Local_OrderLineId, true, (MethodInfo) null), new ParameterExpression[1]
          {
            parameterExpression1
          })), (Expression<Func<M0, M1>>) (lc => lc.OrderLineCmtUpdDt)), (Expression<Func<M0, M1>>) Expression.Lambda<Func<OrderLineComment, scOrderLineComment>>((Expression) Expression.MemberInit(Expression.New((ConstructorInfo) MethodBase.GetMethodFromHandle(__methodref (scOrderLineComment.\u002Ector)), (Expression[]) null), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scOrderLineComment.set_OrderLineCmtId)), (Expression) Expression.Property((Expression) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (OrderLineComment.get_OrderLineCmtId)))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scOrderLineComment.set_OrderLineId)), (Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (OrderLineComment.get_OrderLine))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (OrderLine.get_OrderLineId)))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scOrderLineComment.set_OrderLineComment)), (Expression) Expression.Property((Expression) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (OrderLineComment.get_OrderLineCmt)))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scOrderLineComment.set_OrderLineCmtUpdDt)), (Expression) Expression.Convert((Expression) Expression.Property((Expression) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (OrderLineComment.get_OrderLineCmtUpdDt))), typeof (DateTime))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scOrderLineComment.set_OrderLineCmtFwUpFlag)), (Expression) Expression.Convert((Expression) Expression.Property((Expression) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (OrderLineComment.get_OrderLineCmtFwUpFlag))), typeof (bool))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scOrderLineComment.set_OrderLineCmtFwUpDt)), (Expression) Expression.Convert((Expression) Expression.Property((Expression) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (OrderLineComment.get_OrderLineCmtFwUpDt))), typeof (DateTime))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scOrderLineComment.set_OrderLineCmtFwUpTypeId)), (Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (OrderLineComment.get_OrderFollowUpType))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (OrderFollowUpType.get_OrderFwUpId)))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scOrderLineComment.set_OrderLineCmtFwUpAssocId)), (Expression) Expression.Property((Expression) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (OrderLineComment.get_OrderLineCmtFwUpAssocId)))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scOrderLineComment.set_OrderLineUpdAssocId)), (Expression) Expression.Property((Expression) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (OrderLineComment.get_OrderLineUpdAssocId))))), new ParameterExpression[1]
          {
            parameterExpression2
          }));
          if (source != null && source.Count<scOrderLineComment>() > 0)
            orderLineCommentList = source.ToList<scOrderLineComment>();
          se0085CtEntities1.Database.Connection.Close();
        }
      }
      return orderLineCommentList;
    }

    public scOrderLineComment rtnOrderLineLastCmt(int OrderLineId)
    {
      // ISSUE: object of a compiler-generated type is created
      // ISSUE: variable of a compiler-generated type
      clsEngineCTdB._Closure\u0024__11 closure11 = new clsEngineCTdB._Closure\u0024__11();
      // ISSUE: reference to a compiler-generated field
      closure11.\u0024VB\u0024Local_OrderLineId = OrderLineId;
      scOrderLineComment orderLineComment = new scOrderLineComment();
      // ISSUE: reference to a compiler-generated field
      if (closure11.\u0024VB\u0024Local_OrderLineId > 0)
      {
        using (SE0085CTEntities1 se0085CtEntities1 = new SE0085CTEntities1())
        {
          se0085CtEntities1.Database.Connection.ConnectionString = this._CTConnection;
          ParameterExpression parameterExpression1;
          ParameterExpression parameterExpression2;
          // ISSUE: reference to a compiler-generated field
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: method reference
          IQueryable<scOrderLineComment> source = (IQueryable<scOrderLineComment>) Queryable.Select<OrderLineComment, scOrderLineComment>((IQueryable<M0>) Queryable.OrderByDescending<OrderLineComment, DateTime?>(Queryable.Where<OrderLineComment>((IQueryable<M0>) se0085CtEntities1.OrderLineComments, (Expression<Func<M0, bool>>) Expression.Lambda<Func<OrderLineComment, bool>>((Expression) Expression.Equal(lc.OrderLine.OrderLineId, closure11.\u0024VB\u0024Local_OrderLineId, true, (MethodInfo) null), new ParameterExpression[1]
          {
            parameterExpression1
          })), (Expression<Func<M0, M1>>) (lc => lc.OrderLineCmtUpdDt)), (Expression<Func<M0, M1>>) Expression.Lambda<Func<OrderLineComment, scOrderLineComment>>((Expression) Expression.MemberInit(Expression.New((ConstructorInfo) MethodBase.GetMethodFromHandle(__methodref (scOrderLineComment.\u002Ector)), (Expression[]) null), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scOrderLineComment.set_OrderLineCmtId)), (Expression) Expression.Property((Expression) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (OrderLineComment.get_OrderLineCmtId)))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scOrderLineComment.set_OrderLineId)), (Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (OrderLineComment.get_OrderLine))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (OrderLine.get_OrderLineId)))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scOrderLineComment.set_OrderLineComment)), (Expression) Expression.Property((Expression) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (OrderLineComment.get_OrderLineCmt)))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scOrderLineComment.set_OrderLineCmtUpdDt)), (Expression) Expression.Convert((Expression) Expression.Property((Expression) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (OrderLineComment.get_OrderLineCmtUpdDt))), typeof (DateTime))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scOrderLineComment.set_OrderLineCmtFwUpFlag)), (Expression) Expression.Convert((Expression) Expression.Property((Expression) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (OrderLineComment.get_OrderLineCmtFwUpFlag))), typeof (bool))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scOrderLineComment.set_OrderLineCmtFwUpDt)), (Expression) Expression.Convert((Expression) Expression.Property((Expression) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (OrderLineComment.get_OrderLineCmtFwUpDt))), typeof (DateTime))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scOrderLineComment.set_OrderLineCmtFwUpTypeId)), (Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (OrderLineComment.get_OrderFollowUpType))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (OrderFollowUpType.get_OrderFwUpId)))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scOrderLineComment.set_OrderLineCmtFwUpAssocId)), (Expression) Expression.Property((Expression) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (OrderLineComment.get_OrderLineCmtFwUpAssocId)))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scOrderLineComment.set_OrderLineUpdAssocId)), (Expression) Expression.Property((Expression) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (OrderLineComment.get_OrderLineUpdAssocId))))), new ParameterExpression[1]
          {
            parameterExpression2
          }));
          if (source != null && source.Count<scOrderLineComment>() > 0)
            orderLineComment = source.First<scOrderLineComment>();
          se0085CtEntities1.Database.Connection.Close();
        }
      }
      return orderLineComment;
    }

    public List<scOrderLineStat> rtnOrderLineStatus(int OrderLineId, int OrdSectsId = 0)
    {
      // ISSUE: object of a compiler-generated type is created
      // ISSUE: variable of a compiler-generated type
      clsEngineCTdB._Closure\u0024__12 closure12 = new clsEngineCTdB._Closure\u0024__12();
      // ISSUE: reference to a compiler-generated field
      closure12.\u0024VB\u0024Local_OrderLineId = OrderLineId;
      // ISSUE: reference to a compiler-generated field
      closure12.\u0024VB\u0024Local_OrdSectsId = OrdSectsId;
      List<scOrderLineStat> scOrderLineStatList = new List<scOrderLineStat>();
      // ISSUE: reference to a compiler-generated field
      if (closure12.\u0024VB\u0024Local_OrderLineId > 0)
      {
        using (SE0085CTEntities1 se0085CtEntities1 = new SE0085CTEntities1())
        {
          se0085CtEntities1.Database.Connection.ConnectionString = this._CTConnection;
          ParameterExpression parameterExpression1;
          ParameterExpression parameterExpression2;
          // ISSUE: reference to a compiler-generated field
          // ISSUE: method reference
          // ISSUE: field reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: method reference
          IQueryable<scOrderLineStat> source = (IQueryable<scOrderLineStat>) Queryable.Select<OrderLineStat, scOrderLineStat>((IQueryable<M0>) Queryable.OrderByDescending<OrderLineStat, DateTime?>(Queryable.Where<OrderLineStat>((IQueryable<M0>) se0085CtEntities1.OrderLineStats, (Expression<Func<M0, bool>>) Expression.Lambda<Func<OrderLineStat, bool>>((Expression) Expression.And((Expression) Expression.Equal(lc.OrderLine.OrderLineId, closure12.\u0024VB\u0024Local_OrderLineId, true, (MethodInfo) null), (Expression) Expression.Equal((Expression) Expression.Property((Expression) parameterExpression1, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (OrderLineStat.get_OrdSectsId))), (Expression) Expression.Field((Expression) Expression.Constant((object) closure12, typeof (clsEngineCTdB._Closure\u0024__12)), FieldInfo.GetFieldFromHandle(__fieldref (clsEngineCTdB._Closure\u0024__12.\u0024VB\u0024Local_OrdSectsId))), true, (MethodInfo) null)), new ParameterExpression[1]
          {
            parameterExpression1
          })), (Expression<Func<M0, M1>>) (lc => lc.OrderLineStatUpdDt)), (Expression<Func<M0, M1>>) Expression.Lambda<Func<OrderLineStat, scOrderLineStat>>((Expression) Expression.MemberInit(Expression.New((ConstructorInfo) MethodBase.GetMethodFromHandle(__methodref (scOrderLineStat.\u002Ector)), (Expression[]) null), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scOrderLineStat.set_OrderLineStatId)), (Expression) Expression.Property((Expression) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (OrderLineStat.get_OrderLineStatId)))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scOrderLineStat.set_OrderLineId)), (Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (OrderLineStat.get_OrderLine))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (OrderLine.get_OrderLineId)))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scOrderLineStat.set_OrdSectsId)), (Expression) Expression.Property((Expression) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (OrderLineStat.get_OrdSectsId)))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scOrderLineStat.set_OrderLineStatus)), (Expression) Expression.Property((Expression) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (OrderLineStat.get_OrderLineStatus)))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scOrderLineStat.set_OrderLineStatUpdDt)), (Expression) Expression.Convert((Expression) Expression.Property((Expression) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (OrderLineStat.get_OrderLineStatUpdDt))), typeof (DateTime))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scOrderLineStat.set_OrderLineStatFwUpFlag)), (Expression) Expression.Convert((Expression) Expression.Property((Expression) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (OrderLineStat.get_OrderLineStatFwUpFlag))), typeof (bool))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scOrderLineStat.set_OrderLineStatFwUpDt)), (Expression) Expression.Convert((Expression) Expression.Property((Expression) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (OrderLineStat.get_OrderLineStatFwUpDt))), typeof (DateTime))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scOrderLineStat.set_OrderLineStatFwUpTypeId)), (Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (OrderLineStat.get_OrderFollowUpType))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (OrderFollowUpType.get_OrderFwUpId)))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scOrderLineStat.set_OrderLineStatFwUpAssocId)), (Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (OrderLineStat.get_Associate))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (Associate.get_AssocId)))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scOrderLineStat.set_OrderLineUpdAssocId)), (Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (OrderLineStat.get_Associate1))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (Associate.get_AssocId))))), new ParameterExpression[1]
          {
            parameterExpression2
          }));
          if (source != null && source.Count<scOrderLineStat>() > 0)
            scOrderLineStatList = source.ToList<scOrderLineStat>();
          se0085CtEntities1.Database.Connection.Close();
        }
      }
      return scOrderLineStatList;
    }

    public scAssociateData rtnOrderLineAssocAssign(int OrderLineId, emOLAssignType AssignType)
    {
      // ISSUE: object of a compiler-generated type is created
      // ISSUE: variable of a compiler-generated type
      clsEngineCTdB._Closure\u0024__13 closure13 = new clsEngineCTdB._Closure\u0024__13();
      // ISSUE: reference to a compiler-generated field
      closure13.\u0024VB\u0024Local_OrderLineId = OrderLineId;
      scAssociateData scAssociateData = new scAssociateData();
      // ISSUE: reference to a compiler-generated field
      closure13.\u0024VB\u0024Local_ldAssignType = (int) AssignType;
      // ISSUE: reference to a compiler-generated field
      if (closure13.\u0024VB\u0024Local_OrderLineId > 0)
      {
        using (SE0085CTEntities1 se0085CtEntities1 = new SE0085CTEntities1())
        {
          se0085CtEntities1.Database.Connection.ConnectionString = this._CTConnection;
          ParameterExpression parameterExpression1;
          ParameterExpression parameterExpression2;
          // ISSUE: reference to a compiler-generated field
          // ISSUE: method reference
          // ISSUE: type reference
          // ISSUE: method reference
          // ISSUE: field reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: type reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: type reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: type reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: type reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: type reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: type reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: type reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: type reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: type reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: type reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: type reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: type reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: type reference
          // ISSUE: method reference
          IQueryable<scAssociateData> source = (IQueryable<scAssociateData>) Queryable.Select(Queryable.Where((IQueryable<M0>) Queryable.Join((IQueryable<M0>) Queryable.Join((IQueryable<M0>) se0085CtEntities1.OrdLineAssocAssigneds, (IEnumerable<M1>) se0085CtEntities1.Associates, (Expression<Func<M0, M2>>) (p => p.Associate.AssocId), (Expression<Func<M1, M2>>) (a => a.AssocId), (Expression<Func<M0, M1, M3>>) ((p, a) => new{ p = p, a = a })), (IEnumerable<M1>) se0085CtEntities1.AssocAssignTypes, (Expression<Func<M0, M2>>) (data => data.p.AssocAssignType.AssocAssignTypeId), (Expression<Func<M1, M2>>) (t => t.AssocAssignTypeId), (Expression<Func<M0, M1, M3>>) ((data, t) => new
          {
            p = data.p,
            a = data.a,
            t = t
          })), (Expression<Func<M0, bool>>) Expression.Lambda<Func<VB\u0024AnonymousType_6<OrdLineAssocAssigned, Associate, AssocAssignType>, bool>>((Expression) Expression.And((Expression) Expression.Equal(\u0024VB\u0024It.p.OrderLine.OrderLineId, closure13.\u0024VB\u0024Local_OrderLineId, true, (MethodInfo) null), (Expression) Expression.Equal((Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression1, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_6<OrdLineAssocAssigned, Associate, AssocAssignType>.get_t), __typeref (VB\u0024AnonymousType_6<OrdLineAssocAssigned, Associate, AssocAssignType>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (AssocAssignType.get_AssocAssignTypeValue))), (Expression) Expression.Field((Expression) Expression.Constant((object) closure13, typeof (clsEngineCTdB._Closure\u0024__13)), FieldInfo.GetFieldFromHandle(__fieldref (clsEngineCTdB._Closure\u0024__13.\u0024VB\u0024Local_ldAssignType))), true, (MethodInfo) null)), new ParameterExpression[1]
          {
            parameterExpression1
          })), (Expression<Func<M0, M1>>) Expression.Lambda<Func<VB\u0024AnonymousType_6<OrdLineAssocAssigned, Associate, AssocAssignType>, scAssociateData>>((Expression) Expression.MemberInit(Expression.New((ConstructorInfo) MethodBase.GetMethodFromHandle(__methodref (scAssociateData.\u002Ector)), (Expression[]) null), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scAssociateData.set_AssocId)), (Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_6<OrdLineAssocAssigned, Associate, AssocAssignType>.get_a), __typeref (VB\u0024AnonymousType_6<OrdLineAssocAssigned, Associate, AssocAssignType>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (Associate.get_AssocId)))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scAssociateData.set_AssocEmpId)), (Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_6<OrdLineAssocAssigned, Associate, AssocAssignType>.get_a), __typeref (VB\u0024AnonymousType_6<OrdLineAssocAssigned, Associate, AssocAssignType>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (Associate.get_AssocEmpId)))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scAssociateData.set_AssocLaborName)), (Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_6<OrdLineAssocAssigned, Associate, AssocAssignType>.get_a), __typeref (VB\u0024AnonymousType_6<OrdLineAssocAssigned, Associate, AssocAssignType>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (Associate.get_AssocLaborName)))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scAssociateData.set_AssocFirstName)), (Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_6<OrdLineAssocAssigned, Associate, AssocAssignType>.get_a), __typeref (VB\u0024AnonymousType_6<OrdLineAssocAssigned, Associate, AssocAssignType>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (Associate.get_AssocFirstName)))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scAssociateData.set_AssocLastName)), (Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_6<OrdLineAssocAssigned, Associate, AssocAssignType>.get_a), __typeref (VB\u0024AnonymousType_6<OrdLineAssocAssigned, Associate, AssocAssignType>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (Associate.get_AssocLastName)))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scAssociateData.set_AssocLogin)), (Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_6<OrdLineAssocAssigned, Associate, AssocAssignType>.get_a), __typeref (VB\u0024AnonymousType_6<OrdLineAssocAssigned, Associate, AssocAssignType>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (Associate.get_AssocLogin)))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scAssociateData.set_AssocSESA)), (Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_6<OrdLineAssocAssigned, Associate, AssocAssignType>.get_a), __typeref (VB\u0024AnonymousType_6<OrdLineAssocAssigned, Associate, AssocAssignType>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (Associate.get_AssocSESA)))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scAssociateData.set_AssocEmail)), (Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_6<OrdLineAssocAssigned, Associate, AssocAssignType>.get_a), __typeref (VB\u0024AnonymousType_6<OrdLineAssocAssigned, Associate, AssocAssignType>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (Associate.get_AssocEmail)))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scAssociateData.set_AssocQCInsp)), (Expression) Expression.Convert((Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_6<OrdLineAssocAssigned, Associate, AssocAssignType>.get_a), __typeref (VB\u0024AnonymousType_6<OrdLineAssocAssigned, Associate, AssocAssignType>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (Associate.get_AssocQCInsp))), typeof (bool))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scAssociateData.set_AssocUserPriv)), (Expression) Expression.ConvertChecked((Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_6<OrdLineAssocAssigned, Associate, AssocAssignType>.get_a), __typeref (VB\u0024AnonymousType_6<OrdLineAssocAssigned, Associate, AssocAssignType>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (Associate.get_AssocUserPriv))), typeof (long))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scAssociateData.set_AssocPhone)), (Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_6<OrdLineAssocAssigned, Associate, AssocAssignType>.get_a), __typeref (VB\u0024AnonymousType_6<OrdLineAssocAssigned, Associate, AssocAssignType>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (Associate.get_AssocPhone)))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scAssociateData.set_AssocExt)), (Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_6<OrdLineAssocAssigned, Associate, AssocAssignType>.get_a), __typeref (VB\u0024AnonymousType_6<OrdLineAssocAssigned, Associate, AssocAssignType>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (Associate.get_AssocExt)))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scAssociateData.set_AssocActive)), (Expression) Expression.Convert((Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_6<OrdLineAssocAssigned, Associate, AssocAssignType>.get_a), __typeref (VB\u0024AnonymousType_6<OrdLineAssocAssigned, Associate, AssocAssignType>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (Associate.get_AssocActive))), typeof (bool)))), new ParameterExpression[1]
          {
            parameterExpression2
          }));
          if (source.Count<scAssociateData>() == 1)
            scAssociateData = source.First<scAssociateData>();
          se0085CtEntities1.Database.Connection.Close();
        }
      }
      return scAssociateData;
    }

    public int AddOrderLineComment(scOrderLineComment OrderLineComment)
    {
      // ISSUE: object of a compiler-generated type is created
      // ISSUE: variable of a compiler-generated type
      clsEngineCTdB._Closure\u0024__14 closure14 = new clsEngineCTdB._Closure\u0024__14();
      // ISSUE: reference to a compiler-generated field
      closure14.\u0024VB\u0024Local_OrderLineComment = OrderLineComment;
      int num = 0;
      // ISSUE: reference to a compiler-generated field
      if (closure14.\u0024VB\u0024Local_OrderLineComment.OrderLineId > 0)
      {
        using (SE0085CTEntities1 se0085CtEntities1 = new SE0085CTEntities1())
        {
          se0085CtEntities1.Database.Connection.ConnectionString = this._CTConnection;
          ParameterExpression parameterExpression;
          // ISSUE: reference to a compiler-generated field
          IQueryable<OrderLine> source = (IQueryable<OrderLine>) Queryable.Select<OrderLine, OrderLine>(Queryable.Where<OrderLine>((IQueryable<M0>) se0085CtEntities1.OrderLines, (Expression<Func<M0, bool>>) Expression.Lambda<Func<OrderLine, bool>>((Expression) Expression.Equal(ol.OrderLineId, closure14.\u0024VB\u0024Local_OrderLineComment.OrderLineId, true, (MethodInfo) null), new ParameterExpression[1]
          {
            parameterExpression
          })), (Expression<Func<M0, M1>>) (ol => ol));
          if (source != null && source.Count<OrderLine>() == 1)
          {
            OrderLine orderLine1 = new OrderLine();
            OrderLine orderLine2 = source.First<OrderLine>();
            OrderLineComment orderLineComment = new OrderLineComment();
            // ISSUE: reference to a compiler-generated field
            orderLineComment.OrderLineCmt = closure14.\u0024VB\u0024Local_OrderLineComment.OrderLineComment;
            // ISSUE: reference to a compiler-generated field
            orderLineComment.OrderLineCmtUpdDt = (DateTime?) closure14.\u0024VB\u0024Local_OrderLineComment.OrderLineCmtUpdDt;
            // ISSUE: reference to a compiler-generated field
            orderLineComment.OrderLineCmtFwUpFlag = (bool?) closure14.\u0024VB\u0024Local_OrderLineComment.OrderLineCmtFwUpFlag;
            // ISSUE: reference to a compiler-generated field
            orderLineComment.OrderLineCmtFwUpDt = (DateTime?) closure14.\u0024VB\u0024Local_OrderLineComment.OrderLineCmtFwUpDt;
            Associate associate1 = new Associate();
            SE0085CTEntities1 DataProvider1 = se0085CtEntities1;
            // ISSUE: reference to a compiler-generated field
            Associate associate2 = this.rtoAssociateById(ref DataProvider1, closure14.\u0024VB\u0024Local_OrderLineComment.OrderLineCmtFwUpAssocId);
            orderLineComment.OrderLineCmtFwUpAssocId = associate2.AssocId;
            Associate associate3 = new Associate();
            SE0085CTEntities1 DataProvider2 = se0085CtEntities1;
            // ISSUE: reference to a compiler-generated field
            Associate associate4 = this.rtoAssociateById(ref DataProvider2, closure14.\u0024VB\u0024Local_OrderLineComment.OrderLineUpdAssocId);
            orderLineComment.OrderLineUpdAssocId = associate4.AssocId;
            OrderFollowUpType orderFollowUpType1 = new OrderFollowUpType();
            SE0085CTEntities1 DataProvider3 = se0085CtEntities1;
            // ISSUE: reference to a compiler-generated field
            OrderFollowUpType orderFollowUpType2 = this.rtoFollowUpTypeById(ref DataProvider3, closure14.\u0024VB\u0024Local_OrderLineComment.OrderLineCmtFwUpTypeId);
            orderLineComment.OrderFollowUpType = orderFollowUpType2;
            orderLine2.OrderLineComments.Add(orderLineComment);
            num = se0085CtEntities1.SaveChanges();
          }
          se0085CtEntities1.Database.Connection.Close();
        }
      }
      return num;
    }

    public string rtnFASOrdStatus(int OrderLineId, string FASAssemLn)
    {
      // ISSUE: object of a compiler-generated type is created
      // ISSUE: variable of a compiler-generated type
      clsEngineCTdB._Closure\u0024__15 closure15 = new clsEngineCTdB._Closure\u0024__15();
      // ISSUE: reference to a compiler-generated field
      closure15.\u0024VB\u0024Local_OrderLineId = OrderLineId;
      // ISSUE: reference to a compiler-generated field
      closure15.\u0024VB\u0024Local_FASAssemLn = FASAssemLn;
      string str = "0/0";
      using (SE0085CTEntities1 se0085CtEntities1 = new SE0085CTEntities1())
      {
        se0085CtEntities1.Database.Connection.ConnectionString = this._CTConnection;
        ParameterExpression parameterExpression1;
        // ISSUE: reference to a compiler-generated field
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: field reference
        int? nullable1 = Queryable.Sum<int?>((IQueryable<M0>) Queryable.Select<OrdFASExt, int?>(Queryable.Where<OrdFASExt>((IQueryable<M0>) se0085CtEntities1.OrdFASExts, (Expression<Func<M0, bool>>) Expression.Lambda<Func<OrdFASExt, bool>>((Expression) Expression.And((Expression) Expression.Equal(bk.OrderLine.OrderLineId, closure15.\u0024VB\u0024Local_OrderLineId, true, (MethodInfo) null), (Expression) Expression.Equal((Expression) Expression.Call((Expression) null, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (Microsoft.VisualBasic.CompilerServices.Operators.CompareString)), (Expression) Expression.Property((Expression) parameterExpression1, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (OrdFASExt.get_FASAsmblLn))), (Expression) Expression.Field((Expression) Expression.Constant((object) closure15, typeof (clsEngineCTdB._Closure\u0024__15)), FieldInfo.GetFieldFromHandle(__fieldref (clsEngineCTdB._Closure\u0024__15.\u0024VB\u0024Local_FASAssemLn))), (Expression) Expression.Constant((object) false, typeof (bool))), (Expression) Expression.Constant((object) 0, typeof (int)))), new ParameterExpression[1]
        {
          parameterExpression1
        })), (Expression<Func<M0, M1>>) (bk => bk.FASUnfilledQty)), (Expression<Func<M0, int?>>) (UnFilQty => UnFilQty));
        ParameterExpression parameterExpression2;
        // ISSUE: reference to a compiler-generated field
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: field reference
        int? nullable2 = Queryable.Sum<int?>((IQueryable<M0>) Queryable.Select<OrdFASExt, int?>(Queryable.Where<OrdFASExt>((IQueryable<M0>) se0085CtEntities1.OrdFASExts, (Expression<Func<M0, bool>>) Expression.Lambda<Func<OrdFASExt, bool>>((Expression) Expression.And((Expression) Expression.Equal(bk.OrderLine.OrderLineId, closure15.\u0024VB\u0024Local_OrderLineId, true, (MethodInfo) null), (Expression) Expression.Equal((Expression) Expression.Call((Expression) null, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (Microsoft.VisualBasic.CompilerServices.Operators.CompareString)), (Expression) Expression.Property((Expression) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (OrdFASExt.get_FASAsmblLn))), (Expression) Expression.Field((Expression) Expression.Constant((object) closure15, typeof (clsEngineCTdB._Closure\u0024__15)), FieldInfo.GetFieldFromHandle(__fieldref (clsEngineCTdB._Closure\u0024__15.\u0024VB\u0024Local_FASAssemLn))), (Expression) Expression.Constant((object) false, typeof (bool))), (Expression) Expression.Constant((object) 0, typeof (int)))), new ParameterExpression[1]
        {
          parameterExpression2
        })), (Expression<Func<M0, M1>>) (bk => bk.FASOrdQty)), (Expression<Func<M0, int?>>) (OrdQty => OrdQty));
        if (nullable2.HasValue & nullable1.HasValue)
          str = Conversions.ToString((int) (nullable2.HasValue & nullable1.HasValue ? new int?(checked (nullable2.GetValueOrDefault() - nullable1.GetValueOrDefault())) : new int?())) + "/" + Conversions.ToString((int) nullable2);
        se0085CtEntities1.Database.Connection.Close();
      }
      return str;
    }

    public bool AddUpdFASDtlByMO(string MO)
    {
      // ISSUE: object of a compiler-generated type is created
      // ISSUE: variable of a compiler-generated type
      clsEngineCTdB._Closure\u0024__16 closure16 = new clsEngineCTdB._Closure\u0024__16();
      // ISSUE: reference to a compiler-generated field
      closure16.\u0024VB\u0024Local_MO = MO;
      bool flag1 = true;
      List<scOrdFASInfo> scOrdFasInfoList = new List<scOrdFASInfo>();
      // ISSUE: reference to a compiler-generated field
      if (closure16.\u0024VB\u0024Local_MO.Length > 0)
      {
        using (SE0085CTEntities1 se0085CtEntities1 = new SE0085CTEntities1())
        {
          se0085CtEntities1.Database.Connection.ConnectionString = this._CTConnection;
          ParameterExpression parameterExpression1;
          // ISSUE: method reference
          // ISSUE: reference to a compiler-generated field
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: type reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: type reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: type reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: type reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: type reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: type reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: type reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: type reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: type reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: type reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: type reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: type reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: type reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: type reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: type reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: type reference
          // ISSUE: method reference
          IQueryable<scOrdFASInfo> source1 = (IQueryable<scOrdFASInfo>) Queryable.Select(Queryable.Where((IQueryable<M0>) Queryable.Join((IQueryable<M0>) Queryable.Join((IQueryable<M0>) Queryable.Join((IQueryable<M0>) se0085CtEntities1.SEOrders, (IEnumerable<M1>) se0085CtEntities1.OrderLines, (Expression<Func<M0, M2>>) (od => od.OrderId), (Expression<Func<M1, M2>>) (ol => ol.SEOrder.OrderId), (Expression<Func<M0, M1, M3>>) ((od, ol) => new{ od = od, ol = ol })), (IEnumerable<M1>) se0085CtEntities1.AssemblyLines, (Expression<Func<M0, M2>>) (data => data.ol.AssemblyLine.AssemLineId), (Expression<Func<M1, M2>>) (al => al.AssemLineId), (Expression<Func<M0, M1, M3>>) ((data, al) => new
          {
            \u0024VB\u0024It1 = data,
            al = al
          })), (IEnumerable<M1>) se0085CtEntities1.OrdFASExts, (Expression<Func<M0, M2>>) (data => data.\u0024VB\u0024It1.ol.OrderLineId), (Expression<Func<M1, M2>>) (fe => fe.OrderLine.OrderLineId), (Expression<Func<M0, M1, M3>>) ((data, fe) => new
          {
            od = data.\u0024VB\u0024It1.od,
            ol = data.\u0024VB\u0024It1.ol,
            al = data.al,
            fe = fe
          })), (Expression<Func<M0, bool>>) (data => Expression.Call((Expression) null, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (Microsoft.VisualBasic.CompilerServices.Operators.CompareString)), data.fe.FASOrdNbr, closure16.\u0024VB\u0024Local_MO, false) == 0)), (Expression<Func<M0, M1>>) Expression.Lambda<Func<VB\u0024AnonymousType_7<SEOrder, OrderLine, AssemblyLine, OrdFASExt>, scOrdFASInfo>>((Expression) Expression.MemberInit(Expression.New((ConstructorInfo) MethodBase.GetMethodFromHandle(__methodref (scOrdFASInfo.\u002Ector)), (Expression[]) null), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scOrderData.set_AssemblyLineId)), (Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression1, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_7<SEOrder, OrderLine, AssemblyLine, OrdFASExt>.get_al), __typeref (VB\u0024AnonymousType_7<SEOrder, OrderLine, AssemblyLine, OrdFASExt>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (AssemblyLine.get_AssemLineId)))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scOrderData.set_AssemLineAbbrv)), (Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression1, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_7<SEOrder, OrderLine, AssemblyLine, OrdFASExt>.get_al), __typeref (VB\u0024AnonymousType_7<SEOrder, OrderLine, AssemblyLine, OrdFASExt>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (AssemblyLine.get_AssemLineAbbrv)))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scOrderData.set_OrderId)), (Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression1, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_7<SEOrder, OrderLine, AssemblyLine, OrdFASExt>.get_od), __typeref (VB\u0024AnonymousType_7<SEOrder, OrderLine, AssemblyLine, OrdFASExt>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (SEOrder.get_OrderId)))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scOrderData.set_OrderFO)), (Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression1, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_7<SEOrder, OrderLine, AssemblyLine, OrdFASExt>.get_od), __typeref (VB\u0024AnonymousType_7<SEOrder, OrderLine, AssemblyLine, OrdFASExt>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (SEOrder.get_OrderFO)))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scOrderData.set_OrderJobName)), (Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression1, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_7<SEOrder, OrderLine, AssemblyLine, OrdFASExt>.get_od), __typeref (VB\u0024AnonymousType_7<SEOrder, OrderLine, AssemblyLine, OrdFASExt>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (SEOrder.get_OrderJobName)))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scOrderData.set_OrderLineId)), (Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression1, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_7<SEOrder, OrderLine, AssemblyLine, OrdFASExt>.get_ol), __typeref (VB\u0024AnonymousType_7<SEOrder, OrderLine, AssemblyLine, OrdFASExt>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (OrderLine.get_OrderLineId)))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scOrderData.set_OrderLineNum)), (Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression1, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_7<SEOrder, OrderLine, AssemblyLine, OrdFASExt>.get_ol), __typeref (VB\u0024AnonymousType_7<SEOrder, OrderLine, AssemblyLine, OrdFASExt>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (OrderLine.get_OrderLineNum)))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scOrderData.set_OrderLineSL)), (Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression1, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_7<SEOrder, OrderLine, AssemblyLine, OrdFASExt>.get_ol), __typeref (VB\u0024AnonymousType_7<SEOrder, OrderLine, AssemblyLine, OrdFASExt>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (OrderLine.get_OrderLineSL)))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scOrderData.set_OrderLineSS)), (Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression1, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_7<SEOrder, OrderLine, AssemblyLine, OrdFASExt>.get_ol), __typeref (VB\u0024AnonymousType_7<SEOrder, OrderLine, AssemblyLine, OrdFASExt>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (OrderLine.get_OrderLineSS)))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scOrderData.set_OrderLineTargetDt)), (Expression) Expression.Convert((Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression1, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_7<SEOrder, OrderLine, AssemblyLine, OrdFASExt>.get_ol), __typeref (VB\u0024AnonymousType_7<SEOrder, OrderLine, AssemblyLine, OrdFASExt>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (OrderLine.get_OrderLineTargetDt))), typeof (DateTime))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scOrderData.set_OrderLineShipDt)), (Expression) Expression.Convert((Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression1, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_7<SEOrder, OrderLine, AssemblyLine, OrdFASExt>.get_ol), __typeref (VB\u0024AnonymousType_7<SEOrder, OrderLine, AssemblyLine, OrdFASExt>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (OrderLine.get_OrderLineShipDt))), typeof (DateTime))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scOrderData.set_OrderLineAssyStartDt)), (Expression) Expression.Convert((Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression1, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_7<SEOrder, OrderLine, AssemblyLine, OrdFASExt>.get_ol), __typeref (VB\u0024AnonymousType_7<SEOrder, OrderLine, AssemblyLine, OrdFASExt>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (OrderLine.get_OrderLineAssyStartDt))), typeof (DateTime))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scOrdFASInfo.set_OrdMfgPartNbr)), (Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression1, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_7<SEOrder, OrderLine, AssemblyLine, OrdFASExt>.get_fe), __typeref (VB\u0024AnonymousType_7<SEOrder, OrderLine, AssemblyLine, OrdFASExt>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (OrdFASExt.get_OrdMfgPartNbr)))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scOrdFASInfo.set_OrdFASExtId)), (Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression1, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_7<SEOrder, OrderLine, AssemblyLine, OrdFASExt>.get_fe), __typeref (VB\u0024AnonymousType_7<SEOrder, OrderLine, AssemblyLine, OrdFASExt>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (OrdFASExt.get_OrdFASExtId)))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scOrdFASInfo.set_FASOrdNbr)), (Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression1, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_7<SEOrder, OrderLine, AssemblyLine, OrdFASExt>.get_fe), __typeref (VB\u0024AnonymousType_7<SEOrder, OrderLine, AssemblyLine, OrdFASExt>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (OrdFASExt.get_FASOrdNbr)))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scOrdFASInfo.set_FASOrdQty)), (Expression) Expression.ConvertChecked((Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression1, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_7<SEOrder, OrderLine, AssemblyLine, OrdFASExt>.get_fe), __typeref (VB\u0024AnonymousType_7<SEOrder, OrderLine, AssemblyLine, OrdFASExt>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (OrdFASExt.get_FASOrdQty))), typeof (int)))), new ParameterExpression[1]
          {
            parameterExpression1
          }));
          if (source1 != null && source1.Count<scOrdFASInfo>() > 0)
          {
            // ISSUE: object of a compiler-generated type is created
            // ISSUE: variable of a compiler-generated type
            clsEngineCTdB._Closure\u0024__16._Closure\u0024__17 closure17 = new clsEngineCTdB._Closure\u0024__16._Closure\u0024__17();
            List<scOrdFASInfo> list = source1.ToList<scOrdFASInfo>();
            clsEngineMES clsEngineMes = new clsEngineMES();
            // ISSUE: reference to a compiler-generated field
            closure17.\u0024VB\u0024Local_ldOrdFASExt = new OrdFASExt();
            List<scOrdFASInfo>.Enumerator enumerator1;
            try
            {
              enumerator1 = list.GetEnumerator();
              while (enumerator1.MoveNext())
              {
                // ISSUE: object of a compiler-generated type is created
                // ISSUE: variable of a compiler-generated type
                clsEngineCTdB._Closure\u0024__16._Closure\u0024__17._Closure\u0024__18 other = new clsEngineCTdB._Closure\u0024__16._Closure\u0024__17._Closure\u0024__18(other);
                scOrdFASInfo current1 = enumerator1.Current;
                // ISSUE: reference to a compiler-generated field
                other.\u0024VB\u0024Local_ldOrdLineId = current1.OrderLineId;
                // ISSUE: reference to a compiler-generated field
                if (current1.OrdFASExtId != closure17.\u0024VB\u0024Local_ldOrdFASExtId)
                {
                  // ISSUE: reference to a compiler-generated field
                  closure17.\u0024VB\u0024Local_ldOrdFASExtId = current1.OrdFASExtId;
                  ParameterExpression parameterExpression2;
                  // ISSUE: reference to a compiler-generated field
                  IQueryable<OrdFASExt> source2 = (IQueryable<OrdFASExt>) Queryable.Select<OrdFASExt, OrdFASExt>(Queryable.Where<OrdFASExt>((IQueryable<M0>) se0085CtEntities1.OrdFASExts, (Expression<Func<M0, bool>>) Expression.Lambda<Func<OrdFASExt, bool>>((Expression) Expression.Equal(fe.OrdFASExtId, closure17.\u0024VB\u0024Local_ldOrdFASExtId, true, (MethodInfo) null), new ParameterExpression[1]
                  {
                    parameterExpression2
                  })), (Expression<Func<M0, M1>>) (fe => fe));
                  if (source2 != null)
                  {
                    // ISSUE: reference to a compiler-generated field
                    closure17.\u0024VB\u0024Local_ldOrdFASExt = source2.First<OrdFASExt>();
                  }
                }
                List<scMESBOM> scMesbomList1 = new List<scMESBOM>();
                List<scMESBOM> scMesbomList2 = clsEngineMes.rtnNWLocation(current1.OrderFO, current1.OrderLineNum, current1.OrderLineSL, current1.OrderLineSS, current1.OrdMfgPartNbr);
                if (scMesbomList2.Count == 0)
                  flag1 = false;
                // ISSUE: reference to a compiler-generated field
                other.\u0024VB\u0024Local_ldOrdSect = new OrdSection();
                List<scMESBOM>.Enumerator enumerator2;
                try
                {
                  enumerator2 = scMesbomList2.GetEnumerator();
                  while (enumerator2.MoveNext())
                  {
                    scMESBOM current2 = enumerator2.Current;
                    // ISSUE: reference to a compiler-generated field
                    if (Conversions.ToInteger(current2.sect_id) != other.\u0024VB\u0024Local_ldSect)
                    {
                      // ISSUE: reference to a compiler-generated field
                      other.\u0024VB\u0024Local_ldSect = Conversions.ToInteger(current2.sect_id);
                      ParameterExpression parameterExpression2;
                      // ISSUE: reference to a compiler-generated field
                      // ISSUE: method reference
                      // ISSUE: field reference
                      IQueryable<OrdSection> source2 = (IQueryable<OrdSection>) Queryable.Select<OrdSection, OrdSection>(Queryable.Where<OrdSection>((IQueryable<M0>) se0085CtEntities1.OrdSections, (Expression<Func<M0, bool>>) Expression.Lambda<Func<OrdSection, bool>>((Expression) Expression.And((Expression) Expression.Equal(s.OrderLine.OrderLineId, other.\u0024VB\u0024Local_ldOrdLineId, true, (MethodInfo) null), (Expression) Expression.Equal((Expression) Expression.Property((Expression) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (OrdSection.get_OrdSectsNum))), (Expression) Expression.Field((Expression) Expression.Constant((object) other, typeof (clsEngineCTdB._Closure\u0024__16._Closure\u0024__17._Closure\u0024__18)), FieldInfo.GetFieldFromHandle(__fieldref (clsEngineCTdB._Closure\u0024__16._Closure\u0024__17._Closure\u0024__18.\u0024VB\u0024Local_ldSect))), true, (MethodInfo) null)), new ParameterExpression[1]
                      {
                        parameterExpression2
                      })), (Expression<Func<M0, M1>>) (s => s));
                      if (source2 != null && source2.Count<OrdSection>() > 0)
                      {
                        // ISSUE: reference to a compiler-generated field
                        other.\u0024VB\u0024Local_ldOrdSect = source2.First<OrdSection>();
                        ParameterExpression parameterExpression3;
                        // ISSUE: reference to a compiler-generated field
                        // ISSUE: method reference
                        // ISSUE: method reference
                        // ISSUE: field reference
                        // ISSUE: method reference
                        IQueryable<OrdFASExtDtl> source3 = (IQueryable<OrdFASExtDtl>) Queryable.Select<OrdFASExtDtl, OrdFASExtDtl>(Queryable.Where<OrdFASExtDtl>((IQueryable<M0>) se0085CtEntities1.OrdFASExtDtls, (Expression<Func<M0, bool>>) Expression.Lambda<Func<OrdFASExtDtl, bool>>((Expression) Expression.And((Expression) Expression.Equal(dt.OrdFASExt.OrdFASExtId, closure17.\u0024VB\u0024Local_ldOrdFASExt.OrdFASExtId, true, (MethodInfo) null), (Expression) Expression.Equal((Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression3, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (OrdFASExtDtl.get_OrdSection))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (OrdSection.get_OrdSectsId))), (Expression) Expression.Property((Expression) Expression.Field((Expression) Expression.Constant((object) other, typeof (clsEngineCTdB._Closure\u0024__16._Closure\u0024__17._Closure\u0024__18)), FieldInfo.GetFieldFromHandle(__fieldref (clsEngineCTdB._Closure\u0024__16._Closure\u0024__17._Closure\u0024__18.\u0024VB\u0024Local_ldOrdSect))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (OrdSection.get_OrdSectsId))), true, (MethodInfo) null)), new ParameterExpression[1]
                        {
                          parameterExpression3
                        })), (Expression<Func<M0, M1>>) (dt => dt));
                        bool flag2 = true;
                        OrdFASExtDtl entity = new OrdFASExtDtl();
                        if (source3 != null && source3.Count<OrdFASExtDtl>() == 1)
                        {
                          entity = source3.First<OrdFASExtDtl>();
                          Decimal extQtyPer = current2.ext_qty_per;
                          int? ordBldReqSectQty = entity.OrdBldReqSectQty;
                          Decimal? nullable1 = ordBldReqSectQty.HasValue ? new Decimal?(new Decimal(ordBldReqSectQty.GetValueOrDefault())) : new Decimal?();
                          bool? nullable2 = nullable1.HasValue ? new bool?(Decimal.Compare(nullable1.GetValueOrDefault(), extQtyPer) == 0) : new bool?();
                          double num = Conversions.ToDouble(current2.shp_splt);
                          int? ordBldReqShipSpt = entity.OrdBldReqShipSpt;
                          double? nullable3 = ordBldReqShipSpt.HasValue ? new double?((double) ordBldReqShipSpt.GetValueOrDefault()) : new double?();
                          bool? nullable4 = nullable3.HasValue ? new bool?(nullable3.GetValueOrDefault() == num) : new bool?();
                          bool? nullable5 = !nullable2.HasValue || nullable2.GetValueOrDefault() ? (nullable4.HasValue ? (nullable4.GetValueOrDefault() ? nullable2 : new bool?(false)) : new bool?()) : new bool?(false);
                          if ((nullable5.HasValue ? new bool?(!nullable5.GetValueOrDefault()) : new bool?()).GetValueOrDefault())
                          {
                            entity.OrdBldReqSectQty = (int?) Convert.ToInt32(current2.ext_qty_per);
                            entity.OrdBldReqShipSpt = (int?) Conversions.ToInteger(current2.shp_splt);
                            if (se0085CtEntities1.SaveChanges() == 0)
                              flag1 = false;
                          }
                          flag2 = false;
                        }
                        if (flag2)
                        {
                          // ISSUE: reference to a compiler-generated field
                          entity.OrdFASExt = closure17.\u0024VB\u0024Local_ldOrdFASExt;
                          // ISSUE: reference to a compiler-generated field
                          entity.OrdSection = other.\u0024VB\u0024Local_ldOrdSect;
                          entity.OrdBldRequest = (bool?) false;
                          entity.OrdBldRequestedDt = (DateTime?) Conversions.ToDate("01/01/1901");
                          entity.OrdBldRequiredDt = (DateTime?) Conversions.ToDate("01/01/1901");
                          entity.OrdBldCompleteDt = (DateTime?) Conversions.ToDate("01/01/1901");
                          entity.OrdBldReqSectQty = (int?) Convert.ToInt32(current2.ext_qty_per);
                          entity.OrdBldReqShipSpt = (int?) Conversions.ToInteger(current2.shp_splt);
                          se0085CtEntities1.OrdFASExtDtls.Add(entity);
                          if (se0085CtEntities1.SaveChanges() == 0)
                            flag1 = false;
                        }
                      }
                    }
                  }
                }
                finally
                {
                  enumerator2.Dispose();
                }
              }
            }
            finally
            {
              enumerator1.Dispose();
            }
          }
          se0085CtEntities1.Database.Connection.Close();
        }
      }
      return flag1;
    }

    public scOrderData rtnOrderDataById(int OrderLineId)
    {
      // ISSUE: object of a compiler-generated type is created
      // ISSUE: variable of a compiler-generated type
      clsEngineCTdB._Closure\u0024__19 closure19 = new clsEngineCTdB._Closure\u0024__19();
      // ISSUE: reference to a compiler-generated field
      closure19.\u0024VB\u0024Local_OrderLineId = OrderLineId;
      scOrderData scOrderData = new scOrderData();
      // ISSUE: reference to a compiler-generated field
      if (closure19.\u0024VB\u0024Local_OrderLineId > 0)
      {
        using (SE0085CTEntities1 se0085CtEntities1 = new SE0085CTEntities1())
        {
          se0085CtEntities1.Database.Connection.ConnectionString = this._CTConnection;
          ParameterExpression parameterExpression1;
          ParameterExpression parameterExpression2;
          // ISSUE: reference to a compiler-generated field
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: type reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: type reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: type reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: type reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: type reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: type reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: type reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: type reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: type reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: type reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: type reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: type reference
          // ISSUE: method reference
          IQueryable<scOrderData> source = (IQueryable<scOrderData>) Queryable.Select(Queryable.Where((IQueryable<M0>) Queryable.Join((IQueryable<M0>) Queryable.Join((IQueryable<M0>) Queryable.Join((IQueryable<M0>) se0085CtEntities1.SEOrders, (IEnumerable<M1>) se0085CtEntities1.OrderLines, (Expression<Func<M0, M2>>) (od => od.OrderId), (Expression<Func<M1, M2>>) (ol => ol.SEOrder.OrderId), (Expression<Func<M0, M1, M3>>) ((od, ol) => new{ od = od, ol = ol })), (IEnumerable<M1>) se0085CtEntities1.AssemblyLines, (Expression<Func<M0, M2>>) (data => data.ol.AssemblyLine.AssemLineId), (Expression<Func<M1, M2>>) (al => al.AssemLineId), (Expression<Func<M0, M1, M3>>) ((data, al) => new
          {
            \u0024VB\u0024It1 = data,
            al = al
          })), (IEnumerable<M1>) se0085CtEntities1.SEPlants, (Expression<Func<M0, M2>>) (data => data.al.SEPlant.SEPlantId), (Expression<Func<M1, M2>>) (pl => pl.SEPlantId), (Expression<Func<M0, M1, M3>>) ((data, pl) => new
          {
            od = data.\u0024VB\u0024It1.od,
            ol = data.\u0024VB\u0024It1.ol,
            al = data.al,
            pl = pl
          })), (Expression<Func<M0, bool>>) Expression.Lambda<Func<VB\u0024AnonymousType_2<SEOrder, OrderLine, AssemblyLine, SEPlant>, bool>>((Expression) Expression.Equal(\u0024VB\u0024It.ol.OrderLineId, closure19.\u0024VB\u0024Local_OrderLineId, true, (MethodInfo) null), new ParameterExpression[1]
          {
            parameterExpression1
          })), (Expression<Func<M0, M1>>) Expression.Lambda<Func<VB\u0024AnonymousType_2<SEOrder, OrderLine, AssemblyLine, SEPlant>, scOrderData>>((Expression) Expression.MemberInit(Expression.New((ConstructorInfo) MethodBase.GetMethodFromHandle(__methodref (scOrderData.\u002Ector)), (Expression[]) null), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scOrderData.set_AssemblyLineId)), (Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_2<SEOrder, OrderLine, AssemblyLine, SEPlant>.get_al), __typeref (VB\u0024AnonymousType_2<SEOrder, OrderLine, AssemblyLine, SEPlant>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (AssemblyLine.get_AssemLineId)))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scOrderData.set_AssemLineAbbrv)), (Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_2<SEOrder, OrderLine, AssemblyLine, SEPlant>.get_al), __typeref (VB\u0024AnonymousType_2<SEOrder, OrderLine, AssemblyLine, SEPlant>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (AssemblyLine.get_AssemLineAbbrv)))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scOrderData.set_OrderId)), (Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_2<SEOrder, OrderLine, AssemblyLine, SEPlant>.get_od), __typeref (VB\u0024AnonymousType_2<SEOrder, OrderLine, AssemblyLine, SEPlant>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (SEOrder.get_OrderId)))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scOrderData.set_OrderFO)), (Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_2<SEOrder, OrderLine, AssemblyLine, SEPlant>.get_od), __typeref (VB\u0024AnonymousType_2<SEOrder, OrderLine, AssemblyLine, SEPlant>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (SEOrder.get_OrderFO)))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scOrderData.set_OrderJobName)), (Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_2<SEOrder, OrderLine, AssemblyLine, SEPlant>.get_od), __typeref (VB\u0024AnonymousType_2<SEOrder, OrderLine, AssemblyLine, SEPlant>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (SEOrder.get_OrderJobName)))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scOrderData.set_OrderLineId)), (Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_2<SEOrder, OrderLine, AssemblyLine, SEPlant>.get_ol), __typeref (VB\u0024AnonymousType_2<SEOrder, OrderLine, AssemblyLine, SEPlant>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (OrderLine.get_OrderLineId)))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scOrderData.set_OrderLineNum)), (Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_2<SEOrder, OrderLine, AssemblyLine, SEPlant>.get_ol), __typeref (VB\u0024AnonymousType_2<SEOrder, OrderLine, AssemblyLine, SEPlant>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (OrderLine.get_OrderLineNum)))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scOrderData.set_OrderLineSL)), (Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_2<SEOrder, OrderLine, AssemblyLine, SEPlant>.get_ol), __typeref (VB\u0024AnonymousType_2<SEOrder, OrderLine, AssemblyLine, SEPlant>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (OrderLine.get_OrderLineSL)))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scOrderData.set_OrderLineSS)), (Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_2<SEOrder, OrderLine, AssemblyLine, SEPlant>.get_ol), __typeref (VB\u0024AnonymousType_2<SEOrder, OrderLine, AssemblyLine, SEPlant>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (OrderLine.get_OrderLineSS)))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scOrderData.set_OrderLineTargetDt)), (Expression) Expression.Convert((Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_2<SEOrder, OrderLine, AssemblyLine, SEPlant>.get_ol), __typeref (VB\u0024AnonymousType_2<SEOrder, OrderLine, AssemblyLine, SEPlant>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (OrderLine.get_OrderLineTargetDt))), typeof (DateTime))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scOrderData.set_OrderLineShipDt)), (Expression) Expression.Convert((Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_2<SEOrder, OrderLine, AssemblyLine, SEPlant>.get_ol), __typeref (VB\u0024AnonymousType_2<SEOrder, OrderLine, AssemblyLine, SEPlant>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (OrderLine.get_OrderLineShipDt))), typeof (DateTime))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scOrderData.set_OrderLineAssyStartDt)), (Expression) Expression.Convert((Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_2<SEOrder, OrderLine, AssemblyLine, SEPlant>.get_ol), __typeref (VB\u0024AnonymousType_2<SEOrder, OrderLine, AssemblyLine, SEPlant>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (OrderLine.get_OrderLineAssyStartDt))), typeof (DateTime)))), new ParameterExpression[1]
          {
            parameterExpression2
          }));
          if (source != null && source.Count<scOrderData>() > 0)
            scOrderData = source.First<scOrderData>();
          se0085CtEntities1.Database.Connection.Close();
        }
      }
      return scOrderData;
    }

    public scOrderData rtnOrderDataByFOLineSLSS(string FOLineSLSS)
    {
      // ISSUE: object of a compiler-generated type is created
      // ISSUE: variable of a compiler-generated type
      clsEngineCTdB._Closure\u0024__20 closure20 = new clsEngineCTdB._Closure\u0024__20();
      // ISSUE: reference to a compiler-generated field
      closure20.\u0024VB\u0024Local_ldOrder = new scOrderData();
      // ISSUE: reference to a compiler-generated field
      closure20.\u0024VB\u0024Local_ldOrder.FactoryOrder = FOLineSLSS;
      using (SE0085CTEntities1 se0085CtEntities1 = new SE0085CTEntities1())
      {
        se0085CtEntities1.Database.Connection.ConnectionString = this._CTConnection;
        ParameterExpression parameterExpression;
        // ISSUE: method reference
        // ISSUE: reference to a compiler-generated field
        // ISSUE: method reference
        // ISSUE: reference to a compiler-generated field
        // ISSUE: method reference
        // ISSUE: reference to a compiler-generated field
        // ISSUE: method reference
        // ISSUE: reference to a compiler-generated field
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: type reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: type reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: type reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: type reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: type reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: type reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: type reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: type reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: type reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: type reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: type reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: type reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: type reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: type reference
        // ISSUE: method reference
        IQueryable<scOrderData> source = (IQueryable<scOrderData>) Queryable.Select(Queryable.Where((IQueryable<M0>) Queryable.Join((IQueryable<M0>) Queryable.Join((IQueryable<M0>) Queryable.Join((IQueryable<M0>) se0085CtEntities1.SEOrders, (IEnumerable<M1>) se0085CtEntities1.OrderLines, (Expression<Func<M0, M2>>) (od => od.OrderId), (Expression<Func<M1, M2>>) (ol => ol.SEOrder.OrderId), (Expression<Func<M0, M1, M3>>) ((od, ol) => new{ od = od, ol = ol })), (IEnumerable<M1>) se0085CtEntities1.AssemblyLines, (Expression<Func<M0, M2>>) (data => data.ol.AssemblyLine.AssemLineId), (Expression<Func<M1, M2>>) (al => al.AssemLineId), (Expression<Func<M0, M1, M3>>) ((data, al) => new
        {
          \u0024VB\u0024It1 = data,
          al = al
        })), (IEnumerable<M1>) se0085CtEntities1.SEPlants, (Expression<Func<M0, M2>>) (data => data.al.SEPlant.SEPlantId), (Expression<Func<M1, M2>>) (pl => pl.SEPlantId), (Expression<Func<M0, M1, M3>>) ((data, pl) => new
        {
          od = data.\u0024VB\u0024It1.od,
          ol = data.\u0024VB\u0024It1.ol,
          al = data.al,
          pl = pl
        })), (Expression<Func<M0, bool>>) (data => Expression.Call((Expression) null, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (Microsoft.VisualBasic.CompilerServices.Operators.CompareString)), data.od.OrderFO, closure20.\u0024VB\u0024Local_ldOrder.OrderFO, false) == 0 & Expression.Call((Expression) null, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (Microsoft.VisualBasic.CompilerServices.Operators.CompareString)), data.ol.OrderLineNum, closure20.\u0024VB\u0024Local_ldOrder.OrderLineNum, false) == 0 & Expression.Call((Expression) null, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (Microsoft.VisualBasic.CompilerServices.Operators.CompareString)), data.ol.OrderLineSL, closure20.\u0024VB\u0024Local_ldOrder.OrderLineSL, false) == 0 & Expression.Call((Expression) null, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (Microsoft.VisualBasic.CompilerServices.Operators.CompareString)), data.ol.OrderLineSS, closure20.\u0024VB\u0024Local_ldOrder.OrderLineSS, false) == 0)), (Expression<Func<M0, M1>>) Expression.Lambda<Func<VB\u0024AnonymousType_2<SEOrder, OrderLine, AssemblyLine, SEPlant>, scOrderData>>((Expression) Expression.MemberInit(Expression.New((ConstructorInfo) MethodBase.GetMethodFromHandle(__methodref (scOrderData.\u002Ector)), (Expression[]) null), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scOrderData.set_PlantId)), (Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_2<SEOrder, OrderLine, AssemblyLine, SEPlant>.get_pl), __typeref (VB\u0024AnonymousType_2<SEOrder, OrderLine, AssemblyLine, SEPlant>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (SEPlant.get_SEPlantId)))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scOrderData.set_AssemblyLineId)), (Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_2<SEOrder, OrderLine, AssemblyLine, SEPlant>.get_al), __typeref (VB\u0024AnonymousType_2<SEOrder, OrderLine, AssemblyLine, SEPlant>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (AssemblyLine.get_AssemLineId)))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scOrderData.set_AssemLineAbbrv)), (Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_2<SEOrder, OrderLine, AssemblyLine, SEPlant>.get_al), __typeref (VB\u0024AnonymousType_2<SEOrder, OrderLine, AssemblyLine, SEPlant>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (AssemblyLine.get_AssemLineAbbrv)))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scOrderData.set_OrderId)), (Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_2<SEOrder, OrderLine, AssemblyLine, SEPlant>.get_od), __typeref (VB\u0024AnonymousType_2<SEOrder, OrderLine, AssemblyLine, SEPlant>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (SEOrder.get_OrderId)))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scOrderData.set_OrderFO)), (Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_2<SEOrder, OrderLine, AssemblyLine, SEPlant>.get_od), __typeref (VB\u0024AnonymousType_2<SEOrder, OrderLine, AssemblyLine, SEPlant>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (SEOrder.get_OrderFO)))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scOrderData.set_OrderJobName)), (Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_2<SEOrder, OrderLine, AssemblyLine, SEPlant>.get_od), __typeref (VB\u0024AnonymousType_2<SEOrder, OrderLine, AssemblyLine, SEPlant>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (SEOrder.get_OrderJobName)))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scOrderData.set_OrderLineId)), (Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_2<SEOrder, OrderLine, AssemblyLine, SEPlant>.get_ol), __typeref (VB\u0024AnonymousType_2<SEOrder, OrderLine, AssemblyLine, SEPlant>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (OrderLine.get_OrderLineId)))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scOrderData.set_OrderLineNum)), (Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_2<SEOrder, OrderLine, AssemblyLine, SEPlant>.get_ol), __typeref (VB\u0024AnonymousType_2<SEOrder, OrderLine, AssemblyLine, SEPlant>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (OrderLine.get_OrderLineNum)))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scOrderData.set_OrderLineSL)), (Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_2<SEOrder, OrderLine, AssemblyLine, SEPlant>.get_ol), __typeref (VB\u0024AnonymousType_2<SEOrder, OrderLine, AssemblyLine, SEPlant>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (OrderLine.get_OrderLineSL)))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scOrderData.set_OrderLineSS)), (Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_2<SEOrder, OrderLine, AssemblyLine, SEPlant>.get_ol), __typeref (VB\u0024AnonymousType_2<SEOrder, OrderLine, AssemblyLine, SEPlant>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (OrderLine.get_OrderLineSS)))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scOrderData.set_OrderLineTargetDt)), (Expression) Expression.Convert((Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_2<SEOrder, OrderLine, AssemblyLine, SEPlant>.get_ol), __typeref (VB\u0024AnonymousType_2<SEOrder, OrderLine, AssemblyLine, SEPlant>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (OrderLine.get_OrderLineTargetDt))), typeof (DateTime))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scOrderData.set_OrderLineShipDt)), (Expression) Expression.Convert((Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_2<SEOrder, OrderLine, AssemblyLine, SEPlant>.get_ol), __typeref (VB\u0024AnonymousType_2<SEOrder, OrderLine, AssemblyLine, SEPlant>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (OrderLine.get_OrderLineShipDt))), typeof (DateTime))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scOrderData.set_OrderLineShippedbln)), (Expression) Expression.Convert((Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_2<SEOrder, OrderLine, AssemblyLine, SEPlant>.get_ol), __typeref (VB\u0024AnonymousType_2<SEOrder, OrderLine, AssemblyLine, SEPlant>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (OrderLine.get_OrderLineShipped))), typeof (bool))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scOrderData.set_OrderLineAssyStartDt)), (Expression) Expression.Convert((Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_2<SEOrder, OrderLine, AssemblyLine, SEPlant>.get_ol), __typeref (VB\u0024AnonymousType_2<SEOrder, OrderLine, AssemblyLine, SEPlant>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (OrderLine.get_OrderLineAssyStartDt))), typeof (DateTime)))), new ParameterExpression[1]
        {
          parameterExpression
        }));
        if (source != null)
        {
          if (source.Count<scOrderData>() > 0)
          {
            try
            {
              // ISSUE: reference to a compiler-generated field
              closure20.\u0024VB\u0024Local_ldOrder = source.First<scOrderData>();
            }
            catch (Exception ex)
            {
              ProjectData.SetProjectError(ex);
              // ISSUE: reference to a compiler-generated field
              closure20.\u0024VB\u0024Local_ldOrder = (scOrderData) null;
              ProjectData.ClearProjectError();
            }
          }
        }
        se0085CtEntities1.Database.Connection.Close();
      }
      // ISSUE: reference to a compiler-generated field
      return closure20.\u0024VB\u0024Local_ldOrder;
    }

    public scOrderLinesInfo rtnOrderLineData(string FOLineSLSS)
    {
      // ISSUE: object of a compiler-generated type is created
      // ISSUE: variable of a compiler-generated type
      clsEngineCTdB._Closure\u0024__21 closure21 = new clsEngineCTdB._Closure\u0024__21();
      // ISSUE: reference to a compiler-generated field
      closure21.\u0024VB\u0024Local_ldOrder = new scOrderData();
      // ISSUE: reference to a compiler-generated field
      closure21.\u0024VB\u0024Local_ldOrder.FactoryOrder = FOLineSLSS;
      scOrderLinesInfo scOrderLinesInfo = new scOrderLinesInfo();
      using (SE0085CTEntities1 se0085CtEntities1 = new SE0085CTEntities1())
      {
        se0085CtEntities1.Database.Connection.ConnectionString = this._CTConnection;
        ParameterExpression parameterExpression;
        // ISSUE: method reference
        // ISSUE: reference to a compiler-generated field
        // ISSUE: method reference
        // ISSUE: reference to a compiler-generated field
        // ISSUE: method reference
        // ISSUE: reference to a compiler-generated field
        // ISSUE: method reference
        // ISSUE: reference to a compiler-generated field
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: type reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: type reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: type reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: type reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: type reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: type reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: type reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: type reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: type reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: type reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: type reference
        // ISSUE: method reference
        IQueryable<scOrderLinesInfo> source = (IQueryable<scOrderLinesInfo>) Queryable.Select(Queryable.Where((IQueryable<M0>) Queryable.Join((IQueryable<M0>) Queryable.Join((IQueryable<M0>) Queryable.Join((IQueryable<M0>) se0085CtEntities1.SEOrders, (IEnumerable<M1>) se0085CtEntities1.OrderLines, (Expression<Func<M0, M2>>) (od => od.OrderId), (Expression<Func<M1, M2>>) (ol => ol.SEOrder.OrderId), (Expression<Func<M0, M1, M3>>) ((od, ol) => new{ od = od, ol = ol })), (IEnumerable<M1>) se0085CtEntities1.AssemblyLines, (Expression<Func<M0, M2>>) (data => data.ol.AssemblyLine.AssemLineId), (Expression<Func<M1, M2>>) (al => al.AssemLineId), (Expression<Func<M0, M1, M3>>) ((data, al) => new
        {
          \u0024VB\u0024It1 = data,
          al = al
        })), (IEnumerable<M1>) se0085CtEntities1.SEPlants, (Expression<Func<M0, M2>>) (data => data.al.SEPlant.SEPlantId), (Expression<Func<M1, M2>>) (pl => pl.SEPlantId), (Expression<Func<M0, M1, M3>>) ((data, pl) => new
        {
          od = data.\u0024VB\u0024It1.od,
          ol = data.\u0024VB\u0024It1.ol,
          al = data.al,
          pl = pl
        })), (Expression<Func<M0, bool>>) (data => Expression.Call((Expression) null, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (Microsoft.VisualBasic.CompilerServices.Operators.CompareString)), data.od.OrderFO, closure21.\u0024VB\u0024Local_ldOrder.OrderFO, false) == 0 & Expression.Call((Expression) null, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (Microsoft.VisualBasic.CompilerServices.Operators.CompareString)), data.ol.OrderLineNum, closure21.\u0024VB\u0024Local_ldOrder.OrderLineNum, false) == 0 & Expression.Call((Expression) null, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (Microsoft.VisualBasic.CompilerServices.Operators.CompareString)), data.ol.OrderLineSL, closure21.\u0024VB\u0024Local_ldOrder.OrderLineSL, false) == 0 & Expression.Call((Expression) null, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (Microsoft.VisualBasic.CompilerServices.Operators.CompareString)), data.ol.OrderLineSS, closure21.\u0024VB\u0024Local_ldOrder.OrderLineSS, false) == 0)), (Expression<Func<M0, M1>>) Expression.Lambda<Func<VB\u0024AnonymousType_2<SEOrder, OrderLine, AssemblyLine, SEPlant>, scOrderLinesInfo>>((Expression) Expression.MemberInit(Expression.New((ConstructorInfo) MethodBase.GetMethodFromHandle(__methodref (scOrderLinesInfo.\u002Ector)), (Expression[]) null), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scOrderLinesInfo.set_OrderLineId)), (Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_2<SEOrder, OrderLine, AssemblyLine, SEPlant>.get_ol), __typeref (VB\u0024AnonymousType_2<SEOrder, OrderLine, AssemblyLine, SEPlant>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (OrderLine.get_OrderLineId)))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scOrderLinesInfo.set_AssemblyLineId)), (Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_2<SEOrder, OrderLine, AssemblyLine, SEPlant>.get_al), __typeref (VB\u0024AnonymousType_2<SEOrder, OrderLine, AssemblyLine, SEPlant>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (AssemblyLine.get_AssemLineId)))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scOrderLinesInfo.set_OrderLineNum)), (Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_2<SEOrder, OrderLine, AssemblyLine, SEPlant>.get_ol), __typeref (VB\u0024AnonymousType_2<SEOrder, OrderLine, AssemblyLine, SEPlant>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (OrderLine.get_OrderLineNum)))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scOrderLinesInfo.set_OrderLineQty)), (Expression) Expression.ConvertChecked((Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_2<SEOrder, OrderLine, AssemblyLine, SEPlant>.get_ol), __typeref (VB\u0024AnonymousType_2<SEOrder, OrderLine, AssemblyLine, SEPlant>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (OrderLine.get_OrderLineQty))), typeof (int))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scOrderLinesInfo.set_OrderLineSS)), (Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_2<SEOrder, OrderLine, AssemblyLine, SEPlant>.get_ol), __typeref (VB\u0024AnonymousType_2<SEOrder, OrderLine, AssemblyLine, SEPlant>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (OrderLine.get_OrderLineSS)))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scOrderLinesInfo.set_OrderLineSL)), (Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_2<SEOrder, OrderLine, AssemblyLine, SEPlant>.get_ol), __typeref (VB\u0024AnonymousType_2<SEOrder, OrderLine, AssemblyLine, SEPlant>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (OrderLine.get_OrderLineSL)))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scOrderLinesInfo.set_OrderLineTargetDt)), (Expression) Expression.Convert((Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_2<SEOrder, OrderLine, AssemblyLine, SEPlant>.get_ol), __typeref (VB\u0024AnonymousType_2<SEOrder, OrderLine, AssemblyLine, SEPlant>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (OrderLine.get_OrderLineTargetDt))), typeof (DateTime))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scOrderLinesInfo.set_OrderLineShipDt)), (Expression) Expression.Convert((Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_2<SEOrder, OrderLine, AssemblyLine, SEPlant>.get_ol), __typeref (VB\u0024AnonymousType_2<SEOrder, OrderLine, AssemblyLine, SEPlant>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (OrderLine.get_OrderLineShipDt))), typeof (DateTime))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scOrderLinesInfo.set_OrderLineShippedDt)), (Expression) Expression.Convert((Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_2<SEOrder, OrderLine, AssemblyLine, SEPlant>.get_ol), __typeref (VB\u0024AnonymousType_2<SEOrder, OrderLine, AssemblyLine, SEPlant>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (OrderLine.get_OrderLineShippedDt))), typeof (DateTime))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scOrderLinesInfo.set_OrderLineShippedbln)), (Expression) Expression.Convert((Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_2<SEOrder, OrderLine, AssemblyLine, SEPlant>.get_ol), __typeref (VB\u0024AnonymousType_2<SEOrder, OrderLine, AssemblyLine, SEPlant>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (OrderLine.get_OrderLineShipped))), typeof (bool))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scOrderLinesInfo.set_OrderLineAssyStartDt)), (Expression) Expression.Convert((Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_2<SEOrder, OrderLine, AssemblyLine, SEPlant>.get_ol), __typeref (VB\u0024AnonymousType_2<SEOrder, OrderLine, AssemblyLine, SEPlant>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (OrderLine.get_OrderLineAssyStartDt))), typeof (DateTime)))), new ParameterExpression[1]
        {
          parameterExpression
        }));
        if (source != null)
        {
          if (source.Count<scOrderLinesInfo>() > 0)
          {
            try
            {
              scOrderLinesInfo = source.First<scOrderLinesInfo>();
            }
            catch (Exception ex)
            {
              ProjectData.SetProjectError(ex);
              scOrderLinesInfo = (scOrderLinesInfo) null;
              ProjectData.ClearProjectError();
            }
          }
        }
        se0085CtEntities1.Database.Connection.Close();
      }
      return scOrderLinesInfo;
    }

    public scOrderLinesInfo rtnOrderLineDataByPO(string ProdOrderNum)
    {
      // ISSUE: object of a compiler-generated type is created
      // ISSUE: variable of a compiler-generated type
      clsEngineCTdB._Closure\u0024__22 closure22 = new clsEngineCTdB._Closure\u0024__22();
      // ISSUE: reference to a compiler-generated field
      closure22.\u0024VB\u0024Local_ldOrder = new scOrdSectionsInfo();
      // ISSUE: reference to a compiler-generated field
      closure22.\u0024VB\u0024Local_ldOrder.OrdSectsProdNum = ProdOrderNum;
      scOrderLinesInfo scOrderLinesInfo = new scOrderLinesInfo();
      using (SE0085CTEntities1 se0085CtEntities1 = new SE0085CTEntities1())
      {
        se0085CtEntities1.Database.Connection.ConnectionString = this._CTConnection;
        ParameterExpression parameterExpression;
        // ISSUE: method reference
        // ISSUE: reference to a compiler-generated field
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: type reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: type reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: type reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: type reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: type reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: type reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: type reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: type reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: type reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: type reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: type reference
        // ISSUE: method reference
        IQueryable<scOrderLinesInfo> source = (IQueryable<scOrderLinesInfo>) Queryable.Select(Queryable.Where((IQueryable<M0>) Queryable.Join((IQueryable<M0>) Queryable.Join((IQueryable<M0>) Queryable.Join((IQueryable<M0>) Queryable.Join((IQueryable<M0>) se0085CtEntities1.SEOrders, (IEnumerable<M1>) se0085CtEntities1.OrderLines, (Expression<Func<M0, M2>>) (od => od.OrderId), (Expression<Func<M1, M2>>) (ol => ol.SEOrder.OrderId), (Expression<Func<M0, M1, M3>>) ((od, ol) => new{ od = od, ol = ol })), (IEnumerable<M1>) se0085CtEntities1.OrdSections, (Expression<Func<M0, M2>>) (data => data.ol.OrderLineId), (Expression<Func<M1, M2>>) (sc => sc.OrderLine.OrderLineId), (Expression<Func<M0, M1, M3>>) ((data, sc) => new
        {
          \u0024VB\u0024It1 = data,
          sc = sc
        })), (IEnumerable<M1>) se0085CtEntities1.AssemblyLines, (Expression<Func<M0, M2>>) (data => data.\u0024VB\u0024It1.ol.AssemblyLine.AssemLineId), (Expression<Func<M1, M2>>) (al => al.AssemLineId), (Expression<Func<M0, M1, M3>>) ((data, al) => new
        {
          \u0024VB\u0024It1 = data,
          al = al
        })), (IEnumerable<M1>) se0085CtEntities1.SEPlants, (Expression<Func<M0, M2>>) (data => data.al.SEPlant.SEPlantId), (Expression<Func<M1, M2>>) (pl => pl.SEPlantId), (Expression<Func<M0, M1, M3>>) ((data, pl) => new
        {
          od = data.\u0024VB\u0024It1.\u0024VB\u0024It1.od,
          ol = data.\u0024VB\u0024It1.\u0024VB\u0024It1.ol,
          sc = data.\u0024VB\u0024It1.sc,
          al = data.al,
          pl = pl
        })), (Expression<Func<M0, bool>>) (data => Expression.Call((Expression) null, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (Microsoft.VisualBasic.CompilerServices.Operators.CompareString)), data.sc.OrdSectsProdNum, closure22.\u0024VB\u0024Local_ldOrder.OrdSectsProdNum, false) == 0)), (Expression<Func<M0, M1>>) Expression.Lambda<Func<VB\u0024AnonymousType_9<SEOrder, OrderLine, OrdSection, AssemblyLine, SEPlant>, scOrderLinesInfo>>((Expression) Expression.MemberInit(Expression.New((ConstructorInfo) MethodBase.GetMethodFromHandle(__methodref (scOrderLinesInfo.\u002Ector)), (Expression[]) null), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scOrderLinesInfo.set_OrderLineId)), (Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_9<SEOrder, OrderLine, OrdSection, AssemblyLine, SEPlant>.get_ol), __typeref (VB\u0024AnonymousType_9<SEOrder, OrderLine, OrdSection, AssemblyLine, SEPlant>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (OrderLine.get_OrderLineId)))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scOrderLinesInfo.set_AssemblyLineId)), (Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_9<SEOrder, OrderLine, OrdSection, AssemblyLine, SEPlant>.get_al), __typeref (VB\u0024AnonymousType_9<SEOrder, OrderLine, OrdSection, AssemblyLine, SEPlant>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (AssemblyLine.get_AssemLineId)))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scOrderLinesInfo.set_OrderLineNum)), (Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_9<SEOrder, OrderLine, OrdSection, AssemblyLine, SEPlant>.get_ol), __typeref (VB\u0024AnonymousType_9<SEOrder, OrderLine, OrdSection, AssemblyLine, SEPlant>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (OrderLine.get_OrderLineNum)))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scOrderLinesInfo.set_OrderLineQty)), (Expression) Expression.ConvertChecked((Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_9<SEOrder, OrderLine, OrdSection, AssemblyLine, SEPlant>.get_ol), __typeref (VB\u0024AnonymousType_9<SEOrder, OrderLine, OrdSection, AssemblyLine, SEPlant>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (OrderLine.get_OrderLineQty))), typeof (int))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scOrderLinesInfo.set_OrderLineSS)), (Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_9<SEOrder, OrderLine, OrdSection, AssemblyLine, SEPlant>.get_ol), __typeref (VB\u0024AnonymousType_9<SEOrder, OrderLine, OrdSection, AssemblyLine, SEPlant>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (OrderLine.get_OrderLineSS)))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scOrderLinesInfo.set_OrderLineSL)), (Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_9<SEOrder, OrderLine, OrdSection, AssemblyLine, SEPlant>.get_ol), __typeref (VB\u0024AnonymousType_9<SEOrder, OrderLine, OrdSection, AssemblyLine, SEPlant>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (OrderLine.get_OrderLineSL)))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scOrderLinesInfo.set_OrderLineTargetDt)), (Expression) Expression.Convert((Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_9<SEOrder, OrderLine, OrdSection, AssemblyLine, SEPlant>.get_ol), __typeref (VB\u0024AnonymousType_9<SEOrder, OrderLine, OrdSection, AssemblyLine, SEPlant>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (OrderLine.get_OrderLineTargetDt))), typeof (DateTime))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scOrderLinesInfo.set_OrderLineShipDt)), (Expression) Expression.Convert((Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_9<SEOrder, OrderLine, OrdSection, AssemblyLine, SEPlant>.get_ol), __typeref (VB\u0024AnonymousType_9<SEOrder, OrderLine, OrdSection, AssemblyLine, SEPlant>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (OrderLine.get_OrderLineShipDt))), typeof (DateTime))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scOrderLinesInfo.set_OrderLineShippedDt)), (Expression) Expression.Convert((Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_9<SEOrder, OrderLine, OrdSection, AssemblyLine, SEPlant>.get_ol), __typeref (VB\u0024AnonymousType_9<SEOrder, OrderLine, OrdSection, AssemblyLine, SEPlant>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (OrderLine.get_OrderLineShippedDt))), typeof (DateTime))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scOrderLinesInfo.set_OrderLineShippedbln)), (Expression) Expression.Convert((Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_9<SEOrder, OrderLine, OrdSection, AssemblyLine, SEPlant>.get_ol), __typeref (VB\u0024AnonymousType_9<SEOrder, OrderLine, OrdSection, AssemblyLine, SEPlant>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (OrderLine.get_OrderLineShipped))), typeof (bool))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scOrderLinesInfo.set_OrderLineAssyStartDt)), (Expression) Expression.Convert((Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_9<SEOrder, OrderLine, OrdSection, AssemblyLine, SEPlant>.get_ol), __typeref (VB\u0024AnonymousType_9<SEOrder, OrderLine, OrdSection, AssemblyLine, SEPlant>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (OrderLine.get_OrderLineAssyStartDt))), typeof (DateTime)))), new ParameterExpression[1]
        {
          parameterExpression
        }));
        if (source != null && source.Count<scOrderLinesInfo>() > 0)
          scOrderLinesInfo = source.First<scOrderLinesInfo>();
        se0085CtEntities1.Database.Connection.Close();
      }
      return scOrderLinesInfo;
    }

    public TimeSpan rtnOrderStatusByPO(string ProdOrderNum)
    {
      // ISSUE: object of a compiler-generated type is created
      // ISSUE: variable of a compiler-generated type
      clsEngineCTdB._Closure\u0024__23 closure23 = new clsEngineCTdB._Closure\u0024__23();
      // ISSUE: reference to a compiler-generated field
      closure23.\u0024VB\u0024Local_ldOrder = new scOrdSectionsInfo();
      // ISSUE: reference to a compiler-generated field
      closure23.\u0024VB\u0024Local_ldOrder.OrdSectsProdNum = ProdOrderNum;
      TimeSpan timeSpan;
      using (SE0085CTEntities1 se0085CtEntities1 = new SE0085CTEntities1())
      {
        se0085CtEntities1.Database.Connection.ConnectionString = this._CTConnection;
        // ISSUE: method reference
        // ISSUE: reference to a compiler-generated field
        IQueryable<DateTime?> source = (IQueryable<DateTime?>) Queryable.Select(Queryable.Where((IQueryable<M0>) Queryable.Join((IQueryable<M0>) se0085CtEntities1.OrderLines, (IEnumerable<M1>) se0085CtEntities1.OrdSections, (Expression<Func<M0, M2>>) (ol => ol.OrderLineId), (Expression<Func<M1, M2>>) (sc => sc.OrderLine.OrderLineId), (Expression<Func<M0, M1, M3>>) ((ol, sc) => new{ ol = ol, sc = sc })), (Expression<Func<M0, bool>>) (data => Expression.Call((Expression) null, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (Microsoft.VisualBasic.CompilerServices.Operators.CompareString)), data.sc.OrdSectsProdNum, closure23.\u0024VB\u0024Local_ldOrder.OrdSectsProdNum, false) == 0)), (Expression<Func<M0, M1>>) (data => data.ol.OrderLineAssyStartDt));
        if (source != null && source.Count<DateTime?>() > 0)
        {
          DateTime? nullable = source.First<DateTime?>();
          int num1 = nullable.HasValue ? 1 : 0;
          DateTime? now = (DateTime?) DateTime.Now;
          int num2 = now.HasValue ? 1 : 0;
          timeSpan = (TimeSpan) ((num1 & num2) != 0 ? new TimeSpan?(nullable.GetValueOrDefault() - now.GetValueOrDefault()) : new TimeSpan?());
        }
        se0085CtEntities1.Database.Connection.Close();
      }
      return timeSpan;
    }

    public TimeSpan rtnOrdWOStStatusByPO(string ProdOrderNum, string WorkCenter, bool CompareTimeNow = true)
    {
      // ISSUE: object of a compiler-generated type is created
      // ISSUE: variable of a compiler-generated type
      clsEngineCTdB._Closure\u0024__24 closure24 = new clsEngineCTdB._Closure\u0024__24();
      // ISSUE: reference to a compiler-generated field
      closure24.\u0024VB\u0024Local_WorkCenter = WorkCenter;
      // ISSUE: reference to a compiler-generated field
      closure24.\u0024VB\u0024Local_ldOrder = new scOrdSectionsInfo();
      // ISSUE: reference to a compiler-generated field
      closure24.\u0024VB\u0024Local_ldOrder.OrdSectsProdNum = ProdOrderNum;
      TimeSpan timeSpan;
      using (SE0085CTEntities1 se0085CtEntities1 = new SE0085CTEntities1())
      {
        se0085CtEntities1.Database.Connection.ConnectionString = this._CTConnection;
        // ISSUE: method reference
        // ISSUE: reference to a compiler-generated field
        // ISSUE: method reference
        // ISSUE: reference to a compiler-generated field
        IQueryable<VB\u0024AnonymousType_12<DateTime?, DateTime?>> source = Queryable.Select(Queryable.Where((IQueryable<M0>) Queryable.Join((IQueryable<M0>) Queryable.Join((IQueryable<M0>) se0085CtEntities1.OrderLines, (IEnumerable<M1>) se0085CtEntities1.OrdSections, (Expression<Func<M0, M2>>) (ol => ol.OrderLineId), (Expression<Func<M1, M2>>) (sc => sc.OrderLine.OrderLineId), (Expression<Func<M0, M1, M3>>) ((ol, sc) => new{ ol = ol, sc = sc })), (IEnumerable<M1>) se0085CtEntities1.SectionsRoutings, (Expression<Func<M0, M2>>) (data => data.sc.OrdSectsId), (Expression<Func<M1, M2>>) (rt => rt.OrdSection.OrdSectsId), (Expression<Func<M0, M1, M3>>) ((data, rt) => new
        {
          ol = data.ol,
          sc = data.sc,
          rt = rt
        })), (Expression<Func<M0, bool>>) (data => Expression.Call((Expression) null, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (Microsoft.VisualBasic.CompilerServices.Operators.CompareString)), data.sc.OrdSectsProdNum, closure24.\u0024VB\u0024Local_ldOrder.OrdSectsProdNum, false) == 0 & Expression.Call((Expression) null, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (Microsoft.VisualBasic.CompilerServices.Operators.CompareString)), data.rt.RoutingWorkCenter, closure24.\u0024VB\u0024Local_WorkCenter, false) == 0)), (Expression<Func<M0, M1>>) (data => new
        {
          RoutingSchStartDt = data.rt.RoutingSchStartDt,
          RoutingActStartDt = data.rt.RoutingActStartDt
        }));
        if (source != null && source.Count() > 0)
        {
          if (CompareTimeNow)
          {
            DateTime? routingSchStartDt = source.First().RoutingSchStartDt;
            int num1 = routingSchStartDt.HasValue ? 1 : 0;
            DateTime? now = (DateTime?) DateTime.Now;
            int num2 = now.HasValue ? 1 : 0;
            timeSpan = (TimeSpan) ((num1 & num2) != 0 ? new TimeSpan?(routingSchStartDt.GetValueOrDefault() - now.GetValueOrDefault()) : new TimeSpan?());
          }
          else
          {
            DateTime? routingSchStartDt = source.First().RoutingSchStartDt;
            int num1 = routingSchStartDt.HasValue ? 1 : 0;
            DateTime? routingActStartDt = source.First().RoutingActStartDt;
            int num2 = routingActStartDt.HasValue ? 1 : 0;
            timeSpan = (TimeSpan) ((num1 & num2) != 0 ? new TimeSpan?(routingSchStartDt.GetValueOrDefault() - routingActStartDt.GetValueOrDefault()) : new TimeSpan?());
          }
        }
        se0085CtEntities1.Database.Connection.Close();
      }
      return timeSpan;
    }

    public TimeSpan rtnOrdWOFnStatusByPO(string ProdOrderNum, string WorkCenter, bool CompareTimeNow = true)
    {
      // ISSUE: object of a compiler-generated type is created
      // ISSUE: variable of a compiler-generated type
      clsEngineCTdB._Closure\u0024__25 closure25 = new clsEngineCTdB._Closure\u0024__25();
      // ISSUE: reference to a compiler-generated field
      closure25.\u0024VB\u0024Local_WorkCenter = WorkCenter;
      // ISSUE: reference to a compiler-generated field
      closure25.\u0024VB\u0024Local_ldOrder = new scOrdSectionsInfo();
      // ISSUE: reference to a compiler-generated field
      closure25.\u0024VB\u0024Local_ldOrder.OrdSectsProdNum = ProdOrderNum;
      TimeSpan timeSpan;
      using (SE0085CTEntities1 se0085CtEntities1 = new SE0085CTEntities1())
      {
        se0085CtEntities1.Database.Connection.ConnectionString = this._CTConnection;
        // ISSUE: method reference
        // ISSUE: reference to a compiler-generated field
        // ISSUE: method reference
        // ISSUE: reference to a compiler-generated field
        IQueryable<VB\u0024AnonymousType_13<DateTime?, DateTime?>> source = Queryable.Select(Queryable.Where((IQueryable<M0>) Queryable.Join((IQueryable<M0>) Queryable.Join((IQueryable<M0>) se0085CtEntities1.OrderLines, (IEnumerable<M1>) se0085CtEntities1.OrdSections, (Expression<Func<M0, M2>>) (ol => ol.OrderLineId), (Expression<Func<M1, M2>>) (sc => sc.OrderLine.OrderLineId), (Expression<Func<M0, M1, M3>>) ((ol, sc) => new{ ol = ol, sc = sc })), (IEnumerable<M1>) se0085CtEntities1.SectionsRoutings, (Expression<Func<M0, M2>>) (data => data.sc.OrdSectsId), (Expression<Func<M1, M2>>) (rt => rt.OrdSection.OrdSectsId), (Expression<Func<M0, M1, M3>>) ((data, rt) => new
        {
          ol = data.ol,
          sc = data.sc,
          rt = rt
        })), (Expression<Func<M0, bool>>) (data => Expression.Call((Expression) null, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (Microsoft.VisualBasic.CompilerServices.Operators.CompareString)), data.sc.OrdSectsProdNum, closure25.\u0024VB\u0024Local_ldOrder.OrdSectsProdNum, false) == 0 & Expression.Call((Expression) null, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (Microsoft.VisualBasic.CompilerServices.Operators.CompareString)), data.rt.RoutingWorkCenter, closure25.\u0024VB\u0024Local_WorkCenter, false) == 0)), (Expression<Func<M0, M1>>) (data => new
        {
          RoutingSchFinishDt = data.rt.RoutingSchFinishDt,
          RoutingActFinishDt = data.rt.RoutingActFinishDt
        }));
        if (source != null && source.Count() > 0)
        {
          if (CompareTimeNow)
          {
            DateTime? routingSchFinishDt = source.First().RoutingSchFinishDt;
            int num1 = routingSchFinishDt.HasValue ? 1 : 0;
            DateTime? now = (DateTime?) DateTime.Now;
            int num2 = now.HasValue ? 1 : 0;
            timeSpan = (TimeSpan) ((num1 & num2) != 0 ? new TimeSpan?(routingSchFinishDt.GetValueOrDefault() - now.GetValueOrDefault()) : new TimeSpan?());
          }
          else
          {
            DateTime? routingSchFinishDt = source.First().RoutingSchFinishDt;
            int num1 = routingSchFinishDt.HasValue ? 1 : 0;
            DateTime? routingActFinishDt = source.First().RoutingActFinishDt;
            int num2 = routingActFinishDt.HasValue ? 1 : 0;
            timeSpan = (TimeSpan) ((num1 & num2) != 0 ? new TimeSpan?(routingSchFinishDt.GetValueOrDefault() - routingActFinishDt.GetValueOrDefault()) : new TimeSpan?());
          }
        }
        se0085CtEntities1.Database.Connection.Close();
      }
      return timeSpan;
    }

    public TimeSpan rtnOrdWOTime2ShipStatusByPO(string ProdOrderNum, bool CompareTimeNow = true)
    {
      // ISSUE: object of a compiler-generated type is created
      // ISSUE: variable of a compiler-generated type
      clsEngineCTdB._Closure\u0024__26 closure26 = new clsEngineCTdB._Closure\u0024__26();
      // ISSUE: reference to a compiler-generated field
      closure26.\u0024VB\u0024Local_ldOrder = new scOrdSectionsInfo();
      // ISSUE: reference to a compiler-generated field
      closure26.\u0024VB\u0024Local_ldOrder.OrdSectsProdNum = ProdOrderNum;
      TimeSpan timeSpan;
      using (SE0085CTEntities1 se0085CtEntities1 = new SE0085CTEntities1())
      {
        se0085CtEntities1.Database.Connection.ConnectionString = this._CTConnection;
        // ISSUE: method reference
        // ISSUE: reference to a compiler-generated field
        IQueryable<DateTime?> source = (IQueryable<DateTime?>) Queryable.Select(Queryable.Where((IQueryable<M0>) Queryable.Join((IQueryable<M0>) se0085CtEntities1.OrderLines, (IEnumerable<M1>) se0085CtEntities1.OrdSections, (Expression<Func<M0, M2>>) (ol => ol.OrderLineId), (Expression<Func<M1, M2>>) (sc => sc.OrderLine.OrderLineId), (Expression<Func<M0, M1, M3>>) ((ol, sc) => new{ ol = ol, sc = sc })), (Expression<Func<M0, bool>>) (data => Expression.Call((Expression) null, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (Microsoft.VisualBasic.CompilerServices.Operators.CompareString)), data.sc.OrdSectsProdNum, closure26.\u0024VB\u0024Local_ldOrder.OrdSectsProdNum, false) == 0)), (Expression<Func<M0, M1>>) (data => data.ol.OrderLineShipDt));
        if (source != null && source.Count<DateTime?>() > 0 && CompareTimeNow)
        {
          DateTime? nullable = source.First<DateTime?>();
          int num1 = nullable.HasValue ? 1 : 0;
          DateTime? now = (DateTime?) DateTime.Now;
          int num2 = now.HasValue ? 1 : 0;
          timeSpan = (TimeSpan) ((num1 & num2) != 0 ? new TimeSpan?(nullable.GetValueOrDefault() - now.GetValueOrDefault()) : new TimeSpan?());
        }
        se0085CtEntities1.Database.Connection.Close();
      }
      return timeSpan;
    }

    public scOrdSectionsInfo rtnOrderSectsDataByFO(string FOLineSLSS, int SectsNum)
    {
      // ISSUE: object of a compiler-generated type is created
      // ISSUE: variable of a compiler-generated type
      clsEngineCTdB._Closure\u0024__27 closure27 = new clsEngineCTdB._Closure\u0024__27();
      // ISSUE: reference to a compiler-generated field
      closure27.\u0024VB\u0024Local_SectsNum = SectsNum;
      // ISSUE: reference to a compiler-generated field
      closure27.\u0024VB\u0024Local_ldOrder = new scOrderData();
      // ISSUE: reference to a compiler-generated field
      closure27.\u0024VB\u0024Local_ldOrder.FactoryOrder = FOLineSLSS;
      scOrdSectionsInfo scOrdSectionsInfo = new scOrdSectionsInfo();
      using (SE0085CTEntities1 se0085CtEntities1 = new SE0085CTEntities1())
      {
        se0085CtEntities1.Database.Connection.ConnectionString = this._CTConnection;
        ParameterExpression parameterExpression1;
        ParameterExpression parameterExpression2;
        // ISSUE: method reference
        // ISSUE: reference to a compiler-generated field
        // ISSUE: method reference
        // ISSUE: reference to a compiler-generated field
        // ISSUE: method reference
        // ISSUE: reference to a compiler-generated field
        // ISSUE: method reference
        // ISSUE: reference to a compiler-generated field
        // ISSUE: reference to a compiler-generated field
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: type reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: type reference
        // ISSUE: method reference
        IQueryable<scOrdSectionsInfo> source = (IQueryable<scOrdSectionsInfo>) Queryable.Select(Queryable.Where((IQueryable<M0>) Queryable.Join((IQueryable<M0>) Queryable.Join((IQueryable<M0>) Queryable.Join((IQueryable<M0>) Queryable.Join((IQueryable<M0>) se0085CtEntities1.SEOrders, (IEnumerable<M1>) se0085CtEntities1.OrderLines, (Expression<Func<M0, M2>>) (od => od.OrderId), (Expression<Func<M1, M2>>) (ol => ol.SEOrder.OrderId), (Expression<Func<M0, M1, M3>>) ((od, ol) => new{ od = od, ol = ol })), (IEnumerable<M1>) se0085CtEntities1.OrdSections, (Expression<Func<M0, M2>>) (data => data.ol.OrderLineId), (Expression<Func<M1, M2>>) (os => os.OrderLine.OrderLineId), (Expression<Func<M0, M1, M3>>) ((data, os) => new
        {
          \u0024VB\u0024It1 = data,
          os = os
        })), (IEnumerable<M1>) se0085CtEntities1.AssemblyLines, (Expression<Func<M0, M2>>) (data => data.\u0024VB\u0024It1.ol.AssemblyLine.AssemLineId), (Expression<Func<M1, M2>>) (al => al.AssemLineId), (Expression<Func<M0, M1, M3>>) ((data, al) => new
        {
          \u0024VB\u0024It1 = data,
          al = al
        })), (IEnumerable<M1>) se0085CtEntities1.SEPlants, (Expression<Func<M0, M2>>) (data => data.al.SEPlant.SEPlantId), (Expression<Func<M1, M2>>) (pl => pl.SEPlantId), (Expression<Func<M0, M1, M3>>) ((data, pl) => new
        {
          od = data.\u0024VB\u0024It1.\u0024VB\u0024It1.od,
          ol = data.\u0024VB\u0024It1.\u0024VB\u0024It1.ol,
          os = data.\u0024VB\u0024It1.os,
          al = data.al,
          pl = pl
        })), (Expression<Func<M0, bool>>) Expression.Lambda<Func<VB\u0024AnonymousType_15<SEOrder, OrderLine, OrdSection, AssemblyLine, SEPlant>, bool>>((Expression) Expression.And(Expression.Call((Expression) null, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (Microsoft.VisualBasic.CompilerServices.Operators.CompareString)), \u0024VB\u0024It.od.OrderFO, closure27.\u0024VB\u0024Local_ldOrder.OrderFO, false) == 0 & Expression.Call((Expression) null, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (Microsoft.VisualBasic.CompilerServices.Operators.CompareString)), \u0024VB\u0024It.ol.OrderLineNum, closure27.\u0024VB\u0024Local_ldOrder.OrderLineNum, false) == 0 & Expression.Call((Expression) null, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (Microsoft.VisualBasic.CompilerServices.Operators.CompareString)), \u0024VB\u0024It.ol.OrderLineSL, closure27.\u0024VB\u0024Local_ldOrder.OrderLineSL, false) == 0 & Expression.Call((Expression) null, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (Microsoft.VisualBasic.CompilerServices.Operators.CompareString)), \u0024VB\u0024It.ol.OrderLineSS, closure27.\u0024VB\u0024Local_ldOrder.OrderLineSS, false) == 0, (Expression) Expression.Equal(\u0024VB\u0024It.os.OrdSectsNum, closure27.\u0024VB\u0024Local_SectsNum, true, (MethodInfo) null)), new ParameterExpression[1]
        {
          parameterExpression1
        })), (Expression<Func<M0, M1>>) Expression.Lambda<Func<VB\u0024AnonymousType_15<SEOrder, OrderLine, OrdSection, AssemblyLine, SEPlant>, scOrdSectionsInfo>>((Expression) Expression.MemberInit(Expression.New((ConstructorInfo) MethodBase.GetMethodFromHandle(__methodref (scOrdSectionsInfo.\u002Ector)), (Expression[]) null), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scOrdSectionsInfo.set_OrdSectsId)), (Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_15<SEOrder, OrderLine, OrdSection, AssemblyLine, SEPlant>.get_os), __typeref (VB\u0024AnonymousType_15<SEOrder, OrderLine, OrdSection, AssemblyLine, SEPlant>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (OrdSection.get_OrdSectsId)))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scOrdSectionsInfo.set_OrdSectsNum)), (Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_15<SEOrder, OrderLine, OrdSection, AssemblyLine, SEPlant>.get_os), __typeref (VB\u0024AnonymousType_15<SEOrder, OrderLine, OrdSection, AssemblyLine, SEPlant>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (OrdSection.get_OrdSectsNum))))), new ParameterExpression[1]
        {
          parameterExpression2
        }));
        if (source != null && source.Count<scOrdSectionsInfo>() > 0)
          scOrdSectionsInfo = source.First<scOrdSectionsInfo>();
        se0085CtEntities1.Database.Connection.Close();
      }
      return scOrdSectionsInfo;
    }

    public List<scOrdSectionData> rtnOrderSectsDataByLineId(int OrderLineId)
    {
      // ISSUE: object of a compiler-generated type is created
      // ISSUE: variable of a compiler-generated type
      clsEngineCTdB._Closure\u0024__28 closure28 = new clsEngineCTdB._Closure\u0024__28();
      // ISSUE: reference to a compiler-generated field
      closure28.\u0024VB\u0024Local_OrderLineId = OrderLineId;
      List<scOrdSectionData> scOrdSectionDataList = new List<scOrdSectionData>();
      using (SE0085CTEntities1 se0085CtEntities1 = new SE0085CTEntities1())
      {
        se0085CtEntities1.Database.Connection.ConnectionString = this._CTConnection;
        ParameterExpression parameterExpression1;
        ParameterExpression parameterExpression2;
        // ISSUE: reference to a compiler-generated field
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: type reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: type reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: type reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: type reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: type reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: type reference
        // ISSUE: method reference
        IQueryable<scOrdSectionData> source = (IQueryable<scOrdSectionData>) Queryable.Select(Queryable.Where((IQueryable<M0>) Queryable.Join((IQueryable<M0>) Queryable.Join((IQueryable<M0>) Queryable.Join((IQueryable<M0>) Queryable.Join((IQueryable<M0>) se0085CtEntities1.SEOrders, (IEnumerable<M1>) se0085CtEntities1.OrderLines, (Expression<Func<M0, M2>>) (od => od.OrderId), (Expression<Func<M1, M2>>) (ol => ol.SEOrder.OrderId), (Expression<Func<M0, M1, M3>>) ((od, ol) => new{ od = od, ol = ol })), (IEnumerable<M1>) se0085CtEntities1.OrdSections, (Expression<Func<M0, M2>>) (data => data.ol.OrderLineId), (Expression<Func<M1, M2>>) (os => os.OrderLine.OrderLineId), (Expression<Func<M0, M1, M3>>) ((data, os) => new
        {
          \u0024VB\u0024It1 = data,
          os = os
        })), (IEnumerable<M1>) se0085CtEntities1.AssemblyLines, (Expression<Func<M0, M2>>) (data => data.\u0024VB\u0024It1.ol.AssemblyLine.AssemLineId), (Expression<Func<M1, M2>>) (al => al.AssemLineId), (Expression<Func<M0, M1, M3>>) ((data, al) => new
        {
          \u0024VB\u0024It1 = data,
          al = al
        })), (IEnumerable<M1>) se0085CtEntities1.SEPlants, (Expression<Func<M0, M2>>) (data => data.al.SEPlant.SEPlantId), (Expression<Func<M1, M2>>) (pl => pl.SEPlantId), (Expression<Func<M0, M1, M3>>) ((data, pl) => new
        {
          od = data.\u0024VB\u0024It1.\u0024VB\u0024It1.od,
          ol = data.\u0024VB\u0024It1.\u0024VB\u0024It1.ol,
          os = data.\u0024VB\u0024It1.os,
          al = data.al,
          pl = pl
        })), (Expression<Func<M0, bool>>) Expression.Lambda<Func<VB\u0024AnonymousType_15<SEOrder, OrderLine, OrdSection, AssemblyLine, SEPlant>, bool>>((Expression) Expression.Equal(\u0024VB\u0024It.ol.OrderLineId, closure28.\u0024VB\u0024Local_OrderLineId, true, (MethodInfo) null), new ParameterExpression[1]
        {
          parameterExpression1
        })), (Expression<Func<M0, M1>>) Expression.Lambda<Func<VB\u0024AnonymousType_15<SEOrder, OrderLine, OrdSection, AssemblyLine, SEPlant>, scOrdSectionData>>((Expression) Expression.MemberInit(Expression.New((ConstructorInfo) MethodBase.GetMethodFromHandle(__methodref (scOrdSectionData.\u002Ector)), (Expression[]) null), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scOrdSectionData.set_OrdSectsId)), (Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_15<SEOrder, OrderLine, OrdSection, AssemblyLine, SEPlant>.get_os), __typeref (VB\u0024AnonymousType_15<SEOrder, OrderLine, OrdSection, AssemblyLine, SEPlant>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (OrdSection.get_OrdSectsId)))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scOrdSectionData.set_OrdSectsNum)), (Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_15<SEOrder, OrderLine, OrdSection, AssemblyLine, SEPlant>.get_os), __typeref (VB\u0024AnonymousType_15<SEOrder, OrderLine, OrdSection, AssemblyLine, SEPlant>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (OrdSection.get_OrdSectsNum)))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scOrdSectionData.set_OrdSectsProdNum)), (Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_15<SEOrder, OrderLine, OrdSection, AssemblyLine, SEPlant>.get_os), __typeref (VB\u0024AnonymousType_15<SEOrder, OrderLine, OrdSection, AssemblyLine, SEPlant>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (OrdSection.get_OrdSectsProdNum)))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scOrdSectionData.set_OrdSectsCryptRt)), (Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_15<SEOrder, OrderLine, OrdSection, AssemblyLine, SEPlant>.get_os), __typeref (VB\u0024AnonymousType_15<SEOrder, OrderLine, OrdSection, AssemblyLine, SEPlant>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (OrdSection.get_OrdSectsCryptRt)))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scOrdSectionData.set_OrdSectsCurrWorkCtr)), (Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_15<SEOrder, OrderLine, OrdSection, AssemblyLine, SEPlant>.get_os), __typeref (VB\u0024AnonymousType_15<SEOrder, OrderLine, OrdSection, AssemblyLine, SEPlant>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (OrdSection.get_OrdSectsCurrWorkCtr)))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scOrdSectionData.set_OrdSectsRelMfg)), (Expression) Expression.Convert((Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_15<SEOrder, OrderLine, OrdSection, AssemblyLine, SEPlant>.get_os), __typeref (VB\u0024AnonymousType_15<SEOrder, OrderLine, OrdSection, AssemblyLine, SEPlant>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (OrdSection.get_OrdSectsRelMfg))), typeof (DateTime)))), new ParameterExpression[1]
        {
          parameterExpression2
        }));
        if (source != null && source.Count<scOrdSectionData>() > 0)
          scOrdSectionDataList = source.ToList<scOrdSectionData>();
        se0085CtEntities1.Database.Connection.Close();
      }
      return scOrdSectionDataList;
    }

    public scOrdSectionsInfo rtnOrderSectsDataById(int OrdSectsId)
    {
      // ISSUE: object of a compiler-generated type is created
      // ISSUE: variable of a compiler-generated type
      clsEngineCTdB._Closure\u0024__29 closure29 = new clsEngineCTdB._Closure\u0024__29();
      // ISSUE: reference to a compiler-generated field
      closure29.\u0024VB\u0024Local_OrdSectsId = OrdSectsId;
      scOrdSectionsInfo scOrdSectionsInfo = new scOrdSectionsInfo();
      using (SE0085CTEntities1 se0085CtEntities1 = new SE0085CTEntities1())
      {
        se0085CtEntities1.Database.Connection.ConnectionString = this._CTConnection;
        ParameterExpression parameterExpression1;
        ParameterExpression parameterExpression2;
        // ISSUE: reference to a compiler-generated field
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: method reference
        IQueryable<scOrdSectionsInfo> source = (IQueryable<scOrdSectionsInfo>) Queryable.Select<OrdSection, scOrdSectionsInfo>(Queryable.Where<OrdSection>((IQueryable<M0>) se0085CtEntities1.OrdSections, (Expression<Func<M0, bool>>) Expression.Lambda<Func<OrdSection, bool>>((Expression) Expression.Equal(os.OrdSectsId, closure29.\u0024VB\u0024Local_OrdSectsId, true, (MethodInfo) null), new ParameterExpression[1]
        {
          parameterExpression1
        })), (Expression<Func<M0, M1>>) Expression.Lambda<Func<OrdSection, scOrdSectionsInfo>>((Expression) Expression.MemberInit(Expression.New((ConstructorInfo) MethodBase.GetMethodFromHandle(__methodref (scOrdSectionsInfo.\u002Ector)), (Expression[]) null), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scOrdSectionsInfo.set_OrdSectsId)), (Expression) Expression.Property((Expression) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (OrdSection.get_OrdSectsId)))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scOrdSectionsInfo.set_OrdSectsNum)), (Expression) Expression.Property((Expression) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (OrdSection.get_OrdSectsNum))))), new ParameterExpression[1]
        {
          parameterExpression2
        }));
        if (source != null && source.Count<scOrdSectionsInfo>() > 0)
          scOrdSectionsInfo = source.First<scOrdSectionsInfo>();
        se0085CtEntities1.Database.Connection.Close();
      }
      return scOrdSectionsInfo;
    }

    public short rtnOrderSectsCntByFO(string FOLineSLSS)
    {
      // ISSUE: object of a compiler-generated type is created
      // ISSUE: variable of a compiler-generated type
      clsEngineCTdB._Closure\u0024__30 closure30 = new clsEngineCTdB._Closure\u0024__30();
      // ISSUE: reference to a compiler-generated field
      closure30.\u0024VB\u0024Local_ldOrder = new scOrderData();
      // ISSUE: reference to a compiler-generated field
      closure30.\u0024VB\u0024Local_ldOrder.FactoryOrder = FOLineSLSS;
      int num = 0;
      using (SE0085CTEntities1 se0085CtEntities1 = new SE0085CTEntities1())
      {
        se0085CtEntities1.Database.Connection.ConnectionString = this._CTConnection;
        ParameterExpression parameterExpression;
        // ISSUE: method reference
        // ISSUE: reference to a compiler-generated field
        // ISSUE: method reference
        // ISSUE: reference to a compiler-generated field
        // ISSUE: method reference
        // ISSUE: reference to a compiler-generated field
        // ISSUE: method reference
        // ISSUE: reference to a compiler-generated field
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: type reference
        // ISSUE: method reference
        IQueryable<scOrdSectionsInfo> source = (IQueryable<scOrdSectionsInfo>) Queryable.Select(Queryable.Where((IQueryable<M0>) Queryable.Join((IQueryable<M0>) Queryable.Join((IQueryable<M0>) Queryable.Join((IQueryable<M0>) Queryable.Join((IQueryable<M0>) se0085CtEntities1.SEOrders, (IEnumerable<M1>) se0085CtEntities1.OrderLines, (Expression<Func<M0, M2>>) (od => od.OrderId), (Expression<Func<M1, M2>>) (ol => ol.SEOrder.OrderId), (Expression<Func<M0, M1, M3>>) ((od, ol) => new{ od = od, ol = ol })), (IEnumerable<M1>) se0085CtEntities1.OrdSections, (Expression<Func<M0, M2>>) (data => data.ol.OrderLineId), (Expression<Func<M1, M2>>) (os => os.OrderLine.OrderLineId), (Expression<Func<M0, M1, M3>>) ((data, os) => new
        {
          \u0024VB\u0024It1 = data,
          os = os
        })), (IEnumerable<M1>) se0085CtEntities1.AssemblyLines, (Expression<Func<M0, M2>>) (data => data.\u0024VB\u0024It1.ol.AssemblyLine.AssemLineId), (Expression<Func<M1, M2>>) (al => al.AssemLineId), (Expression<Func<M0, M1, M3>>) ((data, al) => new
        {
          \u0024VB\u0024It1 = data,
          al = al
        })), (IEnumerable<M1>) se0085CtEntities1.SEPlants, (Expression<Func<M0, M2>>) (data => data.al.SEPlant.SEPlantId), (Expression<Func<M1, M2>>) (pl => pl.SEPlantId), (Expression<Func<M0, M1, M3>>) ((data, pl) => new
        {
          od = data.\u0024VB\u0024It1.\u0024VB\u0024It1.od,
          ol = data.\u0024VB\u0024It1.\u0024VB\u0024It1.ol,
          os = data.\u0024VB\u0024It1.os,
          al = data.al,
          pl = pl
        })), (Expression<Func<M0, bool>>) (data => Expression.Call((Expression) null, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (Microsoft.VisualBasic.CompilerServices.Operators.CompareString)), data.od.OrderFO, closure30.\u0024VB\u0024Local_ldOrder.OrderFO, false) == 0 & Expression.Call((Expression) null, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (Microsoft.VisualBasic.CompilerServices.Operators.CompareString)), data.ol.OrderLineNum, closure30.\u0024VB\u0024Local_ldOrder.OrderLineNum, false) == 0 & Expression.Call((Expression) null, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (Microsoft.VisualBasic.CompilerServices.Operators.CompareString)), data.ol.OrderLineSL, closure30.\u0024VB\u0024Local_ldOrder.OrderLineSL, false) == 0 & Expression.Call((Expression) null, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (Microsoft.VisualBasic.CompilerServices.Operators.CompareString)), data.ol.OrderLineSS, closure30.\u0024VB\u0024Local_ldOrder.OrderLineSS, false) == 0)), (Expression<Func<M0, M1>>) Expression.Lambda<Func<VB\u0024AnonymousType_15<SEOrder, OrderLine, OrdSection, AssemblyLine, SEPlant>, scOrdSectionsInfo>>((Expression) Expression.MemberInit(Expression.New((ConstructorInfo) MethodBase.GetMethodFromHandle(__methodref (scOrdSectionsInfo.\u002Ector)), (Expression[]) null), new MemberBinding[1]
        {
          (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scOrdSectionsInfo.set_OrdSectsId)), (Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_15<SEOrder, OrderLine, OrdSection, AssemblyLine, SEPlant>.get_os), __typeref (VB\u0024AnonymousType_15<SEOrder, OrderLine, OrdSection, AssemblyLine, SEPlant>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (OrdSection.get_OrdSectsId))))
        }), new ParameterExpression[1]
        {
          parameterExpression
        }));
        if (source != null && source.Count<scOrdSectionsInfo>() > 0)
          num = source.Count<scOrdSectionsInfo>();
        se0085CtEntities1.Database.Connection.Close();
      }
      return checked ((short) num);
    }

    public scSectStat rtnOrderSectsBarrierCounts(int OrdSectsId, ref scSectStat SectStats)
    {
      // ISSUE: object of a compiler-generated type is created
      // ISSUE: variable of a compiler-generated type
      clsEngineCTdB._Closure\u0024__31 closure31 = new clsEngineCTdB._Closure\u0024__31();
      // ISSUE: reference to a compiler-generated field
      closure31.\u0024VB\u0024Local_OrdSectsId = OrdSectsId;
      using (SE0085VMSEntities1 se0085VmsEntities1 = new SE0085VMSEntities1())
      {
        se0085VmsEntities1.Database.Connection.ConnectionString = this._VMSConnection;
        ParameterExpression parameterExpression1;
        // ISSUE: reference to a compiler-generated field
        IQueryable<int> source1 = (IQueryable<int>) Queryable.Select(Queryable.Where((IQueryable<M0>) Queryable.Join((IQueryable<M0>) se0085VmsEntities1.ProductVerifications, (IEnumerable<M1>) se0085VmsEntities1.ProductNonConformances, (Expression<Func<M0, M2>>) (pv => pv.ProdVerId), (Expression<Func<M1, M2>>) (nc => nc.ProductVerification.ProdVerId), (Expression<Func<M0, M1, M3>>) ((pv, nc) => new{ pv = pv, nc = nc })), (Expression<Func<M0, bool>>) Expression.Lambda<Func<VB\u0024AnonymousType_16<ProductVerification, ProductNonConformance>, bool>>((Expression) Expression.Equal(\u0024VB\u0024It.pv.OrdSectsId, closure31.\u0024VB\u0024Local_OrdSectsId, true, (MethodInfo) null), new ParameterExpression[1]
        {
          parameterExpression1
        })), (Expression<Func<M0, M1>>) (data => data.nc.NonConfId));
        if (source1 != null && source1.Count<int>() > 0)
          SectStats.BarriersTotal = source1.Count<int>();
        ParameterExpression parameterExpression2;
        // ISSUE: reference to a compiler-generated field
        // ISSUE: method reference
        // ISSUE: type reference
        // ISSUE: method reference
        IQueryable<int> source2 = (IQueryable<int>) Queryable.Select(Queryable.Where((IQueryable<M0>) Queryable.Join((IQueryable<M0>) Queryable.Join((IQueryable<M0>) se0085VmsEntities1.ProductVerifications, (IEnumerable<M1>) se0085VmsEntities1.ProductNonConformances, (Expression<Func<M0, M2>>) (pv => pv.ProdVerId), (Expression<Func<M1, M2>>) (nc => nc.ProductVerification.ProdVerId), (Expression<Func<M0, M1, M3>>) ((pv, nc) => new{ pv = pv, nc = nc })), (IEnumerable<M1>) se0085VmsEntities1.Dispositions, (Expression<Func<M0, M2>>) (data => data.nc.Disposition.DispositionId), (Expression<Func<M1, M2>>) (ds => ds.DispositionId), (Expression<Func<M0, M1, M3>>) ((data, ds) => new
        {
          pv = data.pv,
          nc = data.nc,
          ds = ds
        })), (Expression<Func<M0, bool>>) Expression.Lambda<Func<VB\u0024AnonymousType_17<ProductVerification, ProductNonConformance, Disposition>, bool>>((Expression) Expression.And((Expression) Expression.Equal(\u0024VB\u0024It.pv.OrdSectsId, closure31.\u0024VB\u0024Local_OrdSectsId, true, (MethodInfo) null), (Expression) Expression.Equal((Expression) Expression.ConvertChecked((Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_17<ProductVerification, ProductNonConformance, Disposition>.get_ds), __typeref (VB\u0024AnonymousType_17<ProductVerification, ProductNonConformance, Disposition>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (Disposition.get_DispositionValue))), typeof (int)), (Expression) Expression.Constant((object) 1, typeof (int)), true, (MethodInfo) null)), new ParameterExpression[1]
        {
          parameterExpression2
        })), (Expression<Func<M0, M1>>) (data => data.nc.NonConfId));
        if (source2 != null && source2.Count<int>() > 0)
          SectStats.BarriersOpen = source2.Count<int>();
        se0085VmsEntities1.Database.Connection.Close();
      }
      return SectStats;
    }

    public int LoadECNCount(string ldFO, string ldLine)
    {
      string str = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\\Inetpub\\wwwroot\\T2_ECN\\AppData\\ecn_data.mdb;";
      OleDbConnection connection = new OleDbConnection();
      connection.ConnectionString = str;
      connection.Open();
      OleDbCommand oleDbCommand = new OleDbCommand("SELECT COUNT(*) FROM ECN INNER JOIN Issues ON ECN.[ECN No] = Issues.[ECN No] WHERE ECN.[Order] = " + ldFO + " AND ECN.[Item] = '" + ldLine + "' ", connection);
      OleDbDataAdapter oleDbDataAdapter = new OleDbDataAdapter();
      oleDbDataAdapter.SelectCommand = oleDbCommand;
      DataSet dataSet = new DataSet("WorkTable");
      oleDbDataAdapter.Fill(dataSet, "WorkTable");
      DataRowCollection rows = dataSet.Tables["WorkTable"].Rows;
      int num1 = 0;
      int num2 = checked (rows.Count - 1);
      int index = num1;
      int integer;
      while (index <= num2)
      {
        integer = Conversions.ToInteger(rows[index][0]);
        checked { ++index; }
      }
      oleDbCommand.Dispose();
      oleDbDataAdapter.Dispose();
      connection.Dispose();
      return integer;
    }

    public scItemMaster rtnByAssyPartNum(string AssyPart)
    {
      // ISSUE: object of a compiler-generated type is created
      // ISSUE: variable of a compiler-generated type
      clsEngineCTdB._Closure\u0024__32 closure32 = new clsEngineCTdB._Closure\u0024__32();
      // ISSUE: reference to a compiler-generated field
      closure32.\u0024VB\u0024Local_AssyPart = AssyPart;
      scItemMaster scItemMaster = new scItemMaster();
      using (SE0085CTEntities1 se0085CtEntities1 = new SE0085CTEntities1())
      {
        se0085CtEntities1.Database.Connection.ConnectionString = this._CTConnection;
        ParameterExpression parameterExpression;
        // ISSUE: method reference
        // ISSUE: reference to a compiler-generated field
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: method reference
        IQueryable<scItemMaster> source = (IQueryable<scItemMaster>) Queryable.Select<AssyPart, scItemMaster>(Queryable.Where<AssyPart>((IQueryable<M0>) se0085CtEntities1.AssyParts, (Expression<Func<M0, bool>>) (p => Expression.Call((Expression) null, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (Microsoft.VisualBasic.CompilerServices.Operators.CompareString)), p.AssyPartNum, closure32.\u0024VB\u0024Local_AssyPart, false) == 0)), (Expression<Func<M0, M1>>) Expression.Lambda<Func<AssyPart, scItemMaster>>((Expression) Expression.MemberInit(Expression.New((ConstructorInfo) MethodBase.GetMethodFromHandle(__methodref (scItemMaster.\u002Ector)), (Expression[]) null), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scItemMaster.set_AssyPartId)), (Expression) Expression.Property((Expression) parameterExpression, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (AssyPart.get_AssyPartId)))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scItemMaster.set_AssyPartNumber)), (Expression) Expression.Property((Expression) parameterExpression, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (AssyPart.get_AssyPartNum)))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scItemMaster.set_Description1)), (Expression) Expression.Property((Expression) parameterExpression, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (AssyPart.get_AssyDesc1)))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scItemMaster.set_Description2)), (Expression) Expression.Property((Expression) parameterExpression, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (AssyPart.get_AssyDesc2)))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scItemMaster.set_BuyMake)), (Expression) Expression.Property((Expression) parameterExpression, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (AssyPart.get_BuyMake)))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scItemMaster.set_OFOKanban)), (Expression) Expression.Property((Expression) parameterExpression, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (AssyPart.get_OFOKanban)))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scItemMaster.set_AssyPartActive)), (Expression) Expression.Property((Expression) parameterExpression, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (AssyPart.get_AssyPartActive)))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scItemMaster.set_CostCode)), (Expression) Expression.Property((Expression) parameterExpression, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (AssyPart.get_CostCode)))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scItemMaster.set_UOM)), (Expression) Expression.Property((Expression) parameterExpression, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (AssyPart.get_UOM)))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scItemMaster.set_UnitCost)), (Expression) Expression.Convert((Expression) Expression.Property((Expression) parameterExpression, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (AssyPart.get_UnitCost))), typeof (Decimal))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scItemMaster.set_MaterialCost)), (Expression) Expression.Convert((Expression) Expression.Property((Expression) parameterExpression, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (AssyPart.get_MaterialCost))), typeof (Decimal))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scItemMaster.set_LaborCost)), (Expression) Expression.Convert((Expression) Expression.Property((Expression) parameterExpression, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (AssyPart.get_LaborCost))), typeof (Decimal))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scItemMaster.set_OverHeadCost)), (Expression) Expression.Convert((Expression) Expression.Property((Expression) parameterExpression, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (AssyPart.get_OveheadCost))), typeof (Decimal))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scItemMaster.set_O08FBUR)), (Expression) Expression.Convert((Expression) Expression.Property((Expression) parameterExpression, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (AssyPart.get_O08FBUR))), typeof (Decimal))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scItemMaster.set_O09PBUR)), (Expression) Expression.Convert((Expression) Expression.Property((Expression) parameterExpression, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (AssyPart.get_O09PBUR))), typeof (Decimal))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scItemMaster.set_O10AMU)), (Expression) Expression.Convert((Expression) Expression.Property((Expression) parameterExpression, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (AssyPart.get_O10AMU))), typeof (Decimal))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scItemMaster.set_O11VBUR)), (Expression) Expression.Convert((Expression) Expression.Property((Expression) parameterExpression, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (AssyPart.get_O11VBUR))), typeof (Decimal))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scItemMaster.set_Vendor)), (Expression) Expression.Property((Expression) parameterExpression, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (AssyPart.get_Vendor)))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scItemMaster.set_Routing)), (Expression) Expression.Property((Expression) parameterExpression, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (AssyPart.get_Routing)))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scItemMaster.set_ItemType)), (Expression) Expression.Property((Expression) parameterExpression, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (AssyPart.get_ItemType)))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scItemMaster.set_DateAdded)), (Expression) Expression.Convert((Expression) Expression.Property((Expression) parameterExpression, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (AssyPart.get_DateAdded))), typeof (DateTime)))), new ParameterExpression[1]
        {
          parameterExpression
        }));
        if (source.Count<scItemMaster>() == 1)
          scItemMaster = source.First<scItemMaster>();
        se0085CtEntities1.Database.Connection.Close();
      }
      return scItemMaster;
    }

    public List<scPartType> rtnPartTypes()
    {
      List<scPartType> scPartTypeList = new List<scPartType>();
      using (SE0085CTEntities1 se0085CtEntities1 = new SE0085CTEntities1())
      {
        se0085CtEntities1.Database.Connection.ConnectionString = this._CTConnection;
        ParameterExpression parameterExpression1;
        ParameterExpression parameterExpression2;
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: method reference
        IQueryable<scPartType> source = (IQueryable<scPartType>) Queryable.Select<PartType, scPartType>(Queryable.Where<PartType>((IQueryable<M0>) se0085CtEntities1.PartTypes, (Expression<Func<M0, bool>>) Expression.Lambda<Func<PartType, bool>>((Expression) Expression.Coalesce((Expression) Expression.Equal(p.PartTypeActive, (bool?) true, true, (MethodInfo) null), (Expression) Expression.Constant((object) false, typeof (bool))), new ParameterExpression[1]
        {
          parameterExpression1
        })), (Expression<Func<M0, M1>>) Expression.Lambda<Func<PartType, scPartType>>((Expression) Expression.MemberInit(Expression.New((ConstructorInfo) MethodBase.GetMethodFromHandle(__methodref (scPartType.\u002Ector)), (Expression[]) null), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scPartType.set_PKPartTypeID)), (Expression) Expression.Property((Expression) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (PartType.get_PartTypeId)))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scPartType.set_PartTypeDesc)), (Expression) Expression.Property((Expression) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (PartType.get_PartTypeDesc)))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scPartType.set_PartTypeCode)), (Expression) Expression.Property((Expression) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (PartType.get_PartTypeCode)))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scPartType.set_PartTypeActiveBool)), (Expression) Expression.Convert((Expression) Expression.Property((Expression) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (PartType.get_PartTypeActive))), typeof (bool)))), new ParameterExpression[1]
        {
          parameterExpression2
        }));
        if (source.Count<scPartType>() > 0)
          scPartTypeList = source.ToList<scPartType>();
        se0085CtEntities1.Database.Connection.Close();
      }
      return scPartTypeList;
    }

    public byte rtnPartNumStatus(string AssyPart)
    {
      // ISSUE: object of a compiler-generated type is created
      // ISSUE: variable of a compiler-generated type
      clsEngineCTdB._Closure\u0024__33 closure33 = new clsEngineCTdB._Closure\u0024__33();
      // ISSUE: reference to a compiler-generated field
      closure33.\u0024VB\u0024Local_AssyPart = AssyPart;
      byte num = 0;
      using (SE0085CTEntities1 se0085CtEntities1 = new SE0085CTEntities1())
      {
        se0085CtEntities1.Database.Connection.ConnectionString = this._CTConnection;
        // ISSUE: method reference
        // ISSUE: reference to a compiler-generated field
        IQueryable<byte> source = (IQueryable<byte>) Queryable.Select<AssyPart, byte>(Queryable.Where<AssyPart>((IQueryable<M0>) se0085CtEntities1.AssyParts, (Expression<Func<M0, bool>>) (p => Expression.Call((Expression) null, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (Microsoft.VisualBasic.CompilerServices.Operators.CompareString)), p.AssyPartNum, closure33.\u0024VB\u0024Local_AssyPart, false) == 0)), (Expression<Func<M0, M1>>) (p => p.AssyPartActive));
        if (source.Count<byte>() == 1)
          num = source.First<byte>();
        se0085CtEntities1.Database.Connection.Close();
      }
      return num;
    }

    public List<scPartAttr1> rtnAttrPaintColors()
    {
      List<scPartAttr1> scPartAttr1List = new List<scPartAttr1>();
      using (SE0085CTEntities1 se0085CtEntities1 = new SE0085CTEntities1())
      {
        se0085CtEntities1.Database.Connection.ConnectionString = this._CTConnection;
        ParameterExpression parameterExpression1;
        ParameterExpression parameterExpression2;
        // ISSUE: method reference
        // ISSUE: type reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: type reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: type reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: type reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: type reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: type reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: type reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: type reference
        // ISSUE: method reference
        IQueryable<scPartAttr1> source = (IQueryable<scPartAttr1>) Queryable.Select((IQueryable<M0>) Queryable.OrderBy(Queryable.Where((IQueryable<M0>) Queryable.Join((IQueryable<M0>) se0085CtEntities1.PartTypes, (IEnumerable<M1>) se0085CtEntities1.PartAttr1, (Expression<Func<M0, M2>>) (p => p.PartTypeId), (Expression<Func<M1, M2>>) (a => a.PartType.PartTypeId), (Expression<Func<M0, M1, M3>>) ((p, a) => new{ p = p, a = a })), (Expression<Func<M0, bool>>) Expression.Lambda<Func<VB\u0024AnonymousType_5<PartType, PartAttr1>, bool>>((Expression) Expression.Coalesce((Expression) Expression.And((Expression) Expression.And((Expression) Expression.And((Expression) Expression.Equal(\u0024VB\u0024It.p.PartTypeActive, (bool?) true, true, (MethodInfo) null), (Expression) Expression.Equal((Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression1, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_5<PartType, PartAttr1>.get_a), __typeref (VB\u0024AnonymousType_5<PartType, PartAttr1>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (PartAttr1.get_PartAttrActive))), (Expression) Expression.Convert((Expression) Expression.Constant((object) true, typeof (bool)), typeof (bool?)), true, (MethodInfo) null)), (Expression) Expression.Convert((Expression) Expression.And((Expression) Expression.GreaterThanOrEqual((Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression1, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_5<PartType, PartAttr1>.get_p), __typeref (VB\u0024AnonymousType_5<PartType, PartAttr1>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (PartType.get_PartTypeCode))), (Expression) Expression.Constant((object) 16777216L, typeof (long)), true, (MethodInfo) null), (Expression) Expression.LessThanOrEqual((Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression1, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_5<PartType, PartAttr1>.get_p), __typeref (VB\u0024AnonymousType_5<PartType, PartAttr1>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (PartType.get_PartTypeCode))), (Expression) Expression.Constant((object) 33554431L, typeof (long)), true, (MethodInfo) null)), typeof (bool?))), (Expression) Expression.Convert((Expression) Expression.LessThanOrEqual((Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression1, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_5<PartType, PartAttr1>.get_a), __typeref (VB\u0024AnonymousType_5<PartType, PartAttr1>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (PartAttr1.get_PartAttrCode))), (Expression) Expression.Constant((object) 4095L, typeof (long)), true, (MethodInfo) null), typeof (bool?))), (Expression) Expression.Constant((object) false, typeof (bool))), new ParameterExpression[1]
        {
          parameterExpression1
        })), (Expression<Func<M0, M1>>) (data => data.a.PartAttrDesc)), (Expression<Func<M0, M1>>) Expression.Lambda<Func<VB\u0024AnonymousType_5<PartType, PartAttr1>, scPartAttr1>>((Expression) Expression.MemberInit(Expression.New((ConstructorInfo) MethodBase.GetMethodFromHandle(__methodref (scPartAttr1.\u002Ector)), (Expression[]) null), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scPartAttr1.set_FKPartTypeID)), (Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_5<PartType, PartAttr1>.get_p), __typeref (VB\u0024AnonymousType_5<PartType, PartAttr1>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (PartType.get_PartTypeId)))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scPartAttr1.set_PKPartAttr1ID)), (Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_5<PartType, PartAttr1>.get_a), __typeref (VB\u0024AnonymousType_5<PartType, PartAttr1>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (PartAttr1.get_PartAttr1Id)))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scPartAttr1.set_PartAttrDesc)), (Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_5<PartType, PartAttr1>.get_a), __typeref (VB\u0024AnonymousType_5<PartType, PartAttr1>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (PartAttr1.get_PartAttrDesc)))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scPartAttr1.set_PartAttrCode)), (Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_5<PartType, PartAttr1>.get_a), __typeref (VB\u0024AnonymousType_5<PartType, PartAttr1>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (PartAttr1.get_PartAttrCode))))), new ParameterExpression[1]
        {
          parameterExpression2
        }));
        if (source != null && source.Count<scPartAttr1>() > 0)
          scPartAttr1List = source.ToList<scPartAttr1>();
        se0085CtEntities1.Database.Connection.Close();
      }
      return scPartAttr1List;
    }

    public List<scPartAttr1> rtnAttrCUPlating()
    {
      List<scPartAttr1> scPartAttr1List = new List<scPartAttr1>();
      using (SE0085CTEntities1 se0085CtEntities1 = new SE0085CTEntities1())
      {
        se0085CtEntities1.Database.Connection.ConnectionString = this._CTConnection;
        ParameterExpression parameterExpression1;
        ParameterExpression parameterExpression2;
        // ISSUE: method reference
        // ISSUE: type reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: type reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: type reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: type reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: type reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: type reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: type reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: type reference
        // ISSUE: method reference
        IQueryable<scPartAttr1> source = (IQueryable<scPartAttr1>) Queryable.Select((IQueryable<M0>) Queryable.OrderBy(Queryable.Where((IQueryable<M0>) Queryable.Join((IQueryable<M0>) se0085CtEntities1.PartTypes, (IEnumerable<M1>) se0085CtEntities1.PartAttr1, (Expression<Func<M0, M2>>) (p => p.PartTypeId), (Expression<Func<M1, M2>>) (a => a.PartType.PartTypeId), (Expression<Func<M0, M1, M3>>) ((p, a) => new{ p = p, a = a })), (Expression<Func<M0, bool>>) Expression.Lambda<Func<VB\u0024AnonymousType_5<PartType, PartAttr1>, bool>>((Expression) Expression.Coalesce((Expression) Expression.And((Expression) Expression.And((Expression) Expression.And((Expression) Expression.Equal(\u0024VB\u0024It.p.PartTypeActive, (bool?) true, true, (MethodInfo) null), (Expression) Expression.Equal((Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression1, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_5<PartType, PartAttr1>.get_a), __typeref (VB\u0024AnonymousType_5<PartType, PartAttr1>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (PartAttr1.get_PartAttrActive))), (Expression) Expression.Convert((Expression) Expression.Constant((object) true, typeof (bool)), typeof (bool?)), true, (MethodInfo) null)), (Expression) Expression.Convert((Expression) Expression.And((Expression) Expression.GreaterThanOrEqual((Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression1, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_5<PartType, PartAttr1>.get_p), __typeref (VB\u0024AnonymousType_5<PartType, PartAttr1>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (PartType.get_PartTypeCode))), (Expression) Expression.Constant((object) 33554432L, typeof (long)), true, (MethodInfo) null), (Expression) Expression.LessThanOrEqual((Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression1, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_5<PartType, PartAttr1>.get_p), __typeref (VB\u0024AnonymousType_5<PartType, PartAttr1>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (PartType.get_PartTypeCode))), (Expression) Expression.Constant((object) 50331647L, typeof (long)), true, (MethodInfo) null)), typeof (bool?))), (Expression) Expression.Convert((Expression) Expression.LessThanOrEqual((Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression1, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_5<PartType, PartAttr1>.get_a), __typeref (VB\u0024AnonymousType_5<PartType, PartAttr1>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (PartAttr1.get_PartAttrCode))), (Expression) Expression.Constant((object) 4095L, typeof (long)), true, (MethodInfo) null), typeof (bool?))), (Expression) Expression.Constant((object) false, typeof (bool))), new ParameterExpression[1]
        {
          parameterExpression1
        })), (Expression<Func<M0, M1>>) (data => data.a.PartAttrDesc)), (Expression<Func<M0, M1>>) Expression.Lambda<Func<VB\u0024AnonymousType_5<PartType, PartAttr1>, scPartAttr1>>((Expression) Expression.MemberInit(Expression.New((ConstructorInfo) MethodBase.GetMethodFromHandle(__methodref (scPartAttr1.\u002Ector)), (Expression[]) null), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scPartAttr1.set_FKPartTypeID)), (Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_5<PartType, PartAttr1>.get_p), __typeref (VB\u0024AnonymousType_5<PartType, PartAttr1>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (PartType.get_PartTypeId)))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scPartAttr1.set_PKPartAttr1ID)), (Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_5<PartType, PartAttr1>.get_a), __typeref (VB\u0024AnonymousType_5<PartType, PartAttr1>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (PartAttr1.get_PartAttr1Id)))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scPartAttr1.set_PartAttrDesc)), (Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_5<PartType, PartAttr1>.get_a), __typeref (VB\u0024AnonymousType_5<PartType, PartAttr1>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (PartAttr1.get_PartAttrDesc)))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scPartAttr1.set_PartAttrCode)), (Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_5<PartType, PartAttr1>.get_a), __typeref (VB\u0024AnonymousType_5<PartType, PartAttr1>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (PartAttr1.get_PartAttrCode))))), new ParameterExpression[1]
        {
          parameterExpression2
        }));
        if (source != null && source.Count<scPartAttr1>() > 0)
          scPartAttr1List = source.ToList<scPartAttr1>();
        se0085CtEntities1.Database.Connection.Close();
      }
      return scPartAttr1List;
    }

    public List<scPickLoc> rtnByAssyPartLocPick(string AssyPart, int PickType = 0)
    {
      // ISSUE: object of a compiler-generated type is created
      // ISSUE: variable of a compiler-generated type
      clsEngineCTdB._Closure\u0024__34 closure34 = new clsEngineCTdB._Closure\u0024__34();
      // ISSUE: reference to a compiler-generated field
      closure34.\u0024VB\u0024Local_AssyPart = AssyPart;
      // ISSUE: reference to a compiler-generated field
      closure34.\u0024VB\u0024Local_PickType = PickType;
      List<scPickLoc> scPickLocList = new List<scPickLoc>();
      using (SE0085CTEntities1 se0085CtEntities1 = new SE0085CTEntities1())
      {
        se0085CtEntities1.Database.Connection.ConnectionString = this._CTConnection;
        // ISSUE: reference to a compiler-generated field
        if (closure34.\u0024VB\u0024Local_PickType == 0)
        {
          ParameterExpression parameterExpression;
          // ISSUE: method reference
          // ISSUE: reference to a compiler-generated field
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: type reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: type reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: type reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: type reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: type reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: type reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: type reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: type reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: type reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: type reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: type reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: type reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: type reference
          // ISSUE: method reference
          IQueryable<scPickLoc> source = (IQueryable<scPickLoc>) Queryable.Select(Queryable.Where((IQueryable<M0>) Queryable.Join((IQueryable<M0>) Queryable.Join((IQueryable<M0>) se0085CtEntities1.AssyParts, (IEnumerable<M1>) se0085CtEntities1.TPickLoc1, (Expression<Func<M0, M2>>) (p => p.AssyPartId), (Expression<Func<M1, M2>>) (l => l.AssyPart.AssyPartId), (Expression<Func<M0, M1, M3>>) ((p, l) => new{ p = p, l = l })), (IEnumerable<M1>) se0085CtEntities1.TPickTypes, (Expression<Func<M0, M2>>) (data => data.l.TPickType.PickTypeId), (Expression<Func<M1, M2>>) (t => t.PickTypeId), (Expression<Func<M0, M1, M3>>) ((data, t) => new
          {
            p = data.p,
            l = data.l,
            t = t
          })), (Expression<Func<M0, bool>>) (data => Expression.Call((Expression) null, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (Microsoft.VisualBasic.CompilerServices.Operators.CompareString)), data.p.AssyPartNum, closure34.\u0024VB\u0024Local_AssyPart, false) == 0)), (Expression<Func<M0, M1>>) Expression.Lambda<Func<VB\u0024AnonymousType_19<AssyPart, TPickLoc1, TPickType>, scPickLoc>>((Expression) Expression.MemberInit(Expression.New((ConstructorInfo) MethodBase.GetMethodFromHandle(__methodref (scPickLoc.\u002Ector)), (Expression[]) null), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scPickLoc.set_plLocId)), (Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_19<AssyPart, TPickLoc1, TPickType>.get_l), __typeref (VB\u0024AnonymousType_19<AssyPart, TPickLoc1, TPickType>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (TPickLoc1.get_TPkLoc1Id)))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scPickLoc.set_plPartNumber)), (Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_19<AssyPart, TPickLoc1, TPickType>.get_p), __typeref (VB\u0024AnonymousType_19<AssyPart, TPickLoc1, TPickType>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (AssyPart.get_AssyPartNum)))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scPickLoc.set_plAssyPartId)), (Expression) Expression.Property((Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_19<AssyPart, TPickLoc1, TPickType>.get_l), __typeref (VB\u0024AnonymousType_19<AssyPart, TPickLoc1, TPickType>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (TPickLoc1.get_AssyPart))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (AssyPart.get_AssyPartId)))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scPickLoc.set_plGroup)), (Expression) Expression.ConvertChecked((Expression) Expression.ConvertChecked((Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_19<AssyPart, TPickLoc1, TPickType>.get_l), __typeref (VB\u0024AnonymousType_19<AssyPart, TPickLoc1, TPickType>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (TPickLoc1.get_GroupNum))), typeof (int), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (int?.op_Explicit), __typeref (int?))), typeof (short))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scPickLoc.set_plLocation)), (Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_19<AssyPart, TPickLoc1, TPickType>.get_l), __typeref (VB\u0024AnonymousType_19<AssyPart, TPickLoc1, TPickType>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (TPickLoc1.get_Location)))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scPickLoc.set_plPartTypeId)), (Expression) Expression.Property((Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_19<AssyPart, TPickLoc1, TPickType>.get_l), __typeref (VB\u0024AnonymousType_19<AssyPart, TPickLoc1, TPickType>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (TPickLoc1.get_PartType))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (PartType.get_PartTypeId)))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scPickLoc.set_plSpecialNotes)), (Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_19<AssyPart, TPickLoc1, TPickType>.get_l), __typeref (VB\u0024AnonymousType_19<AssyPart, TPickLoc1, TPickType>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (TPickLoc1.get_SpNotes)))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scPickLoc.set_ptPickTypeId)), (Expression) Expression.Property((Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_19<AssyPart, TPickLoc1, TPickType>.get_l), __typeref (VB\u0024AnonymousType_19<AssyPart, TPickLoc1, TPickType>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (TPickLoc1.get_TPickType))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (TPickType.get_PickTypeId)))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scPickLoc.set_ptPTypeAbbr)), (Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_19<AssyPart, TPickLoc1, TPickType>.get_t), __typeref (VB\u0024AnonymousType_19<AssyPart, TPickLoc1, TPickType>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (TPickType.get_PTypeAbbr)))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scPickLoc.set_ptPTypeDesc)), (Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_19<AssyPart, TPickLoc1, TPickType>.get_t), __typeref (VB\u0024AnonymousType_19<AssyPart, TPickLoc1, TPickType>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (TPickType.get_PTypeDesc)))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scPickLoc.set_ptPOrder)), (Expression) Expression.ConvertChecked((Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_19<AssyPart, TPickLoc1, TPickType>.get_t), __typeref (VB\u0024AnonymousType_19<AssyPart, TPickLoc1, TPickType>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (TPickType.get_POrder))), typeof (int))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scPickLoc.set_ptPControl)), (Expression) Expression.ConvertChecked((Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_19<AssyPart, TPickLoc1, TPickType>.get_t), __typeref (VB\u0024AnonymousType_19<AssyPart, TPickLoc1, TPickType>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (TPickType.get_PControl))), typeof (int)))), new ParameterExpression[1]
          {
            parameterExpression
          }));
          if (source != null && source.Count<scPickLoc>() > 0)
            scPickLocList = source.ToList<scPickLoc>();
        }
        else
        {
          ParameterExpression parameterExpression1;
          ParameterExpression parameterExpression2;
          // ISSUE: method reference
          // ISSUE: reference to a compiler-generated field
          // ISSUE: reference to a compiler-generated field
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: type reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: type reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: type reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: type reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: type reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: type reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: type reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: type reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: type reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: type reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: type reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: type reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: type reference
          // ISSUE: method reference
          IQueryable<scPickLoc> source = (IQueryable<scPickLoc>) Queryable.Select(Queryable.Where((IQueryable<M0>) Queryable.Join((IQueryable<M0>) Queryable.Join((IQueryable<M0>) se0085CtEntities1.AssyParts, (IEnumerable<M1>) se0085CtEntities1.TPickLoc1, (Expression<Func<M0, M2>>) (p => p.AssyPartId), (Expression<Func<M1, M2>>) (l => l.AssyPart.AssyPartId), (Expression<Func<M0, M1, M3>>) ((p, l) => new{ p = p, l = l })), (IEnumerable<M1>) se0085CtEntities1.TPickTypes, (Expression<Func<M0, M2>>) (data => data.l.TPickType.PickTypeId), (Expression<Func<M1, M2>>) (t => t.PickTypeId), (Expression<Func<M0, M1, M3>>) ((data, t) => new
          {
            p = data.p,
            l = data.l,
            t = t
          })), (Expression<Func<M0, bool>>) Expression.Lambda<Func<VB\u0024AnonymousType_19<AssyPart, TPickLoc1, TPickType>, bool>>((Expression) Expression.And(Expression.Call((Expression) null, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (Microsoft.VisualBasic.CompilerServices.Operators.CompareString)), \u0024VB\u0024It.p.AssyPartNum, closure34.\u0024VB\u0024Local_AssyPart, false) == 0, (Expression) Expression.Equal(\u0024VB\u0024It.t.PickTypeId, closure34.\u0024VB\u0024Local_PickType, true, (MethodInfo) null)), new ParameterExpression[1]
          {
            parameterExpression1
          })), (Expression<Func<M0, M1>>) Expression.Lambda<Func<VB\u0024AnonymousType_19<AssyPart, TPickLoc1, TPickType>, scPickLoc>>((Expression) Expression.MemberInit(Expression.New((ConstructorInfo) MethodBase.GetMethodFromHandle(__methodref (scPickLoc.\u002Ector)), (Expression[]) null), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scPickLoc.set_plLocId)), (Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_19<AssyPart, TPickLoc1, TPickType>.get_l), __typeref (VB\u0024AnonymousType_19<AssyPart, TPickLoc1, TPickType>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (TPickLoc1.get_TPkLoc1Id)))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scPickLoc.set_plPartNumber)), (Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_19<AssyPart, TPickLoc1, TPickType>.get_p), __typeref (VB\u0024AnonymousType_19<AssyPart, TPickLoc1, TPickType>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (AssyPart.get_AssyPartNum)))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scPickLoc.set_plAssyPartId)), (Expression) Expression.Property((Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_19<AssyPart, TPickLoc1, TPickType>.get_l), __typeref (VB\u0024AnonymousType_19<AssyPart, TPickLoc1, TPickType>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (TPickLoc1.get_AssyPart))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (AssyPart.get_AssyPartId)))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scPickLoc.set_plGroup)), (Expression) Expression.ConvertChecked((Expression) Expression.ConvertChecked((Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_19<AssyPart, TPickLoc1, TPickType>.get_l), __typeref (VB\u0024AnonymousType_19<AssyPart, TPickLoc1, TPickType>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (TPickLoc1.get_GroupNum))), typeof (int), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (int?.op_Explicit), __typeref (int?))), typeof (short))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scPickLoc.set_plLocation)), (Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_19<AssyPart, TPickLoc1, TPickType>.get_l), __typeref (VB\u0024AnonymousType_19<AssyPart, TPickLoc1, TPickType>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (TPickLoc1.get_Location)))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scPickLoc.set_plPartTypeId)), (Expression) Expression.Property((Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_19<AssyPart, TPickLoc1, TPickType>.get_l), __typeref (VB\u0024AnonymousType_19<AssyPart, TPickLoc1, TPickType>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (TPickLoc1.get_PartType))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (PartType.get_PartTypeId)))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scPickLoc.set_plSpecialNotes)), (Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_19<AssyPart, TPickLoc1, TPickType>.get_l), __typeref (VB\u0024AnonymousType_19<AssyPart, TPickLoc1, TPickType>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (TPickLoc1.get_SpNotes)))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scPickLoc.set_ptPickTypeId)), (Expression) Expression.Property((Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_19<AssyPart, TPickLoc1, TPickType>.get_l), __typeref (VB\u0024AnonymousType_19<AssyPart, TPickLoc1, TPickType>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (TPickLoc1.get_TPickType))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (TPickType.get_PickTypeId)))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scPickLoc.set_ptPTypeAbbr)), (Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_19<AssyPart, TPickLoc1, TPickType>.get_t), __typeref (VB\u0024AnonymousType_19<AssyPart, TPickLoc1, TPickType>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (TPickType.get_PTypeAbbr)))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scPickLoc.set_ptPTypeDesc)), (Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_19<AssyPart, TPickLoc1, TPickType>.get_t), __typeref (VB\u0024AnonymousType_19<AssyPart, TPickLoc1, TPickType>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (TPickType.get_PTypeDesc)))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scPickLoc.set_ptPOrder)), (Expression) Expression.ConvertChecked((Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_19<AssyPart, TPickLoc1, TPickType>.get_t), __typeref (VB\u0024AnonymousType_19<AssyPart, TPickLoc1, TPickType>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (TPickType.get_POrder))), typeof (int))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scPickLoc.set_ptPControl)), (Expression) Expression.ConvertChecked((Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_19<AssyPart, TPickLoc1, TPickType>.get_t), __typeref (VB\u0024AnonymousType_19<AssyPart, TPickLoc1, TPickType>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (TPickType.get_PControl))), typeof (int)))), new ParameterExpression[1]
          {
            parameterExpression2
          }));
          if (source != null && source.Count<scPickLoc>() > 0)
            scPickLocList = source.ToList<scPickLoc>();
        }
        se0085CtEntities1.Database.Connection.Close();
      }
      return scPickLocList;
    }

    public List<scPickLoc> rtnAssyPartTPickLoc(string AssyPart, string Location, int PickType = 0)
    {
      // ISSUE: object of a compiler-generated type is created
      // ISSUE: variable of a compiler-generated type
      clsEngineCTdB._Closure\u0024__35 closure35 = new clsEngineCTdB._Closure\u0024__35();
      // ISSUE: reference to a compiler-generated field
      closure35.\u0024VB\u0024Local_AssyPart = AssyPart;
      // ISSUE: reference to a compiler-generated field
      closure35.\u0024VB\u0024Local_Location = Location;
      // ISSUE: reference to a compiler-generated field
      closure35.\u0024VB\u0024Local_PickType = PickType;
      List<scPickLoc> scPickLocList = new List<scPickLoc>();
      using (SE0085CTEntities1 se0085CtEntities1 = new SE0085CTEntities1())
      {
        se0085CtEntities1.Database.Connection.ConnectionString = this._CTConnection;
        // ISSUE: reference to a compiler-generated field
        if (closure35.\u0024VB\u0024Local_PickType == 0)
        {
          ParameterExpression parameterExpression;
          // ISSUE: method reference
          // ISSUE: reference to a compiler-generated field
          // ISSUE: method reference
          // ISSUE: reference to a compiler-generated field
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: type reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: type reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: type reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: type reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: type reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: type reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: type reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: type reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: type reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: type reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: type reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: type reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: type reference
          // ISSUE: method reference
          IQueryable<scPickLoc> source = (IQueryable<scPickLoc>) Queryable.Select(Queryable.Where((IQueryable<M0>) Queryable.Join((IQueryable<M0>) Queryable.Join((IQueryable<M0>) se0085CtEntities1.AssyParts, (IEnumerable<M1>) se0085CtEntities1.TPickLoc1, (Expression<Func<M0, M2>>) (p => p.AssyPartId), (Expression<Func<M1, M2>>) (l => l.AssyPart.AssyPartId), (Expression<Func<M0, M1, M3>>) ((p, l) => new{ p = p, l = l })), (IEnumerable<M1>) se0085CtEntities1.TPickTypes, (Expression<Func<M0, M2>>) (data => data.l.TPickType.PickTypeId), (Expression<Func<M1, M2>>) (t => t.PickTypeId), (Expression<Func<M0, M1, M3>>) ((data, t) => new
          {
            p = data.p,
            l = data.l,
            t = t
          })), (Expression<Func<M0, bool>>) (data => Expression.Call((Expression) null, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (Microsoft.VisualBasic.CompilerServices.Operators.CompareString)), data.p.AssyPartNum, closure35.\u0024VB\u0024Local_AssyPart, false) == 0 & Expression.Call((Expression) null, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (Microsoft.VisualBasic.CompilerServices.Operators.CompareString)), data.l.Location, closure35.\u0024VB\u0024Local_Location, false) == 0)), (Expression<Func<M0, M1>>) Expression.Lambda<Func<VB\u0024AnonymousType_19<AssyPart, TPickLoc1, TPickType>, scPickLoc>>((Expression) Expression.MemberInit(Expression.New((ConstructorInfo) MethodBase.GetMethodFromHandle(__methodref (scPickLoc.\u002Ector)), (Expression[]) null), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scPickLoc.set_plLocId)), (Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_19<AssyPart, TPickLoc1, TPickType>.get_l), __typeref (VB\u0024AnonymousType_19<AssyPart, TPickLoc1, TPickType>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (TPickLoc1.get_TPkLoc1Id)))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scPickLoc.set_plPartNumber)), (Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_19<AssyPart, TPickLoc1, TPickType>.get_p), __typeref (VB\u0024AnonymousType_19<AssyPart, TPickLoc1, TPickType>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (AssyPart.get_AssyPartNum)))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scPickLoc.set_plAssyPartId)), (Expression) Expression.Property((Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_19<AssyPart, TPickLoc1, TPickType>.get_l), __typeref (VB\u0024AnonymousType_19<AssyPart, TPickLoc1, TPickType>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (TPickLoc1.get_AssyPart))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (AssyPart.get_AssyPartId)))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scPickLoc.set_plGroup)), (Expression) Expression.ConvertChecked((Expression) Expression.ConvertChecked((Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_19<AssyPart, TPickLoc1, TPickType>.get_l), __typeref (VB\u0024AnonymousType_19<AssyPart, TPickLoc1, TPickType>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (TPickLoc1.get_GroupNum))), typeof (int), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (int?.op_Explicit), __typeref (int?))), typeof (short))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scPickLoc.set_plLocation)), (Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_19<AssyPart, TPickLoc1, TPickType>.get_l), __typeref (VB\u0024AnonymousType_19<AssyPart, TPickLoc1, TPickType>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (TPickLoc1.get_Location)))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scPickLoc.set_plPartTypeId)), (Expression) Expression.Property((Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_19<AssyPart, TPickLoc1, TPickType>.get_l), __typeref (VB\u0024AnonymousType_19<AssyPart, TPickLoc1, TPickType>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (TPickLoc1.get_PartType))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (PartType.get_PartTypeId)))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scPickLoc.set_plSpecialNotes)), (Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_19<AssyPart, TPickLoc1, TPickType>.get_l), __typeref (VB\u0024AnonymousType_19<AssyPart, TPickLoc1, TPickType>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (TPickLoc1.get_SpNotes)))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scPickLoc.set_ptPickTypeId)), (Expression) Expression.Property((Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_19<AssyPart, TPickLoc1, TPickType>.get_l), __typeref (VB\u0024AnonymousType_19<AssyPart, TPickLoc1, TPickType>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (TPickLoc1.get_TPickType))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (TPickType.get_PickTypeId)))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scPickLoc.set_ptPTypeAbbr)), (Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_19<AssyPart, TPickLoc1, TPickType>.get_t), __typeref (VB\u0024AnonymousType_19<AssyPart, TPickLoc1, TPickType>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (TPickType.get_PTypeAbbr)))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scPickLoc.set_ptPTypeDesc)), (Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_19<AssyPart, TPickLoc1, TPickType>.get_t), __typeref (VB\u0024AnonymousType_19<AssyPart, TPickLoc1, TPickType>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (TPickType.get_PTypeDesc)))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scPickLoc.set_ptPOrder)), (Expression) Expression.ConvertChecked((Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_19<AssyPart, TPickLoc1, TPickType>.get_t), __typeref (VB\u0024AnonymousType_19<AssyPart, TPickLoc1, TPickType>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (TPickType.get_POrder))), typeof (int))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scPickLoc.set_ptPControl)), (Expression) Expression.ConvertChecked((Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_19<AssyPart, TPickLoc1, TPickType>.get_t), __typeref (VB\u0024AnonymousType_19<AssyPart, TPickLoc1, TPickType>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (TPickType.get_PControl))), typeof (int)))), new ParameterExpression[1]
          {
            parameterExpression
          }));
          if (source != null && source.Count<scPickLoc>() > 0)
            scPickLocList = source.ToList<scPickLoc>();
        }
        else
        {
          ParameterExpression parameterExpression1;
          ParameterExpression parameterExpression2;
          // ISSUE: method reference
          // ISSUE: reference to a compiler-generated field
          // ISSUE: method reference
          // ISSUE: reference to a compiler-generated field
          // ISSUE: reference to a compiler-generated field
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: type reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: type reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: type reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: type reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: type reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: type reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: type reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: type reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: type reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: type reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: type reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: type reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: type reference
          // ISSUE: method reference
          IQueryable<scPickLoc> source = (IQueryable<scPickLoc>) Queryable.Select(Queryable.Where((IQueryable<M0>) Queryable.Join((IQueryable<M0>) Queryable.Join((IQueryable<M0>) se0085CtEntities1.AssyParts, (IEnumerable<M1>) se0085CtEntities1.TPickLoc1, (Expression<Func<M0, M2>>) (p => p.AssyPartId), (Expression<Func<M1, M2>>) (l => l.AssyPart.AssyPartId), (Expression<Func<M0, M1, M3>>) ((p, l) => new{ p = p, l = l })), (IEnumerable<M1>) se0085CtEntities1.TPickTypes, (Expression<Func<M0, M2>>) (data => data.l.TPickType.PickTypeId), (Expression<Func<M1, M2>>) (t => t.PickTypeId), (Expression<Func<M0, M1, M3>>) ((data, t) => new
          {
            p = data.p,
            l = data.l,
            t = t
          })), (Expression<Func<M0, bool>>) Expression.Lambda<Func<VB\u0024AnonymousType_19<AssyPart, TPickLoc1, TPickType>, bool>>((Expression) Expression.And(Expression.Call((Expression) null, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (Microsoft.VisualBasic.CompilerServices.Operators.CompareString)), \u0024VB\u0024It.p.AssyPartNum, closure35.\u0024VB\u0024Local_AssyPart, false) == 0 & Expression.Call((Expression) null, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (Microsoft.VisualBasic.CompilerServices.Operators.CompareString)), \u0024VB\u0024It.l.Location, closure35.\u0024VB\u0024Local_Location, false) == 0, (Expression) Expression.Equal(\u0024VB\u0024It.t.PickTypeId, closure35.\u0024VB\u0024Local_PickType, true, (MethodInfo) null)), new ParameterExpression[1]
          {
            parameterExpression1
          })), (Expression<Func<M0, M1>>) Expression.Lambda<Func<VB\u0024AnonymousType_19<AssyPart, TPickLoc1, TPickType>, scPickLoc>>((Expression) Expression.MemberInit(Expression.New((ConstructorInfo) MethodBase.GetMethodFromHandle(__methodref (scPickLoc.\u002Ector)), (Expression[]) null), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scPickLoc.set_plLocId)), (Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_19<AssyPart, TPickLoc1, TPickType>.get_l), __typeref (VB\u0024AnonymousType_19<AssyPart, TPickLoc1, TPickType>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (TPickLoc1.get_TPkLoc1Id)))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scPickLoc.set_plPartNumber)), (Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_19<AssyPart, TPickLoc1, TPickType>.get_p), __typeref (VB\u0024AnonymousType_19<AssyPart, TPickLoc1, TPickType>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (AssyPart.get_AssyPartNum)))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scPickLoc.set_plAssyPartId)), (Expression) Expression.Property((Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_19<AssyPart, TPickLoc1, TPickType>.get_l), __typeref (VB\u0024AnonymousType_19<AssyPart, TPickLoc1, TPickType>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (TPickLoc1.get_AssyPart))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (AssyPart.get_AssyPartId)))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scPickLoc.set_plGroup)), (Expression) Expression.ConvertChecked((Expression) Expression.ConvertChecked((Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_19<AssyPart, TPickLoc1, TPickType>.get_l), __typeref (VB\u0024AnonymousType_19<AssyPart, TPickLoc1, TPickType>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (TPickLoc1.get_GroupNum))), typeof (int), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (int?.op_Explicit), __typeref (int?))), typeof (short))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scPickLoc.set_plLocation)), (Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_19<AssyPart, TPickLoc1, TPickType>.get_l), __typeref (VB\u0024AnonymousType_19<AssyPart, TPickLoc1, TPickType>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (TPickLoc1.get_Location)))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scPickLoc.set_plPartTypeId)), (Expression) Expression.Property((Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_19<AssyPart, TPickLoc1, TPickType>.get_l), __typeref (VB\u0024AnonymousType_19<AssyPart, TPickLoc1, TPickType>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (TPickLoc1.get_PartType))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (PartType.get_PartTypeId)))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scPickLoc.set_plSpecialNotes)), (Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_19<AssyPart, TPickLoc1, TPickType>.get_l), __typeref (VB\u0024AnonymousType_19<AssyPart, TPickLoc1, TPickType>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (TPickLoc1.get_SpNotes)))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scPickLoc.set_ptPickTypeId)), (Expression) Expression.Property((Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_19<AssyPart, TPickLoc1, TPickType>.get_l), __typeref (VB\u0024AnonymousType_19<AssyPart, TPickLoc1, TPickType>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (TPickLoc1.get_TPickType))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (TPickType.get_PickTypeId)))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scPickLoc.set_ptPTypeAbbr)), (Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_19<AssyPart, TPickLoc1, TPickType>.get_t), __typeref (VB\u0024AnonymousType_19<AssyPart, TPickLoc1, TPickType>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (TPickType.get_PTypeAbbr)))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scPickLoc.set_ptPTypeDesc)), (Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_19<AssyPart, TPickLoc1, TPickType>.get_t), __typeref (VB\u0024AnonymousType_19<AssyPart, TPickLoc1, TPickType>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (TPickType.get_PTypeDesc)))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scPickLoc.set_ptPOrder)), (Expression) Expression.ConvertChecked((Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_19<AssyPart, TPickLoc1, TPickType>.get_t), __typeref (VB\u0024AnonymousType_19<AssyPart, TPickLoc1, TPickType>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (TPickType.get_POrder))), typeof (int))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scPickLoc.set_ptPControl)), (Expression) Expression.ConvertChecked((Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_19<AssyPart, TPickLoc1, TPickType>.get_t), __typeref (VB\u0024AnonymousType_19<AssyPart, TPickLoc1, TPickType>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (TPickType.get_PControl))), typeof (int)))), new ParameterExpression[1]
          {
            parameterExpression2
          }));
          if (source != null && source.Count<scPickLoc>() > 0)
            scPickLocList = source.ToList<scPickLoc>();
        }
        se0085CtEntities1.Database.Connection.Close();
      }
      return scPickLocList;
    }

    public List<scPickType> rtnPickTypes()
    {
      List<scPickType> scPickTypeList = new List<scPickType>();
      using (SE0085CTEntities1 se0085CtEntities1 = new SE0085CTEntities1())
      {
        se0085CtEntities1.Database.Connection.ConnectionString = this._CTConnection;
        ParameterExpression parameterExpression;
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: method reference
        IQueryable<scPickType> source = (IQueryable<scPickType>) Queryable.Select<TPickType, scPickType>((IQueryable<M0>) se0085CtEntities1.TPickTypes, (Expression<Func<M0, M1>>) Expression.Lambda<Func<TPickType, scPickType>>((Expression) Expression.MemberInit(Expression.New((ConstructorInfo) MethodBase.GetMethodFromHandle(__methodref (scPickType.\u002Ector)), (Expression[]) null), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scPickType.set_ptPickTypeId)), (Expression) Expression.Property((Expression) parameterExpression, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (TPickType.get_PickTypeId)))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scPickType.set_ptPTypeAbbr)), (Expression) Expression.Property((Expression) parameterExpression, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (TPickType.get_PTypeAbbr)))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scPickType.set_ptPTypeDesc)), (Expression) Expression.Property((Expression) parameterExpression, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (TPickType.get_PTypeDesc)))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scPickType.set_ptPOrder)), (Expression) Expression.ConvertChecked((Expression) Expression.Property((Expression) parameterExpression, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (TPickType.get_POrder))), typeof (int))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scPickType.set_ptPControl)), (Expression) Expression.ConvertChecked((Expression) Expression.Property((Expression) parameterExpression, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (TPickType.get_PControl))), typeof (int)))), new ParameterExpression[1]
        {
          parameterExpression
        }));
        if (source.Count<scPickType>() > 0)
          scPickTypeList = source.ToList<scPickType>();
        se0085CtEntities1.Database.Connection.Close();
      }
      return scPickTypeList;
    }

    public scPickType rtnPickTypesById(int PickTypeId)
    {
      // ISSUE: object of a compiler-generated type is created
      // ISSUE: variable of a compiler-generated type
      clsEngineCTdB._Closure\u0024__36 closure36 = new clsEngineCTdB._Closure\u0024__36();
      // ISSUE: reference to a compiler-generated field
      closure36.\u0024VB\u0024Local_PickTypeId = PickTypeId;
      scPickType scPickType = new scPickType();
      using (SE0085CTEntities1 se0085CtEntities1 = new SE0085CTEntities1())
      {
        se0085CtEntities1.Database.Connection.ConnectionString = this._CTConnection;
        ParameterExpression parameterExpression1;
        ParameterExpression parameterExpression2;
        // ISSUE: reference to a compiler-generated field
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: method reference
        IQueryable<scPickType> source = (IQueryable<scPickType>) Queryable.Select<TPickType, scPickType>(Queryable.Where<TPickType>((IQueryable<M0>) se0085CtEntities1.TPickTypes, (Expression<Func<M0, bool>>) Expression.Lambda<Func<TPickType, bool>>((Expression) Expression.Equal(p.PickTypeId, closure36.\u0024VB\u0024Local_PickTypeId, true, (MethodInfo) null), new ParameterExpression[1]
        {
          parameterExpression1
        })), (Expression<Func<M0, M1>>) Expression.Lambda<Func<TPickType, scPickType>>((Expression) Expression.MemberInit(Expression.New((ConstructorInfo) MethodBase.GetMethodFromHandle(__methodref (scPickType.\u002Ector)), (Expression[]) null), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scPickType.set_ptPickTypeId)), (Expression) Expression.Property((Expression) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (TPickType.get_PickTypeId)))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scPickType.set_ptPTypeAbbr)), (Expression) Expression.Property((Expression) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (TPickType.get_PTypeAbbr)))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scPickType.set_ptPTypeDesc)), (Expression) Expression.Property((Expression) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (TPickType.get_PTypeDesc)))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scPickType.set_ptPOrder)), (Expression) Expression.ConvertChecked((Expression) Expression.Property((Expression) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (TPickType.get_POrder))), typeof (int))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scPickType.set_ptPControl)), (Expression) Expression.ConvertChecked((Expression) Expression.Property((Expression) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (TPickType.get_PControl))), typeof (int)))), new ParameterExpression[1]
        {
          parameterExpression2
        }));
        if (source.Count<scPickType>() > 0)
          scPickType = source.First<scPickType>();
        se0085CtEntities1.Database.Connection.Close();
      }
      return scPickType;
    }

    public scPickType rtnPickTypesByAbbrv(string PickTypeAbbr)
    {
      // ISSUE: object of a compiler-generated type is created
      // ISSUE: variable of a compiler-generated type
      clsEngineCTdB._Closure\u0024__37 closure37 = new clsEngineCTdB._Closure\u0024__37();
      // ISSUE: reference to a compiler-generated field
      closure37.\u0024VB\u0024Local_PickTypeAbbr = PickTypeAbbr;
      scPickType scPickType = new scPickType();
      using (SE0085CTEntities1 se0085CtEntities1 = new SE0085CTEntities1())
      {
        se0085CtEntities1.Database.Connection.ConnectionString = this._CTConnection;
        ParameterExpression parameterExpression;
        // ISSUE: method reference
        // ISSUE: reference to a compiler-generated field
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: method reference
        IQueryable<scPickType> source = (IQueryable<scPickType>) Queryable.Select<TPickType, scPickType>(Queryable.Where<TPickType>((IQueryable<M0>) se0085CtEntities1.TPickTypes, (Expression<Func<M0, bool>>) (p => Expression.Call((Expression) null, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (Microsoft.VisualBasic.CompilerServices.Operators.CompareString)), p.PTypeAbbr, closure37.\u0024VB\u0024Local_PickTypeAbbr, false) == 0)), (Expression<Func<M0, M1>>) Expression.Lambda<Func<TPickType, scPickType>>((Expression) Expression.MemberInit(Expression.New((ConstructorInfo) MethodBase.GetMethodFromHandle(__methodref (scPickType.\u002Ector)), (Expression[]) null), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scPickType.set_ptPickTypeId)), (Expression) Expression.Property((Expression) parameterExpression, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (TPickType.get_PickTypeId)))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scPickType.set_ptPTypeAbbr)), (Expression) Expression.Property((Expression) parameterExpression, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (TPickType.get_PTypeAbbr)))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scPickType.set_ptPTypeDesc)), (Expression) Expression.Property((Expression) parameterExpression, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (TPickType.get_PTypeDesc)))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scPickType.set_ptPOrder)), (Expression) Expression.ConvertChecked((Expression) Expression.Property((Expression) parameterExpression, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (TPickType.get_POrder))), typeof (int))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scPickType.set_ptPControl)), (Expression) Expression.ConvertChecked((Expression) Expression.Property((Expression) parameterExpression, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (TPickType.get_PControl))), typeof (int)))), new ParameterExpression[1]
        {
          parameterExpression
        }));
        if (source.Count<scPickType>() > 0)
          scPickType = source.First<scPickType>();
        se0085CtEntities1.Database.Connection.Close();
      }
      return scPickType;
    }

    public Hashtable rtnLocPickHash(int MatTypeFilter = 0)
    {
      // ISSUE: object of a compiler-generated type is created
      // ISSUE: variable of a compiler-generated type
      clsEngineCTdB._Closure\u0024__38 closure38 = new clsEngineCTdB._Closure\u0024__38();
      // ISSUE: reference to a compiler-generated field
      closure38.\u0024VB\u0024Local_MatTypeFilter = MatTypeFilter;
      Hashtable hashtable1 = new Hashtable();
      using (SE0085CTEntities1 se0085CtEntities1 = new SE0085CTEntities1())
      {
        se0085CtEntities1.Database.Connection.ConnectionString = this._CTConnection;
        // ISSUE: reference to a compiler-generated field
        if (closure38.\u0024VB\u0024Local_MatTypeFilter == 0)
        {
          ParameterExpression parameterExpression1;
          ParameterExpression parameterExpression2;
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: type reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: type reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: type reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: type reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: type reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: type reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: type reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: type reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: type reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: type reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: type reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: type reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: type reference
          // ISSUE: method reference
          IQueryable<scPickLoc> source = (IQueryable<scPickLoc>) Queryable.Select(Queryable.Where((IQueryable<M0>) Queryable.Join((IQueryable<M0>) Queryable.Join((IQueryable<M0>) se0085CtEntities1.AssyParts, (IEnumerable<M1>) se0085CtEntities1.TPickLoc1, (Expression<Func<M0, M2>>) (ap => ap.AssyPartId), (Expression<Func<M1, M2>>) (pl => pl.AssyPart.AssyPartId), (Expression<Func<M0, M1, M3>>) ((ap, pl) => new{ ap = ap, pl = pl })), (IEnumerable<M1>) se0085CtEntities1.TPickTypes, (Expression<Func<M0, M2>>) (data => data.pl.TPickType.PickTypeId), (Expression<Func<M1, M2>>) (tt => tt.PickTypeId), (Expression<Func<M0, M1, M3>>) ((data, tt) => new
          {
            ap = data.ap,
            pl = data.pl,
            tt = tt
          })), (Expression<Func<M0, bool>>) Expression.Lambda<Func<VB\u0024AnonymousType_21<AssyPart, TPickLoc1, TPickType>, bool>>((Expression) Expression.GreaterThan(\u0024VB\u0024It.pl.PartType.PartTypeId, 0, true, (MethodInfo) null), new ParameterExpression[1]
          {
            parameterExpression1
          })), (Expression<Func<M0, M1>>) Expression.Lambda<Func<VB\u0024AnonymousType_21<AssyPart, TPickLoc1, TPickType>, scPickLoc>>((Expression) Expression.MemberInit(Expression.New((ConstructorInfo) MethodBase.GetMethodFromHandle(__methodref (scPickLoc.\u002Ector)), (Expression[]) null), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scPickLoc.set_plLocId)), (Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_21<AssyPart, TPickLoc1, TPickType>.get_pl), __typeref (VB\u0024AnonymousType_21<AssyPart, TPickLoc1, TPickType>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (TPickLoc1.get_TPkLoc1Id)))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scPickLoc.set_plPartNumber)), (Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_21<AssyPart, TPickLoc1, TPickType>.get_ap), __typeref (VB\u0024AnonymousType_21<AssyPart, TPickLoc1, TPickType>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (AssyPart.get_AssyPartNum)))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scPickLoc.set_plAssyPartId)), (Expression) Expression.Property((Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_21<AssyPart, TPickLoc1, TPickType>.get_pl), __typeref (VB\u0024AnonymousType_21<AssyPart, TPickLoc1, TPickType>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (TPickLoc1.get_AssyPart))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (AssyPart.get_AssyPartId)))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scPickLoc.set_plGroup)), (Expression) Expression.ConvertChecked((Expression) Expression.ConvertChecked((Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_21<AssyPart, TPickLoc1, TPickType>.get_pl), __typeref (VB\u0024AnonymousType_21<AssyPart, TPickLoc1, TPickType>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (TPickLoc1.get_GroupNum))), typeof (int), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (int?.op_Explicit), __typeref (int?))), typeof (short))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scPickLoc.set_plLocation)), (Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_21<AssyPart, TPickLoc1, TPickType>.get_pl), __typeref (VB\u0024AnonymousType_21<AssyPart, TPickLoc1, TPickType>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (TPickLoc1.get_Location)))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scPickLoc.set_plPartTypeId)), (Expression) Expression.Property((Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_21<AssyPart, TPickLoc1, TPickType>.get_pl), __typeref (VB\u0024AnonymousType_21<AssyPart, TPickLoc1, TPickType>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (TPickLoc1.get_PartType))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (PartType.get_PartTypeId)))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scPickLoc.set_plSpecialNotes)), (Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_21<AssyPart, TPickLoc1, TPickType>.get_pl), __typeref (VB\u0024AnonymousType_21<AssyPart, TPickLoc1, TPickType>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (TPickLoc1.get_SpNotes)))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scPickLoc.set_ptPickTypeId)), (Expression) Expression.Property((Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_21<AssyPart, TPickLoc1, TPickType>.get_pl), __typeref (VB\u0024AnonymousType_21<AssyPart, TPickLoc1, TPickType>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (TPickLoc1.get_TPickType))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (TPickType.get_PickTypeId)))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scPickLoc.set_ptPTypeAbbr)), (Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_21<AssyPart, TPickLoc1, TPickType>.get_tt), __typeref (VB\u0024AnonymousType_21<AssyPart, TPickLoc1, TPickType>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (TPickType.get_PTypeAbbr)))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scPickLoc.set_ptPTypeDesc)), (Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_21<AssyPart, TPickLoc1, TPickType>.get_tt), __typeref (VB\u0024AnonymousType_21<AssyPart, TPickLoc1, TPickType>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (TPickType.get_PTypeDesc)))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scPickLoc.set_ptPOrder)), (Expression) Expression.ConvertChecked((Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_21<AssyPart, TPickLoc1, TPickType>.get_tt), __typeref (VB\u0024AnonymousType_21<AssyPart, TPickLoc1, TPickType>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (TPickType.get_POrder))), typeof (int))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scPickLoc.set_ptPControl)), (Expression) Expression.ConvertChecked((Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_21<AssyPart, TPickLoc1, TPickType>.get_tt), __typeref (VB\u0024AnonymousType_21<AssyPart, TPickLoc1, TPickType>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (TPickType.get_PControl))), typeof (int)))), new ParameterExpression[1]
          {
            parameterExpression2
          }));
          if (source != null && source.Count<scPickLoc>() > 0)
          {
            Hashtable hashtable2 = new Hashtable();
            IEnumerator<scPickLoc> enumerator;
            try
            {
              enumerator = source.GetEnumerator();
              while (enumerator.MoveNext())
              {
                scPickLoc current = enumerator.Current;
                if (!hashtable2.ContainsKey((object) current.plPartNumber))
                  hashtable2.Add((object) current.plPartNumber, (object) current.ptPickTypeId);
              }
            }
            finally
            {
              if (enumerator != null)
                enumerator.Dispose();
            }
            hashtable1 = hashtable2;
          }
        }
        else
        {
          ParameterExpression parameterExpression1;
          ParameterExpression parameterExpression2;
          // ISSUE: reference to a compiler-generated field
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: type reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: type reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: type reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: type reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: type reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: type reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: type reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: type reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: type reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: type reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: type reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: type reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: type reference
          // ISSUE: method reference
          IQueryable<scPickLoc> source = (IQueryable<scPickLoc>) Queryable.Select(Queryable.Where((IQueryable<M0>) Queryable.Join((IQueryable<M0>) Queryable.Join((IQueryable<M0>) se0085CtEntities1.AssyParts, (IEnumerable<M1>) se0085CtEntities1.TPickLoc1, (Expression<Func<M0, M2>>) (p => p.AssyPartId), (Expression<Func<M1, M2>>) (l => l.AssyPart.AssyPartId), (Expression<Func<M0, M1, M3>>) ((p, l) => new{ p = p, l = l })), (IEnumerable<M1>) se0085CtEntities1.TPickTypes, (Expression<Func<M0, M2>>) (data => data.l.TPickType.PickTypeId), (Expression<Func<M1, M2>>) (t => t.PickTypeId), (Expression<Func<M0, M1, M3>>) ((data, t) => new
          {
            p = data.p,
            l = data.l,
            t = t
          })), (Expression<Func<M0, bool>>) Expression.Lambda<Func<VB\u0024AnonymousType_19<AssyPart, TPickLoc1, TPickType>, bool>>((Expression) Expression.Equal(\u0024VB\u0024It.l.PartType.PartTypeId, closure38.\u0024VB\u0024Local_MatTypeFilter, true, (MethodInfo) null), new ParameterExpression[1]
          {
            parameterExpression1
          })), (Expression<Func<M0, M1>>) Expression.Lambda<Func<VB\u0024AnonymousType_19<AssyPart, TPickLoc1, TPickType>, scPickLoc>>((Expression) Expression.MemberInit(Expression.New((ConstructorInfo) MethodBase.GetMethodFromHandle(__methodref (scPickLoc.\u002Ector)), (Expression[]) null), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scPickLoc.set_plLocId)), (Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_19<AssyPart, TPickLoc1, TPickType>.get_l), __typeref (VB\u0024AnonymousType_19<AssyPart, TPickLoc1, TPickType>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (TPickLoc1.get_TPkLoc1Id)))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scPickLoc.set_plPartNumber)), (Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_19<AssyPart, TPickLoc1, TPickType>.get_p), __typeref (VB\u0024AnonymousType_19<AssyPart, TPickLoc1, TPickType>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (AssyPart.get_AssyPartNum)))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scPickLoc.set_plAssyPartId)), (Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_19<AssyPart, TPickLoc1, TPickType>.get_p), __typeref (VB\u0024AnonymousType_19<AssyPart, TPickLoc1, TPickType>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (AssyPart.get_AssyPartId)))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scPickLoc.set_plGroup)), (Expression) Expression.ConvertChecked((Expression) Expression.ConvertChecked((Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_19<AssyPart, TPickLoc1, TPickType>.get_l), __typeref (VB\u0024AnonymousType_19<AssyPart, TPickLoc1, TPickType>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (TPickLoc1.get_GroupNum))), typeof (int), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (int?.op_Explicit), __typeref (int?))), typeof (short))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scPickLoc.set_plLocation)), (Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_19<AssyPart, TPickLoc1, TPickType>.get_l), __typeref (VB\u0024AnonymousType_19<AssyPart, TPickLoc1, TPickType>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (TPickLoc1.get_Location)))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scPickLoc.set_plPartTypeId)), (Expression) Expression.Property((Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_19<AssyPart, TPickLoc1, TPickType>.get_l), __typeref (VB\u0024AnonymousType_19<AssyPart, TPickLoc1, TPickType>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (TPickLoc1.get_PartType))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (PartType.get_PartTypeId)))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scPickLoc.set_plSpecialNotes)), (Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_19<AssyPart, TPickLoc1, TPickType>.get_l), __typeref (VB\u0024AnonymousType_19<AssyPart, TPickLoc1, TPickType>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (TPickLoc1.get_SpNotes)))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scPickLoc.set_ptPickTypeId)), (Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_19<AssyPart, TPickLoc1, TPickType>.get_t), __typeref (VB\u0024AnonymousType_19<AssyPart, TPickLoc1, TPickType>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (TPickType.get_PickTypeId)))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scPickLoc.set_ptPTypeAbbr)), (Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_19<AssyPart, TPickLoc1, TPickType>.get_t), __typeref (VB\u0024AnonymousType_19<AssyPart, TPickLoc1, TPickType>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (TPickType.get_PTypeAbbr)))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scPickLoc.set_ptPTypeDesc)), (Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_19<AssyPart, TPickLoc1, TPickType>.get_t), __typeref (VB\u0024AnonymousType_19<AssyPart, TPickLoc1, TPickType>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (TPickType.get_PTypeDesc)))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scPickLoc.set_ptPOrder)), (Expression) Expression.ConvertChecked((Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_19<AssyPart, TPickLoc1, TPickType>.get_t), __typeref (VB\u0024AnonymousType_19<AssyPart, TPickLoc1, TPickType>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (TPickType.get_POrder))), typeof (int))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scPickLoc.set_ptPControl)), (Expression) Expression.ConvertChecked((Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_19<AssyPart, TPickLoc1, TPickType>.get_t), __typeref (VB\u0024AnonymousType_19<AssyPart, TPickLoc1, TPickType>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (TPickType.get_PControl))), typeof (int)))), new ParameterExpression[1]
          {
            parameterExpression2
          }));
          if (source != null && source.Count<scPickLoc>() > 0)
          {
            Hashtable hashtable2 = new Hashtable();
            IEnumerator<scPickLoc> enumerator;
            try
            {
              enumerator = source.GetEnumerator();
              while (enumerator.MoveNext())
              {
                scPickLoc current = enumerator.Current;
                if (!hashtable2.ContainsKey((object) current.plPartNumber))
                  hashtable2.Add((object) current.plPartNumber, (object) current);
              }
            }
            finally
            {
              if (enumerator != null)
                enumerator.Dispose();
            }
            hashtable1 = hashtable2;
          }
        }
        se0085CtEntities1.Database.Connection.Close();
      }
      return hashtable1;
    }

    public List<string> rtnSPecialNotes(int PartType = 0)
    {
      // ISSUE: object of a compiler-generated type is created
      // ISSUE: variable of a compiler-generated type
      clsEngineCTdB._Closure\u0024__39 closure39 = new clsEngineCTdB._Closure\u0024__39();
      // ISSUE: reference to a compiler-generated field
      closure39.\u0024VB\u0024Local_PartType = PartType;
      List<string> stringList = new List<string>();
      using (SE0085CTEntities1 se0085CtEntities1 = new SE0085CTEntities1())
      {
        se0085CtEntities1.Database.Connection.ConnectionString = this._CTConnection;
        // ISSUE: reference to a compiler-generated field
        if (closure39.\u0024VB\u0024Local_PartType == 0)
        {
          ParameterExpression parameterExpression;
          IQueryable<string> source = (IQueryable<string>) Queryable.Select<TPickLoc1, string>(Queryable.Where<TPickLoc1>((IQueryable<M0>) se0085CtEntities1.TPickLoc1.Distinct<TPickLoc1>(), (Expression<Func<M0, bool>>) Expression.Lambda<Func<TPickLoc1, bool>>((Expression) Expression.GreaterThan(l.SpNotes.Length, 0, true, (MethodInfo) null), new ParameterExpression[1]
          {
            parameterExpression
          })), (Expression<Func<M0, M1>>) (l => l.SpNotes));
          if (source != null && source.Count<string>() > 0)
            stringList = source.Distinct<string>().ToList<string>();
        }
        else
        {
          ParameterExpression parameterExpression;
          // ISSUE: reference to a compiler-generated field
          // ISSUE: method reference
          // ISSUE: method reference
          IQueryable<string> source = (IQueryable<string>) Queryable.Select<TPickLoc1, string>(Queryable.Where<TPickLoc1>((IQueryable<M0>) se0085CtEntities1.TPickLoc1.Distinct<TPickLoc1>(), (Expression<Func<M0, bool>>) Expression.Lambda<Func<TPickLoc1, bool>>((Expression) Expression.And((Expression) Expression.Equal(l.PartType.PartTypeId, closure39.\u0024VB\u0024Local_PartType, true, (MethodInfo) null), (Expression) Expression.GreaterThan((Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (TPickLoc1.get_SpNotes))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (string.get_Length))), (Expression) Expression.Constant((object) 0, typeof (int)), true, (MethodInfo) null)), new ParameterExpression[1]
          {
            parameterExpression
          })), (Expression<Func<M0, M1>>) (l => l.SpNotes));
          if (source != null && source.Count<string>() > 0)
            stringList = source.Distinct<string>().ToList<string>();
        }
        se0085CtEntities1.Database.Connection.Close();
      }
      return stringList;
    }

    public void LoadLocsAccess(List<scPickLoc> LocationList)
    {
      // ISSUE: object of a compiler-generated type is created
      // ISSUE: variable of a compiler-generated type
      clsEngineCTdB._Closure\u0024__40 closure40 = new clsEngineCTdB._Closure\u0024__40();
      if (LocationList != null && LocationList.Count > 0)
      {
        using (SE0085CTEntities1 se0085CtEntities1 = new SE0085CTEntities1())
        {
          se0085CtEntities1.Database.Connection.ConnectionString = this._CTConnection;
          List<scPickLoc>.Enumerator enumerator;
          try
          {
            enumerator = LocationList.GetEnumerator();
            while (enumerator.MoveNext())
            {
              scPickLoc current = enumerator.Current;
              // ISSUE: reference to a compiler-generated field
              closure40.\u0024VB\u0024Local_ldPartNumber = current.plPartNumber;
              // ISSUE: method reference
              // ISSUE: reference to a compiler-generated field
              IQueryable<AssyPart> source1 = (IQueryable<AssyPart>) Queryable.Select<AssyPart, AssyPart>(Queryable.Where<AssyPart>((IQueryable<M0>) se0085CtEntities1.AssyParts, (Expression<Func<M0, bool>>) (p => Expression.Call((Expression) null, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (Microsoft.VisualBasic.CompilerServices.Operators.CompareString)), p.AssyPartNum, closure40.\u0024VB\u0024Local_ldPartNumber, false) == 0)), (Expression<Func<M0, M1>>) (p => p));
              if (source1 != null && source1.Count<AssyPart>() > 0)
              {
                // ISSUE: object of a compiler-generated type is created
                // ISSUE: variable of a compiler-generated type
                clsEngineCTdB._Closure\u0024__40._Closure\u0024__41 closure41 = new clsEngineCTdB._Closure\u0024__40._Closure\u0024__41();
                // ISSUE: reference to a compiler-generated field
                closure41.\u0024VB\u0024Local_ldPartId = source1.First<AssyPart>().AssyPartId;
                // ISSUE: reference to a compiler-generated field
                closure40.\u0024VB\u0024Local_ldPickTypeId = current.ptPickTypeId;
                ParameterExpression parameterExpression1;
                // ISSUE: reference to a compiler-generated field
                IQueryable<TPickType> source2 = (IQueryable<TPickType>) Queryable.Select<TPickType, TPickType>(Queryable.Where<TPickType>((IQueryable<M0>) se0085CtEntities1.TPickTypes, (Expression<Func<M0, bool>>) Expression.Lambda<Func<TPickType, bool>>((Expression) Expression.Equal(t.PickTypeId, closure40.\u0024VB\u0024Local_ldPickTypeId, true, (MethodInfo) null), new ParameterExpression[1]
                {
                  parameterExpression1
                })), (Expression<Func<M0, M1>>) (t => t));
                if (source2 != null && source2.Count<TPickType>() > 0)
                {
                  // ISSUE: reference to a compiler-generated field
                  closure40.\u0024VB\u0024Local_ldLocation = current.plLocation;
                  // ISSUE: reference to a compiler-generated field
                  closure40.\u0024VB\u0024Local_ldPickTypeId = current.ptPickTypeId;
                  ParameterExpression parameterExpression2;
                  // ISSUE: method reference
                  // ISSUE: reference to a compiler-generated field
                  // ISSUE: reference to a compiler-generated field
                  IQueryable<TPickLoc1> source3 = (IQueryable<TPickLoc1>) Queryable.Select<TPickLoc1, TPickLoc1>(Queryable.Where<TPickLoc1>((IQueryable<M0>) se0085CtEntities1.TPickLoc1, (Expression<Func<M0, bool>>) Expression.Lambda<Func<TPickLoc1, bool>>((Expression) Expression.And(Expression.Call((Expression) null, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (Microsoft.VisualBasic.CompilerServices.Operators.CompareString)), l.Location, closure40.\u0024VB\u0024Local_ldLocation, false) == 0, (Expression) Expression.Equal(l.AssyPart.AssyPartId, closure41.\u0024VB\u0024Local_ldPartId, true, (MethodInfo) null)), new ParameterExpression[1]
                  {
                    parameterExpression2
                  })), (Expression<Func<M0, M1>>) (l => l));
                  try
                  {
                    if (source3.Count<TPickLoc1>() == 0)
                    {
                      se0085CtEntities1.TPickLoc1.Add(new TPickLoc1()
                      {
                        GroupNum = (int?) ((int) current.plGroup),
                        Location = current.plLocation,
                        PartType = {
                          PartTypeId = current.plPartTypeId
                        },
                        SpNotes = current.plSpecialNotes,
                        TPickType = source2.First<TPickType>(),
                        AssyPart = source1.First<AssyPart>()
                      });
                      int num1 = se0085CtEntities1.SaveChanges();
                      int num2;
                      checked { num2 += num1; }
                    }
                    else
                    {
                      // ISSUE: reference to a compiler-generated field
                      // ISSUE: reference to a compiler-generated field
                      // ISSUE: reference to a compiler-generated field
                      Console.WriteLine("Location Exist: " + closure40.\u0024VB\u0024Local_ldLocation + " " + closure40.\u0024VB\u0024Local_ldPartNumber + " " + Conversions.ToString(closure40.\u0024VB\u0024Local_ldPickTypeId));
                    }
                  }
                  catch (Exception ex)
                  {
                    ProjectData.SetProjectError(ex);
                    // ISSUE: reference to a compiler-generated field
                    Console.WriteLine("Load Failed for: " + closure40.\u0024VB\u0024Local_ldLocation);
                    ProjectData.ClearProjectError();
                  }
                }
              }
            }
          }
          finally
          {
            enumerator.Dispose();
          }
          se0085CtEntities1.Database.Connection.Close();
        }
      }
    }

    public int LoadLocs(List<scPickLoc> LocationList)
    {
      // ISSUE: object of a compiler-generated type is created
      // ISSUE: variable of a compiler-generated type
      clsEngineCTdB._Closure\u0024__42 closure42 = new clsEngineCTdB._Closure\u0024__42();
      int num1;
      if (LocationList != null && LocationList.Count > 0)
      {
        using (SE0085CTEntities1 se0085CtEntities1 = new SE0085CTEntities1())
        {
          se0085CtEntities1.Database.Connection.ConnectionString = this._CTConnection;
          List<scPickLoc>.Enumerator enumerator1;
          try
          {
            enumerator1 = LocationList.GetEnumerator();
            while (enumerator1.MoveNext())
            {
              scPickLoc current1 = enumerator1.Current;
              // ISSUE: reference to a compiler-generated field
              closure42.\u0024VB\u0024Local_ldPartNumber = current1.plPartNumber;
              // ISSUE: method reference
              // ISSUE: reference to a compiler-generated field
              IQueryable<AssyPart> source1 = (IQueryable<AssyPart>) Queryable.Select<AssyPart, AssyPart>(Queryable.Where<AssyPart>((IQueryable<M0>) se0085CtEntities1.AssyParts, (Expression<Func<M0, bool>>) (p => Expression.Call((Expression) null, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (Microsoft.VisualBasic.CompilerServices.Operators.CompareString)), p.AssyPartNum, closure42.\u0024VB\u0024Local_ldPartNumber, false) == 0)), (Expression<Func<M0, M1>>) (p => p));
              if (source1 != null && source1.Count<AssyPart>() > 0)
              {
                // ISSUE: reference to a compiler-generated field
                closure42.\u0024VB\u0024Local_ldPickTypeId = current1.ptPickTypeId;
                ParameterExpression parameterExpression1;
                // ISSUE: reference to a compiler-generated field
                IQueryable<TPickType> source2 = (IQueryable<TPickType>) Queryable.Select<TPickType, TPickType>(Queryable.Where<TPickType>((IQueryable<M0>) se0085CtEntities1.TPickTypes, (Expression<Func<M0, bool>>) Expression.Lambda<Func<TPickType, bool>>((Expression) Expression.Equal(t.PickTypeId, closure42.\u0024VB\u0024Local_ldPickTypeId, true, (MethodInfo) null), new ParameterExpression[1]
                {
                  parameterExpression1
                })), (Expression<Func<M0, M1>>) (t => t));
                if (source2 != null && source2.Count<TPickType>() > 0)
                {
                  // ISSUE: object of a compiler-generated type is created
                  // ISSUE: variable of a compiler-generated type
                  clsEngineCTdB._Closure\u0024__42._Closure\u0024__43 closure43 = new clsEngineCTdB._Closure\u0024__42._Closure\u0024__43();
                  // ISSUE: reference to a compiler-generated field
                  closure43.\u0024VB\u0024Local_ldPartId = source1.First<AssyPart>().AssyPartId;
                  // ISSUE: reference to a compiler-generated field
                  closure42.\u0024VB\u0024Local_ldPartTypeId = current1.plPartTypeId;
                  ParameterExpression parameterExpression2;
                  // ISSUE: reference to a compiler-generated field
                  IQueryable<PartType> source3 = (IQueryable<PartType>) Queryable.Select<PartType, PartType>(Queryable.Where<PartType>((IQueryable<M0>) se0085CtEntities1.PartTypes, (Expression<Func<M0, bool>>) Expression.Lambda<Func<PartType, bool>>((Expression) Expression.Equal(q.PartTypeId, closure42.\u0024VB\u0024Local_ldPartTypeId, true, (MethodInfo) null), new ParameterExpression[1]
                  {
                    parameterExpression2
                  })), (Expression<Func<M0, M1>>) (q => q));
                  if (source2 != null && source2.Count<TPickType>() > 0)
                  {
                    string plLocation = current1.plLocation;
                    // ISSUE: reference to a compiler-generated field
                    closure42.\u0024VB\u0024Local_ldPickTypeId = current1.ptPickTypeId;
                    ParameterExpression parameterExpression3;
                    // ISSUE: reference to a compiler-generated field
                    // ISSUE: method reference
                    // ISSUE: method reference
                    // ISSUE: field reference
                    IQueryable<TPickLoc1> source4 = (IQueryable<TPickLoc1>) Queryable.Select<TPickLoc1, TPickLoc1>(Queryable.Where<TPickLoc1>((IQueryable<M0>) se0085CtEntities1.TPickLoc1, (Expression<Func<M0, bool>>) Expression.Lambda<Func<TPickLoc1, bool>>((Expression) Expression.And((Expression) Expression.Equal(l.AssyPart.AssyPartId, closure43.\u0024VB\u0024Local_ldPartId, true, (MethodInfo) null), (Expression) Expression.Equal((Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression3, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (TPickLoc1.get_TPickType))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (TPickType.get_PickTypeId))), (Expression) Expression.Field((Expression) Expression.Constant((object) closure42, typeof (clsEngineCTdB._Closure\u0024__42)), FieldInfo.GetFieldFromHandle(__fieldref (clsEngineCTdB._Closure\u0024__42.\u0024VB\u0024Local_ldPickTypeId))), true, (MethodInfo) null)), new ParameterExpression[1]
                    {
                      parameterExpression3
                    })), (Expression<Func<M0, M1>>) (l => l));
                    try
                    {
                      if (source4.Count<TPickLoc1>() == 0)
                      {
                        se0085CtEntities1.TPickLoc1.Add(new TPickLoc1()
                        {
                          GroupNum = (int?) ((int) current1.plGroup),
                          Location = current1.plLocation,
                          SpNotes = current1.plSpecialNotes,
                          PartType = source3.First<PartType>(),
                          TPickType = source2.First<TPickType>(),
                          AssyPart = source1.First<AssyPart>()
                        });
                        int num2 = se0085CtEntities1.SaveChanges();
                        checked { num1 += num2; }
                      }
                      else if (source4.Count<TPickLoc1>() == 1)
                      {
                        // ISSUE: reference to a compiler-generated field
                        // ISSUE: reference to a compiler-generated field
                        Console.WriteLine("Location Exist: " + plLocation + " " + closure42.\u0024VB\u0024Local_ldPartNumber + " " + Conversions.ToString(closure42.\u0024VB\u0024Local_ldPickTypeId));
                        IEnumerator<TPickLoc1> enumerator2;
                        try
                        {
                          enumerator2 = source4.GetEnumerator();
                          while (enumerator2.MoveNext())
                          {
                            TPickLoc1 current2 = enumerator2.Current;
                            current2.GroupNum = (int?) ((int) current1.plGroup);
                            current2.Location = current1.plLocation;
                            current2.SpNotes = current1.plSpecialNotes;
                            current2.PartType = source3.First<PartType>();
                            current2.AssyPart = source1.First<AssyPart>();
                            current2.PartType = source3.First<PartType>();
                            current2.TPickType = source2.First<TPickType>();
                          }
                        }
                        finally
                        {
                          if (enumerator2 != null)
                            enumerator2.Dispose();
                        }
                        int num2 = se0085CtEntities1.SaveChanges();
                        checked { num1 += num2; }
                      }
                    }
                    catch (Exception ex)
                    {
                      ProjectData.SetProjectError(ex);
                      Console.WriteLine("Load Failed for: " + plLocation);
                      ProjectData.ClearProjectError();
                    }
                  }
                }
              }
            }
          }
          finally
          {
            enumerator1.Dispose();
          }
          se0085CtEntities1.Database.Connection.Close();
        }
      }
      return num1;
    }

    public OrderFollowUpType rtoFollowUpTypeById(ref SE0085CTEntities1 DataProvider, int FollowUpTypeId)
    {
      // ISSUE: object of a compiler-generated type is created
      // ISSUE: variable of a compiler-generated type
      clsEngineCTdB._Closure\u0024__44 closure44 = new clsEngineCTdB._Closure\u0024__44();
      // ISSUE: reference to a compiler-generated field
      closure44.\u0024VB\u0024Local_FollowUpTypeId = FollowUpTypeId;
      OrderFollowUpType orderFollowUpType = new OrderFollowUpType();
      using (SE0085CTEntities1 se0085CtEntities1 = new SE0085CTEntities1())
      {
        se0085CtEntities1.Database.Connection.ConnectionString = this._CTConnection;
        // ISSUE: reference to a compiler-generated field
        if (closure44.\u0024VB\u0024Local_FollowUpTypeId > 0)
        {
          ParameterExpression parameterExpression;
          // ISSUE: reference to a compiler-generated field
          IQueryable<OrderFollowUpType> source = (IQueryable<OrderFollowUpType>) Queryable.Select(Queryable.Where((IQueryable<M0>) Queryable.Join((IQueryable<M0>) DataProvider.OrderFollowUpTypes, (IEnumerable<M1>) DataProvider.Associates, (Expression<Func<M0, M2>>) (f => f.Associate.AssocId), (Expression<Func<M1, M2>>) (a => a.AssocId), (Expression<Func<M0, M1, M3>>) ((f, a) => new{ f = f, a = a })), (Expression<Func<M0, bool>>) Expression.Lambda<Func<VB\u0024AnonymousType_22<OrderFollowUpType, Associate>, bool>>((Expression) Expression.Equal(\u0024VB\u0024It.f.OrderFwUpId, closure44.\u0024VB\u0024Local_FollowUpTypeId, true, (MethodInfo) null), new ParameterExpression[1]
          {
            parameterExpression
          })), (Expression<Func<M0, M1>>) (data => data.f));
          if (source != null && source.Count<OrderFollowUpType>() == 1)
            orderFollowUpType = source.First<OrderFollowUpType>();
        }
        se0085CtEntities1.Database.Connection.Close();
      }
      return orderFollowUpType;
    }

    public scAssociateData rtnAssociateById(int AssocId)
    {
      // ISSUE: object of a compiler-generated type is created
      // ISSUE: variable of a compiler-generated type
      clsEngineCTdB._Closure\u0024__45 closure45 = new clsEngineCTdB._Closure\u0024__45();
      // ISSUE: reference to a compiler-generated field
      closure45.\u0024VB\u0024Local_AssocId = AssocId;
      scAssociateData scAssociateData = new scAssociateData();
      // ISSUE: reference to a compiler-generated field
      if (closure45.\u0024VB\u0024Local_AssocId > 0)
      {
        using (SE0085CTEntities1 se0085CtEntities1 = new SE0085CTEntities1())
        {
          se0085CtEntities1.Database.Connection.ConnectionString = this._CTConnection;
          ParameterExpression parameterExpression1;
          ParameterExpression parameterExpression2;
          // ISSUE: reference to a compiler-generated field
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: method reference
          IQueryable<scAssociateData> source = (IQueryable<scAssociateData>) Queryable.Select<Associate, scAssociateData>(Queryable.Where<Associate>((IQueryable<M0>) se0085CtEntities1.Associates, (Expression<Func<M0, bool>>) Expression.Lambda<Func<Associate, bool>>((Expression) Expression.Equal(a.AssocId, closure45.\u0024VB\u0024Local_AssocId, true, (MethodInfo) null), new ParameterExpression[1]
          {
            parameterExpression1
          })), (Expression<Func<M0, M1>>) Expression.Lambda<Func<Associate, scAssociateData>>((Expression) Expression.MemberInit(Expression.New((ConstructorInfo) MethodBase.GetMethodFromHandle(__methodref (scAssociateData.\u002Ector)), (Expression[]) null), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scAssociateData.set_AssocId)), (Expression) Expression.Property((Expression) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (Associate.get_AssocId)))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scAssociateData.set_AssocEmpId)), (Expression) Expression.Property((Expression) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (Associate.get_AssocEmpId)))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scAssociateData.set_AssocLaborName)), (Expression) Expression.Property((Expression) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (Associate.get_AssocLaborName)))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scAssociateData.set_AssocFirstName)), (Expression) Expression.Property((Expression) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (Associate.get_AssocFirstName)))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scAssociateData.set_AssocLastName)), (Expression) Expression.Property((Expression) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (Associate.get_AssocLastName)))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scAssociateData.set_AssocLogin)), (Expression) Expression.Property((Expression) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (Associate.get_AssocLogin)))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scAssociateData.set_AssocSESA)), (Expression) Expression.Property((Expression) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (Associate.get_AssocSESA)))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scAssociateData.set_AssocEmail)), (Expression) Expression.Property((Expression) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (Associate.get_AssocEmail)))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scAssociateData.set_AssocQCInsp)), (Expression) Expression.Convert((Expression) Expression.Property((Expression) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (Associate.get_AssocQCInsp))), typeof (bool))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scAssociateData.set_AssocUserPriv)), (Expression) Expression.ConvertChecked((Expression) Expression.Property((Expression) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (Associate.get_AssocUserPriv))), typeof (long))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scAssociateData.set_AssocPhone)), (Expression) Expression.Property((Expression) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (Associate.get_AssocPhone)))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scAssociateData.set_AssocExt)), (Expression) Expression.Property((Expression) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (Associate.get_AssocExt)))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scAssociateData.set_AssocActive)), (Expression) Expression.Convert((Expression) Expression.Property((Expression) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (Associate.get_AssocActive))), typeof (bool)))), new ParameterExpression[1]
          {
            parameterExpression2
          }));
          if (source.Count<scAssociateData>() == 1)
            scAssociateData = source.First<scAssociateData>();
          se0085CtEntities1.Database.Connection.Close();
        }
      }
      return scAssociateData;
    }

    public Associate rtoAssociateById(ref SE0085CTEntities1 DataProvider, int AssocId)
    {
      // ISSUE: object of a compiler-generated type is created
      // ISSUE: variable of a compiler-generated type
      clsEngineCTdB._Closure\u0024__46 closure46 = new clsEngineCTdB._Closure\u0024__46();
      // ISSUE: reference to a compiler-generated field
      closure46.\u0024VB\u0024Local_AssocId = AssocId;
      Associate associate = new Associate();
      // ISSUE: reference to a compiler-generated field
      if (closure46.\u0024VB\u0024Local_AssocId > 0)
      {
        using (SE0085CTEntities1 se0085CtEntities1 = new SE0085CTEntities1())
        {
          se0085CtEntities1.Database.Connection.ConnectionString = this._CTConnection;
          ParameterExpression parameterExpression;
          // ISSUE: reference to a compiler-generated field
          IQueryable<Associate> source = (IQueryable<Associate>) Queryable.Select<Associate, Associate>(Queryable.Where<Associate>((IQueryable<M0>) DataProvider.Associates, (Expression<Func<M0, bool>>) Expression.Lambda<Func<Associate, bool>>((Expression) Expression.Equal(a.AssocId, closure46.\u0024VB\u0024Local_AssocId, true, (MethodInfo) null), new ParameterExpression[1]
          {
            parameterExpression
          })), (Expression<Func<M0, M1>>) (a => a));
          if (source.Count<Associate>() == 1)
            associate = source.First<Associate>();
          se0085CtEntities1.Database.Connection.Close();
        }
      }
      return associate;
    }

    public List<scAssociateData> rtnAssocWORequestor()
    {
      // ISSUE: unable to decompile the method.
    }

    public int UpdateProdFlow(string ProductionOrder, string PartNumber, int FlowLaneValue)
    {
      // ISSUE: object of a compiler-generated type is created
      // ISSUE: variable of a compiler-generated type
      clsEngineCTdB._Closure\u0024__47 closure47 = new clsEngineCTdB._Closure\u0024__47();
      // ISSUE: reference to a compiler-generated field
      closure47.\u0024VB\u0024Local_ProductionOrder = ProductionOrder;
      // ISSUE: reference to a compiler-generated field
      closure47.\u0024VB\u0024Local_PartNumber = PartNumber;
      // ISSUE: reference to a compiler-generated field
      closure47.\u0024VB\u0024Local_FlowLaneValue = FlowLaneValue;
      int num;
      using (SE0085CTEntities1 se0085CtEntities1 = new SE0085CTEntities1())
      {
        se0085CtEntities1.Database.Connection.ConnectionString = this._CTConnection;
        OrdSection ordSection = new OrdSection();
        // ISSUE: method reference
        // ISSUE: reference to a compiler-generated field
        IQueryable<OrdSection> source1 = (IQueryable<OrdSection>) Queryable.Select<OrdSection, OrdSection>(Queryable.Where<OrdSection>((IQueryable<M0>) se0085CtEntities1.OrdSections, (Expression<Func<M0, bool>>) (s => Expression.Call((Expression) null, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (Microsoft.VisualBasic.CompilerServices.Operators.CompareString)), s.OrdSectsProdNum, closure47.\u0024VB\u0024Local_ProductionOrder, false) == 0)), (Expression<Func<M0, M1>>) (s => s));
        if (source1 != null && source1.Count<OrdSection>() == 1)
          ordSection = source1.First<OrdSection>();
        AssyPart assyPart = new AssyPart();
        // ISSUE: method reference
        // ISSUE: reference to a compiler-generated field
        IQueryable<AssyPart> source2 = (IQueryable<AssyPart>) Queryable.Select<AssyPart, AssyPart>(Queryable.Where<AssyPart>((IQueryable<M0>) se0085CtEntities1.AssyParts, (Expression<Func<M0, bool>>) (a => Expression.Call((Expression) null, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (Microsoft.VisualBasic.CompilerServices.Operators.CompareString)), a.AssyPartNum, closure47.\u0024VB\u0024Local_PartNumber, false) == 0)), (Expression<Func<M0, M1>>) (a => a));
        if (source2 != null && source2.Count<AssyPart>() == 1)
          assyPart = source2.First<AssyPart>();
        FlowLaneType flowLaneType = new FlowLaneType();
        ParameterExpression parameterExpression;
        // ISSUE: reference to a compiler-generated field
        IQueryable<FlowLaneType> source3 = (IQueryable<FlowLaneType>) Queryable.Select<FlowLaneType, FlowLaneType>(Queryable.Where<FlowLaneType>((IQueryable<M0>) se0085CtEntities1.FlowLaneTypes, (Expression<Func<M0, bool>>) Expression.Lambda<Func<FlowLaneType, bool>>((Expression) Expression.Coalesce((Expression) Expression.Equal(f.FLTypeValue, checked ((int?) closure47.\u0024VB\u0024Local_FlowLaneValue), true, (MethodInfo) null), (Expression) Expression.Constant((object) false, typeof (bool))), new ParameterExpression[1]
        {
          parameterExpression
        })), (Expression<Func<M0, M1>>) (f => f));
        if (source3 != null && source3.Count<FlowLaneType>() == 1)
          flowLaneType = source3.First<FlowLaneType>();
        ProdFlowLane prodFlowLane = new ProdFlowLane();
        prodFlowLane.FlowLaneEnterDt = (DateTime?) DateTime.Now;
        ordSection.ProdFlowLanes.Add(prodFlowLane);
        assyPart.ProdFlowLanes.Add(prodFlowLane);
        flowLaneType.ProdFlowLanes.Add(prodFlowLane);
        num = se0085CtEntities1.SaveChanges();
        se0085CtEntities1.Database.Connection.Close();
      }
      return num;
    }

    public List<scOrderImportInfo> rtnEngrOrderStatus(string AssemblyLine, DateTime ReleaseDtStart, DateTime ReleaseDtEnd)
    {
      // ISSUE: object of a compiler-generated type is created
      // ISSUE: variable of a compiler-generated type
      clsEngineCTdB._Closure\u0024__48 closure48 = new clsEngineCTdB._Closure\u0024__48();
      // ISSUE: reference to a compiler-generated field
      closure48.\u0024VB\u0024Local_ReleaseDtStart = ReleaseDtStart;
      // ISSUE: reference to a compiler-generated field
      closure48.\u0024VB\u0024Local_ReleaseDtEnd = ReleaseDtEnd;
      // ISSUE: reference to a compiler-generated field
      closure48.\u0024VB\u0024Local_AssemblyLine = AssemblyLine;
      List<scOrderImportInfo> scOrderImportInfoList = new List<scOrderImportInfo>();
      if (true)
      {
        using (SE0085CTEntities1 se0085CtEntities1 = new SE0085CTEntities1())
        {
          se0085CtEntities1.Database.Connection.ConnectionString = this._CTConnection;
          ParameterExpression parameterExpression1;
          ParameterExpression parameterExpression2;
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: type reference
          // ISSUE: method reference
          // ISSUE: field reference
          // ISSUE: method reference
          // ISSUE: type reference
          // ISSUE: method reference
          // ISSUE: field reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: type reference
          // ISSUE: method reference
          // ISSUE: field reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: type reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: type reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: type reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: type reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: type reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: type reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: type reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: type reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: type reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: type reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: type reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: type reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: type reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: type reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: type reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: type reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: type reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: type reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: type reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: type reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: type reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: type reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: type reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: type reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: type reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: type reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: type reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: type reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: type reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: type reference
          // ISSUE: method reference
          IQueryable<scOrderImportInfo> source = (IQueryable<scOrderImportInfo>) Queryable.Select((IQueryable<M0>) Queryable.ThenBy(Queryable.ThenBy(Queryable.ThenBy(Queryable.ThenBy(Queryable.ThenBy(Queryable.OrderBy(Queryable.Where((IQueryable<M0>) Queryable.Join((IQueryable<M0>) Queryable.Join((IQueryable<M0>) Queryable.Join((IQueryable<M0>) Queryable.Join((IQueryable<M0>) se0085CtEntities1.SEOrders.Distinct<SEOrder>(), (IEnumerable<M1>) se0085CtEntities1.OrderLines.Distinct<OrderLine>(), (Expression<Func<M0, M2>>) (od => od.OrderId), (Expression<Func<M1, M2>>) (ol => ol.SEOrder.OrderId), (Expression<Func<M0, M1, M3>>) ((od, ol) => new{ od = od, ol = ol })), (IEnumerable<M1>) se0085CtEntities1.AssemblyLines, (Expression<Func<M0, M2>>) (data => data.ol.AssemblyLine.AssemLineId), (Expression<Func<M1, M2>>) (al => al.AssemLineId), (Expression<Func<M0, M1, M3>>) ((data, al) => new
          {
            \u0024VB\u0024It1 = data,
            al = al
          })), (IEnumerable<M1>) se0085CtEntities1.SEPlants, (Expression<Func<M0, M2>>) (data => data.al.SEPlant.SEPlantId), (Expression<Func<M1, M2>>) (pl => pl.SEPlantId), (Expression<Func<M0, M1, M3>>) ((data, pl) => new
          {
            \u0024VB\u0024It1 = data,
            pl = pl
          })), (IEnumerable<M1>) se0085CtEntities1.OrderLinesExts, (Expression<Func<M0, M2>>) (data => data.\u0024VB\u0024It1.\u0024VB\u0024It1.ol.OrderLineId), (Expression<Func<M1, M2>>) (oe => oe.OrderLine.OrderLineId), (Expression<Func<M0, M1, M3>>) ((data, oe) => new
          {
            od = data.\u0024VB\u0024It1.\u0024VB\u0024It1.od,
            ol = data.\u0024VB\u0024It1.\u0024VB\u0024It1.ol,
            al = data.\u0024VB\u0024It1.al,
            pl = data.pl,
            oe = oe
          })), (Expression<Func<M0, bool>>) Expression.Lambda<Func<VB\u0024AnonymousType_4<SEOrder, OrderLine, AssemblyLine, SEPlant, OrderLinesExt>, bool>>((Expression) Expression.Coalesce((Expression) Expression.And((Expression) Expression.And((Expression) Expression.And((Expression) Expression.And((Expression) Expression.Equal(\u0024VB\u0024It.ol.OrderLineShipped, (bool?) false, true, (MethodInfo) null), (Expression) Expression.Convert((Expression) Expression.Equal((Expression) Expression.Call((Expression) null, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (Microsoft.VisualBasic.CompilerServices.Operators.CompareString)), (Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression1, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_4<SEOrder, OrderLine, AssemblyLine, SEPlant, OrderLinesExt>.get_al), __typeref (VB\u0024AnonymousType_4<SEOrder, OrderLine, AssemblyLine, SEPlant, OrderLinesExt>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (AssemblyLine.get_AssemLineAbbrv))), (Expression) Expression.Field((Expression) Expression.Constant((object) closure48, typeof (clsEngineCTdB._Closure\u0024__48)), FieldInfo.GetFieldFromHandle(__fieldref (clsEngineCTdB._Closure\u0024__48.\u0024VB\u0024Local_AssemblyLine))), (Expression) Expression.Constant((object) false, typeof (bool))), (Expression) Expression.Constant((object) 0, typeof (int))), typeof (bool?))), (Expression) Expression.GreaterThanOrEqual((Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression1, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_4<SEOrder, OrderLine, AssemblyLine, SEPlant, OrderLinesExt>.get_oe), __typeref (VB\u0024AnonymousType_4<SEOrder, OrderLine, AssemblyLine, SEPlant, OrderLinesExt>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (OrderLinesExt.get_OrderLineOrgEngrRelDt))), (Expression) Expression.Convert((Expression) Expression.Field((Expression) Expression.Constant((object) closure48, typeof (clsEngineCTdB._Closure\u0024__48)), FieldInfo.GetFieldFromHandle(__fieldref (clsEngineCTdB._Closure\u0024__48.\u0024VB\u0024Local_ReleaseDtStart))), typeof (DateTime?)), true, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (DateTime.op_GreaterThanOrEqual)))), (Expression) Expression.LessThanOrEqual((Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression1, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_4<SEOrder, OrderLine, AssemblyLine, SEPlant, OrderLinesExt>.get_oe), __typeref (VB\u0024AnonymousType_4<SEOrder, OrderLine, AssemblyLine, SEPlant, OrderLinesExt>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (OrderLinesExt.get_OrderLineOrgEngrRelDt))), (Expression) Expression.Convert((Expression) Expression.Field((Expression) Expression.Constant((object) closure48, typeof (clsEngineCTdB._Closure\u0024__48)), FieldInfo.GetFieldFromHandle(__fieldref (clsEngineCTdB._Closure\u0024__48.\u0024VB\u0024Local_ReleaseDtEnd))), typeof (DateTime?)), true, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (DateTime.op_LessThanOrEqual)))), (Expression) Expression.LessThan((Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression1, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_4<SEOrder, OrderLine, AssemblyLine, SEPlant, OrderLinesExt>.get_ol), __typeref (VB\u0024AnonymousType_4<SEOrder, OrderLine, AssemblyLine, SEPlant, OrderLinesExt>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (OrderLine.get_OrderLineShipDt))), (Expression) Expression.Convert((Expression) Expression.Convert((Expression) Expression.Constant((object) "12-31-2020", typeof (string)), typeof (DateTime), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (Conversions.ToDate))), typeof (DateTime?)), true, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (DateTime.op_LessThan)))), (Expression) Expression.Constant((object) false, typeof (bool))), new ParameterExpression[1]
          {
            parameterExpression1
          })), (Expression<Func<M0, M1>>) (data => data.ol.OrderLineTargetDt)), (Expression<Func<M0, M1>>) (data => data.oe.OrderLineOrgShipDt)), (Expression<Func<M0, M1>>) (data => data.od.OrderFO)), (Expression<Func<M0, M1>>) (data => data.ol.OrderLineNum)), (Expression<Func<M0, M1>>) (data => data.ol.OrderLineSL)), (Expression<Func<M0, M1>>) (data => data.ol.OrderLineSS)), (Expression<Func<M0, M1>>) Expression.Lambda<Func<VB\u0024AnonymousType_4<SEOrder, OrderLine, AssemblyLine, SEPlant, OrderLinesExt>, scOrderImportInfo>>((Expression) Expression.MemberInit(Expression.New((ConstructorInfo) MethodBase.GetMethodFromHandle(__methodref (scOrderImportInfo.\u002Ector)), (Expression[]) null), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scOrderImportInfo.set_SEPlantId)), (Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_4<SEOrder, OrderLine, AssemblyLine, SEPlant, OrderLinesExt>.get_pl), __typeref (VB\u0024AnonymousType_4<SEOrder, OrderLine, AssemblyLine, SEPlant, OrderLinesExt>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (SEPlant.get_SEPlantId)))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scOrderImportInfo.set_AssemblyLineId)), (Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_4<SEOrder, OrderLine, AssemblyLine, SEPlant, OrderLinesExt>.get_al), __typeref (VB\u0024AnonymousType_4<SEOrder, OrderLine, AssemblyLine, SEPlant, OrderLinesExt>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (AssemblyLine.get_AssemLineId)))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scOrderImportInfo.set_OrderId)), (Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_4<SEOrder, OrderLine, AssemblyLine, SEPlant, OrderLinesExt>.get_od), __typeref (VB\u0024AnonymousType_4<SEOrder, OrderLine, AssemblyLine, SEPlant, OrderLinesExt>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (SEOrder.get_OrderId)))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scOrderImportInfo.set_OrderFO)), (Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_4<SEOrder, OrderLine, AssemblyLine, SEPlant, OrderLinesExt>.get_od), __typeref (VB\u0024AnonymousType_4<SEOrder, OrderLine, AssemblyLine, SEPlant, OrderLinesExt>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (SEOrder.get_OrderFO)))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scOrderImportInfo.set_OrderJobName)), (Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_4<SEOrder, OrderLine, AssemblyLine, SEPlant, OrderLinesExt>.get_od), __typeref (VB\u0024AnonymousType_4<SEOrder, OrderLine, AssemblyLine, SEPlant, OrderLinesExt>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (SEOrder.get_OrderJobName)))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scOrderLinesExt.set_OrderLineId)), (Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_4<SEOrder, OrderLine, AssemblyLine, SEPlant, OrderLinesExt>.get_ol), __typeref (VB\u0024AnonymousType_4<SEOrder, OrderLine, AssemblyLine, SEPlant, OrderLinesExt>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (OrderLine.get_OrderLineId)))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scOrderImportInfo.set_OrderLineNum)), (Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_4<SEOrder, OrderLine, AssemblyLine, SEPlant, OrderLinesExt>.get_ol), __typeref (VB\u0024AnonymousType_4<SEOrder, OrderLine, AssemblyLine, SEPlant, OrderLinesExt>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (OrderLine.get_OrderLineNum)))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scOrderImportInfo.set_OrderLineSL)), (Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_4<SEOrder, OrderLine, AssemblyLine, SEPlant, OrderLinesExt>.get_ol), __typeref (VB\u0024AnonymousType_4<SEOrder, OrderLine, AssemblyLine, SEPlant, OrderLinesExt>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (OrderLine.get_OrderLineSL)))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scOrderImportInfo.set_OrderLineSS)), (Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_4<SEOrder, OrderLine, AssemblyLine, SEPlant, OrderLinesExt>.get_ol), __typeref (VB\u0024AnonymousType_4<SEOrder, OrderLine, AssemblyLine, SEPlant, OrderLinesExt>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (OrderLine.get_OrderLineSS)))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scOrderImportInfo.set_OrderLineTargetDt)), (Expression) Expression.Convert((Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_4<SEOrder, OrderLine, AssemblyLine, SEPlant, OrderLinesExt>.get_ol), __typeref (VB\u0024AnonymousType_4<SEOrder, OrderLine, AssemblyLine, SEPlant, OrderLinesExt>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (OrderLine.get_OrderLineTargetDt))), typeof (DateTime))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scOrderImportInfo.set_OrderLineShipDt)), (Expression) Expression.Convert((Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_4<SEOrder, OrderLine, AssemblyLine, SEPlant, OrderLinesExt>.get_ol), __typeref (VB\u0024AnonymousType_4<SEOrder, OrderLine, AssemblyLine, SEPlant, OrderLinesExt>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (OrderLine.get_OrderLineShipDt))), typeof (DateTime))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scOrderLinesExt.set_OrderLineExtId)), (Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_4<SEOrder, OrderLine, AssemblyLine, SEPlant, OrderLinesExt>.get_oe), __typeref (VB\u0024AnonymousType_4<SEOrder, OrderLine, AssemblyLine, SEPlant, OrderLinesExt>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (OrderLinesExt.get_OrderLineExtId)))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scOrderLinesExt.set_OrderLineSER)), (Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_4<SEOrder, OrderLine, AssemblyLine, SEPlant, OrderLinesExt>.get_ol), __typeref (VB\u0024AnonymousType_4<SEOrder, OrderLine, AssemblyLine, SEPlant, OrderLinesExt>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (OrderLine.get_OrderLineSER)))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scOrderLinesExt.set_OrderLineBook)), (Expression) Expression.Convert((Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_4<SEOrder, OrderLine, AssemblyLine, SEPlant, OrderLinesExt>.get_oe), __typeref (VB\u0024AnonymousType_4<SEOrder, OrderLine, AssemblyLine, SEPlant, OrderLinesExt>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (OrderLinesExt.get_OrderLineBook))), typeof (Decimal))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scOrderLinesExt.set_OrderLineNet)), (Expression) Expression.Convert((Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_4<SEOrder, OrderLine, AssemblyLine, SEPlant, OrderLinesExt>.get_oe), __typeref (VB\u0024AnonymousType_4<SEOrder, OrderLine, AssemblyLine, SEPlant, OrderLinesExt>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (OrderLinesExt.get_OrderLineNet))), typeof (Decimal))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scOrderLinesExt.set_OrderLineOrgTargetDt)), (Expression) Expression.Convert((Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_4<SEOrder, OrderLine, AssemblyLine, SEPlant, OrderLinesExt>.get_oe), __typeref (VB\u0024AnonymousType_4<SEOrder, OrderLine, AssemblyLine, SEPlant, OrderLinesExt>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (OrderLinesExt.get_OrderLineOrgTargetDt))), typeof (DateTime))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scOrderLinesExt.set_OrderLineOrgShipDt)), (Expression) Expression.Convert((Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_4<SEOrder, OrderLine, AssemblyLine, SEPlant, OrderLinesExt>.get_oe), __typeref (VB\u0024AnonymousType_4<SEOrder, OrderLine, AssemblyLine, SEPlant, OrderLinesExt>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (OrderLinesExt.get_OrderLineOrgShipDt))), typeof (DateTime))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scOrderLinesExt.set_OrderLineOrgAssyStDt)), (Expression) Expression.Convert((Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_4<SEOrder, OrderLine, AssemblyLine, SEPlant, OrderLinesExt>.get_oe), __typeref (VB\u0024AnonymousType_4<SEOrder, OrderLine, AssemblyLine, SEPlant, OrderLinesExt>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (OrderLinesExt.get_OrderLineOrgAssyStDt))), typeof (DateTime))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scOrderLinesExt.set_OrderLineCurAssyStDt)), (Expression) Expression.Convert((Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_4<SEOrder, OrderLine, AssemblyLine, SEPlant, OrderLinesExt>.get_oe), __typeref (VB\u0024AnonymousType_4<SEOrder, OrderLine, AssemblyLine, SEPlant, OrderLinesExt>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (OrderLinesExt.get_OrderLineCurAssyStDt))), typeof (DateTime))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scOrderLinesExt.set_OrderLineActAssyStDt)), (Expression) Expression.Convert((Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_4<SEOrder, OrderLine, AssemblyLine, SEPlant, OrderLinesExt>.get_oe), __typeref (VB\u0024AnonymousType_4<SEOrder, OrderLine, AssemblyLine, SEPlant, OrderLinesExt>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (OrderLinesExt.get_OrderLineActAssyStDt))), typeof (DateTime))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scOrderLinesExt.set_OrderLineOrgEngrRelDt)), (Expression) Expression.Convert((Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_4<SEOrder, OrderLine, AssemblyLine, SEPlant, OrderLinesExt>.get_oe), __typeref (VB\u0024AnonymousType_4<SEOrder, OrderLine, AssemblyLine, SEPlant, OrderLinesExt>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (OrderLinesExt.get_OrderLineOrgEngrRelDt))), typeof (DateTime))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scOrderLinesExt.set_OrderLineCurEngrRelDt)), (Expression) Expression.Convert((Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_4<SEOrder, OrderLine, AssemblyLine, SEPlant, OrderLinesExt>.get_oe), __typeref (VB\u0024AnonymousType_4<SEOrder, OrderLine, AssemblyLine, SEPlant, OrderLinesExt>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (OrderLinesExt.get_OrderLineCurEngrRelDt))), typeof (DateTime))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scOrderLinesExt.set_OrderLineActEngrRelDt)), (Expression) Expression.Convert((Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_4<SEOrder, OrderLine, AssemblyLine, SEPlant, OrderLinesExt>.get_oe), __typeref (VB\u0024AnonymousType_4<SEOrder, OrderLine, AssemblyLine, SEPlant, OrderLinesExt>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (OrderLinesExt.get_OrderLineActEngrRelDt))), typeof (DateTime))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scOrderLinesExt.set_OrderLineNB4Dt)), (Expression) Expression.Convert((Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_4<SEOrder, OrderLine, AssemblyLine, SEPlant, OrderLinesExt>.get_oe), __typeref (VB\u0024AnonymousType_4<SEOrder, OrderLine, AssemblyLine, SEPlant, OrderLinesExt>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (OrderLinesExt.get_OrderLineNB4Dt))), typeof (DateTime))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scOrderLinesExt.set_OrderLineEngrGrp)), (Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_4<SEOrder, OrderLine, AssemblyLine, SEPlant, OrderLinesExt>.get_oe), __typeref (VB\u0024AnonymousType_4<SEOrder, OrderLine, AssemblyLine, SEPlant, OrderLinesExt>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (OrderLinesExt.get_OrderLineEngrGrp)))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scOrderLinesExt.set_OrderLineMechClpx)), (Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_4<SEOrder, OrderLine, AssemblyLine, SEPlant, OrderLinesExt>.get_oe), __typeref (VB\u0024AnonymousType_4<SEOrder, OrderLine, AssemblyLine, SEPlant, OrderLinesExt>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (OrderLinesExt.get_OrderLineMechClpx)))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scOrderLinesExt.set_OrderLineElecClpx)), (Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_4<SEOrder, OrderLine, AssemblyLine, SEPlant, OrderLinesExt>.get_oe), __typeref (VB\u0024AnonymousType_4<SEOrder, OrderLine, AssemblyLine, SEPlant, OrderLinesExt>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (OrderLinesExt.get_OrderLineElecClpx)))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scOrderLinesExt.set_OrderLineEngComposite)), (Expression) Expression.ConvertChecked((Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_4<SEOrder, OrderLine, AssemblyLine, SEPlant, OrderLinesExt>.get_oe), __typeref (VB\u0024AnonymousType_4<SEOrder, OrderLine, AssemblyLine, SEPlant, OrderLinesExt>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (OrderLinesExt.get_OrderLineEngComposite))), typeof (long))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scOrderLinesExt.set_OrderLinePeltCode)), (Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_4<SEOrder, OrderLine, AssemblyLine, SEPlant, OrderLinesExt>.get_oe), __typeref (VB\u0024AnonymousType_4<SEOrder, OrderLine, AssemblyLine, SEPlant, OrderLinesExt>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (OrderLinesExt.get_OrderLinePeltCode))))), new ParameterExpression[1]
          {
            parameterExpression2
          }));
          if (source != null && source.Count<scOrderImportInfo>() > 0)
          {
            scOrderImportInfoList = source.ToList<scOrderImportInfo>();
            clsPlant clsPlant = new clsPlant();
            scPlants scPlants = new scPlants();
            scPlants Plant = clsPlant.rtnPlantById(scOrderImportInfoList[0].SEPlantId);
            clsAssemblyLine clsAssemblyLine = new clsAssemblyLine(Plant);
            List<scOrderImportInfo>.Enumerator enumerator;
            try
            {
              enumerator = scOrderImportInfoList.GetEnumerator();
              while (enumerator.MoveNext())
              {
                scOrderImportInfo current = enumerator.Current;
                current.SEPlant = Plant;
                current.AssemblyLine = (scLevels) clsAssemblyLine.rtnAssemblyLineById(current.AssemblyLineId);
                current.OrderLineOE = this.rtnOrderLineAssocAssign(current.OrderLineId, emOLAssignType.OrderEngr);
                current.OrderLineME = this.rtnOrderLineAssocAssign(current.OrderLineId, emOLAssignType.MechEngr);
                current.OrderComments = this.rtnOrderLineComments(current.OrderLineId);
                current.OrderStatus = this.rtnOrderLineStatus(current.OrderLineId, 0);
              }
            }
            finally
            {
              enumerator.Dispose();
            }
          }
          se0085CtEntities1.Database.Connection.Close();
        }
      }
      return scOrderImportInfoList;
    }

    public scOrderAuditStats rtnOrderAuditDataByLineId(int OrderLineId, int VPointId, DateTime ActualEngrRelDt)
    {
      // ISSUE: object of a compiler-generated type is created
      // ISSUE: variable of a compiler-generated type
      clsEngineCTdB._Closure\u0024__49 closure49 = new clsEngineCTdB._Closure\u0024__49();
      // ISSUE: reference to a compiler-generated field
      closure49.\u0024VB\u0024Local_OrderLineId = OrderLineId;
      scOrderAuditStats scOrderAuditStats = new scOrderAuditStats();
      using (SE0085CTEntities1 se0085CtEntities1 = new SE0085CTEntities1())
      {
        se0085CtEntities1.Database.Connection.ConnectionString = this._CTConnection;
        ParameterExpression parameterExpression;
        // ISSUE: reference to a compiler-generated field
        IQueryable<int> source = (IQueryable<int>) Queryable.Select(Queryable.Where((IQueryable<M0>) Queryable.Join((IQueryable<M0>) Queryable.Join((IQueryable<M0>) Queryable.Join((IQueryable<M0>) Queryable.Join((IQueryable<M0>) se0085CtEntities1.SEOrders, (IEnumerable<M1>) se0085CtEntities1.OrderLines, (Expression<Func<M0, M2>>) (od => od.OrderId), (Expression<Func<M1, M2>>) (ol => ol.SEOrder.OrderId), (Expression<Func<M0, M1, M3>>) ((od, ol) => new{ od = od, ol = ol })), (IEnumerable<M1>) se0085CtEntities1.OrdSections, (Expression<Func<M0, M2>>) (data => data.ol.OrderLineId), (Expression<Func<M1, M2>>) (os => os.OrderLine.OrderLineId), (Expression<Func<M0, M1, M3>>) ((data, os) => new
        {
          \u0024VB\u0024It1 = data,
          os = os
        })), (IEnumerable<M1>) se0085CtEntities1.AssemblyLines, (Expression<Func<M0, M2>>) (data => data.\u0024VB\u0024It1.ol.AssemblyLine.AssemLineId), (Expression<Func<M1, M2>>) (al => al.AssemLineId), (Expression<Func<M0, M1, M3>>) ((data, al) => new
        {
          \u0024VB\u0024It1 = data,
          al = al
        })), (IEnumerable<M1>) se0085CtEntities1.SEPlants, (Expression<Func<M0, M2>>) (data => data.al.SEPlant.SEPlantId), (Expression<Func<M1, M2>>) (pl => pl.SEPlantId), (Expression<Func<M0, M1, M3>>) ((data, pl) => new
        {
          od = data.\u0024VB\u0024It1.\u0024VB\u0024It1.od,
          ol = data.\u0024VB\u0024It1.\u0024VB\u0024It1.ol,
          os = data.\u0024VB\u0024It1.os,
          al = data.al,
          pl = pl
        })), (Expression<Func<M0, bool>>) Expression.Lambda<Func<VB\u0024AnonymousType_15<SEOrder, OrderLine, OrdSection, AssemblyLine, SEPlant>, bool>>((Expression) Expression.Equal(\u0024VB\u0024It.ol.OrderLineId, closure49.\u0024VB\u0024Local_OrderLineId, true, (MethodInfo) null), new ParameterExpression[1]
        {
          parameterExpression
        })), (Expression<Func<M0, M1>>) (data => data.os.OrdSectsId));
        if (source != null && source.Count<int>() > 0)
        {
          scOrderAuditStats AuditStats = new scOrderAuditStats();
          AuditStats.SectCnt = checked ((short) source.Count<int>());
          IEnumerator<int> enumerator;
          try
          {
            enumerator = source.GetEnumerator();
            while (enumerator.MoveNext())
            {
              int current = enumerator.Current;
              AuditStats = this.updAuditStatsData(ref AuditStats, current, VPointId, ActualEngrRelDt);
            }
          }
          finally
          {
            if (enumerator != null)
              enumerator.Dispose();
          }
          scOrderAuditStats = AuditStats;
        }
        se0085CtEntities1.Database.Connection.Close();
      }
      return scOrderAuditStats;
    }

    public scOrderAuditStats updAuditStatsData(ref scOrderAuditStats AuditStats, int OrdSectsId, int VPointId, DateTime ActualEngrRelDt)
    {
      // ISSUE: object of a compiler-generated type is created
      // ISSUE: variable of a compiler-generated type
      clsEngineCTdB._Closure\u0024__50 closure50 = new clsEngineCTdB._Closure\u0024__50();
      // ISSUE: reference to a compiler-generated field
      closure50.\u0024VB\u0024Local_OrdSectsId = OrdSectsId;
      // ISSUE: reference to a compiler-generated field
      closure50.\u0024VB\u0024Local_VPointId = VPointId;
      DateTime date = Conversions.ToDate(Conversions.ToString(ActualEngrRelDt) + " 23:59:59");
      using (SE0085VMSEntities1 se0085VmsEntities1 = new SE0085VMSEntities1())
      {
        se0085VmsEntities1.Database.Connection.ConnectionString = this._VMSConnection;
        ParameterExpression parameterExpression1;
        ParameterExpression parameterExpression2;
        // ISSUE: reference to a compiler-generated field
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: field reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: method reference
        IQueryable<scPVRecordHeader> source = (IQueryable<scPVRecordHeader>) Queryable.Select<ProductVerification, scPVRecordHeader>(Queryable.Where<ProductVerification>((IQueryable<M0>) se0085VmsEntities1.ProductVerifications, (Expression<Func<M0, bool>>) Expression.Lambda<Func<ProductVerification, bool>>((Expression) Expression.And((Expression) Expression.Equal(pv.OrdSectsId, closure50.\u0024VB\u0024Local_OrdSectsId, true, (MethodInfo) null), (Expression) Expression.Equal((Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression1, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (ProductVerification.get_QCVerificationPoint))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (QCVerificationPoint.get_VPointId))), (Expression) Expression.Field((Expression) Expression.Constant((object) closure50, typeof (clsEngineCTdB._Closure\u0024__50)), FieldInfo.GetFieldFromHandle(__fieldref (clsEngineCTdB._Closure\u0024__50.\u0024VB\u0024Local_VPointId))), true, (MethodInfo) null)), new ParameterExpression[1]
        {
          parameterExpression1
        })), (Expression<Func<M0, M1>>) Expression.Lambda<Func<ProductVerification, scPVRecordHeader>>((Expression) Expression.MemberInit(Expression.New((ConstructorInfo) MethodBase.GetMethodFromHandle(__methodref (scPVRecordHeader.\u002Ector)), (Expression[]) null), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scPVRecordHeader.set_OrdSectsId)), (Expression) Expression.Property((Expression) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (ProductVerification.get_OrdSectsId)))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scPVRecordHeader.set_ProdVerificationId)), (Expression) Expression.Property((Expression) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (ProductVerification.get_ProdVerId)))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scPVRecordHeader.set_ProdVerificationNonConfExist)), (Expression) Expression.Convert((Expression) Expression.Property((Expression) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (ProductVerification.get_ProdVerNonConfExist))), typeof (bool))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scPVRecordHeader.set_ProdVerificationComments)), (Expression) Expression.Property((Expression) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (ProductVerification.get_ProdVerComments)))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scVPoint.set_VPointId)), (Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (ProductVerification.get_QCVerificationPoint))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (QCVerificationPoint.get_VPointId)))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scPVRecordHeader.set_UpdatedDate)), (Expression) Expression.Convert((Expression) Expression.Property((Expression) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (ProductVerification.get_ProdVerUpdatedDt))), typeof (DateTime)))), new ParameterExpression[1]
        {
          parameterExpression2
        }));
        IEnumerator<scPVRecordHeader> enumerator;
        if (source != null)
        {
          if (source.Count<scPVRecordHeader>() > 0)
          {
            try
            {
              enumerator = source.GetEnumerator();
              while (enumerator.MoveNext())
              {
                scPVRecordHeader current = enumerator.Current;
                scOrderAuditStats scOrderAuditStats1 = AuditStats;
                scOrderAuditStats1.Audited = checked ((short) ((int) scOrderAuditStats1.Audited + 1));
                if (!current.ProdVerificationNonConfExist)
                {
                  scOrderAuditStats scOrderAuditStats2 = AuditStats;
                  scOrderAuditStats2.AuditNPF = checked ((short) ((int) scOrderAuditStats2.AuditNPF + 1));
                }
                else
                {
                  scOrderAuditStats scOrderAuditStats2 = AuditStats;
                  scOrderAuditStats2.AuditDefects = checked ((short) unchecked ((int) scOrderAuditStats2.AuditDefects + (int) this.rtnAuditDefectCnt(current.ProdVerificationId)));
                  if (DateTime.Compare(current.UpdatedDate, date) <= 0)
                  {
                    scOrderAuditStats scOrderAuditStats3 = AuditStats;
                    scOrderAuditStats3.AuditPreRM = checked ((short) ((int) scOrderAuditStats3.AuditPreRM + 1));
                  }
                }
              }
            }
            finally
            {
              if (enumerator != null)
                enumerator.Dispose();
            }
          }
        }
        se0085VmsEntities1.Database.Connection.Close();
      }
      return AuditStats;
    }

    public short rtnAuditDefectCnt(int ProdVerId)
    {
      // ISSUE: object of a compiler-generated type is created
      // ISSUE: variable of a compiler-generated type
      clsEngineCTdB._Closure\u0024__51 closure51 = new clsEngineCTdB._Closure\u0024__51();
      // ISSUE: reference to a compiler-generated field
      closure51.\u0024VB\u0024Local_ProdVerId = ProdVerId;
      short num1 = 0;
      using (SE0085VMSEntities1 se0085VmsEntities1 = new SE0085VMSEntities1())
      {
        se0085VmsEntities1.Database.Connection.ConnectionString = this._VMSConnection;
        ParameterExpression parameterExpression;
        // ISSUE: reference to a compiler-generated field
        IQueryable<short?> source = (IQueryable<short?>) Queryable.Select<ProductNonConformance, short?>(Queryable.Where<ProductNonConformance>((IQueryable<M0>) se0085VmsEntities1.ProductNonConformances, (Expression<Func<M0, bool>>) Expression.Lambda<Func<ProductNonConformance, bool>>((Expression) Expression.Equal(pv.ProductVerification.ProdVerId, closure51.\u0024VB\u0024Local_ProdVerId, true, (MethodInfo) null), new ParameterExpression[1]
        {
          parameterExpression
        })), (Expression<Func<M0, M1>>) (pv => pv.NonConfQty));
        if (source != null)
        {
          if (source.Count<short?>() > 0)
          {
            IEnumerator<short?> enumerator;
            short num2;
            try
            {
              enumerator = source.GetEnumerator();
              while (enumerator.MoveNext())
              {
                short current = (short) enumerator.Current;
                num2 += current;
              }
            }
            finally
            {
              if (enumerator != null)
                enumerator.Dispose();
            }
            num1 = num2;
          }
        }
        se0085VmsEntities1.Database.Connection.Close();
      }
      return num1;
    }

    public List<scOrderImportInfo> rtnEngrActRelease(string AssemblyLine, DateTime ReleaseDtStart, DateTime ReleaseDtEnd)
    {
      // ISSUE: object of a compiler-generated type is created
      // ISSUE: variable of a compiler-generated type
      clsEngineCTdB._Closure\u0024__52 closure52 = new clsEngineCTdB._Closure\u0024__52();
      // ISSUE: reference to a compiler-generated field
      closure52.\u0024VB\u0024Local_ReleaseDtStart = ReleaseDtStart;
      // ISSUE: reference to a compiler-generated field
      closure52.\u0024VB\u0024Local_ReleaseDtEnd = ReleaseDtEnd;
      // ISSUE: reference to a compiler-generated field
      closure52.\u0024VB\u0024Local_AssemblyLine = AssemblyLine;
      List<scOrderImportInfo> scOrderImportInfoList = new List<scOrderImportInfo>();
      if (true)
      {
        using (SE0085CTEntities1 se0085CtEntities1 = new SE0085CTEntities1())
        {
          se0085CtEntities1.Database.Connection.ConnectionString = this._CTConnection;
          ParameterExpression parameterExpression1;
          ParameterExpression parameterExpression2;
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: type reference
          // ISSUE: method reference
          // ISSUE: field reference
          // ISSUE: method reference
          // ISSUE: type reference
          // ISSUE: method reference
          // ISSUE: field reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: type reference
          // ISSUE: method reference
          // ISSUE: field reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: type reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: type reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: type reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: type reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: type reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: type reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: type reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: type reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: type reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: type reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: type reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: type reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: type reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: type reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: type reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: type reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: type reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: type reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: type reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: type reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: type reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: type reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: type reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: type reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: type reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: type reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: type reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: type reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: type reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: method reference
          // ISSUE: type reference
          // ISSUE: method reference
          IQueryable<scOrderImportInfo> source = (IQueryable<scOrderImportInfo>) Queryable.Select((IQueryable<M0>) Queryable.ThenBy(Queryable.ThenBy(Queryable.ThenBy(Queryable.ThenBy(Queryable.ThenBy(Queryable.OrderBy(Queryable.Where((IQueryable<M0>) Queryable.Join((IQueryable<M0>) Queryable.Join((IQueryable<M0>) Queryable.Join((IQueryable<M0>) Queryable.Join((IQueryable<M0>) se0085CtEntities1.SEOrders.Distinct<SEOrder>(), (IEnumerable<M1>) se0085CtEntities1.OrderLines.Distinct<OrderLine>(), (Expression<Func<M0, M2>>) (od => od.OrderId), (Expression<Func<M1, M2>>) (ol => ol.SEOrder.OrderId), (Expression<Func<M0, M1, M3>>) ((od, ol) => new{ od = od, ol = ol })), (IEnumerable<M1>) se0085CtEntities1.AssemblyLines, (Expression<Func<M0, M2>>) (data => data.ol.AssemblyLine.AssemLineId), (Expression<Func<M1, M2>>) (al => al.AssemLineId), (Expression<Func<M0, M1, M3>>) ((data, al) => new
          {
            \u0024VB\u0024It1 = data,
            al = al
          })), (IEnumerable<M1>) se0085CtEntities1.SEPlants, (Expression<Func<M0, M2>>) (data => data.al.SEPlant.SEPlantId), (Expression<Func<M1, M2>>) (pl => pl.SEPlantId), (Expression<Func<M0, M1, M3>>) ((data, pl) => new
          {
            \u0024VB\u0024It1 = data,
            pl = pl
          })), (IEnumerable<M1>) se0085CtEntities1.OrderLinesExts, (Expression<Func<M0, M2>>) (data => data.\u0024VB\u0024It1.\u0024VB\u0024It1.ol.OrderLineId), (Expression<Func<M1, M2>>) (oe => oe.OrderLine.OrderLineId), (Expression<Func<M0, M1, M3>>) ((data, oe) => new
          {
            od = data.\u0024VB\u0024It1.\u0024VB\u0024It1.od,
            ol = data.\u0024VB\u0024It1.\u0024VB\u0024It1.ol,
            al = data.\u0024VB\u0024It1.al,
            pl = data.pl,
            oe = oe
          })), (Expression<Func<M0, bool>>) Expression.Lambda<Func<VB\u0024AnonymousType_4<SEOrder, OrderLine, AssemblyLine, SEPlant, OrderLinesExt>, bool>>((Expression) Expression.Coalesce((Expression) Expression.And((Expression) Expression.And((Expression) Expression.And((Expression) Expression.And((Expression) Expression.Equal(\u0024VB\u0024It.ol.OrderLineShipped, (bool?) false, true, (MethodInfo) null), (Expression) Expression.Convert((Expression) Expression.Equal((Expression) Expression.Call((Expression) null, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (Microsoft.VisualBasic.CompilerServices.Operators.CompareString)), (Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression1, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_4<SEOrder, OrderLine, AssemblyLine, SEPlant, OrderLinesExt>.get_al), __typeref (VB\u0024AnonymousType_4<SEOrder, OrderLine, AssemblyLine, SEPlant, OrderLinesExt>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (AssemblyLine.get_AssemLineAbbrv))), (Expression) Expression.Field((Expression) Expression.Constant((object) closure52, typeof (clsEngineCTdB._Closure\u0024__52)), FieldInfo.GetFieldFromHandle(__fieldref (clsEngineCTdB._Closure\u0024__52.\u0024VB\u0024Local_AssemblyLine))), (Expression) Expression.Constant((object) false, typeof (bool))), (Expression) Expression.Constant((object) 0, typeof (int))), typeof (bool?))), (Expression) Expression.GreaterThanOrEqual((Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression1, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_4<SEOrder, OrderLine, AssemblyLine, SEPlant, OrderLinesExt>.get_oe), __typeref (VB\u0024AnonymousType_4<SEOrder, OrderLine, AssemblyLine, SEPlant, OrderLinesExt>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (OrderLinesExt.get_OrderLineActEngrRelDt))), (Expression) Expression.Convert((Expression) Expression.Field((Expression) Expression.Constant((object) closure52, typeof (clsEngineCTdB._Closure\u0024__52)), FieldInfo.GetFieldFromHandle(__fieldref (clsEngineCTdB._Closure\u0024__52.\u0024VB\u0024Local_ReleaseDtStart))), typeof (DateTime?)), true, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (DateTime.op_GreaterThanOrEqual)))), (Expression) Expression.LessThanOrEqual((Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression1, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_4<SEOrder, OrderLine, AssemblyLine, SEPlant, OrderLinesExt>.get_oe), __typeref (VB\u0024AnonymousType_4<SEOrder, OrderLine, AssemblyLine, SEPlant, OrderLinesExt>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (OrderLinesExt.get_OrderLineActEngrRelDt))), (Expression) Expression.Convert((Expression) Expression.Field((Expression) Expression.Constant((object) closure52, typeof (clsEngineCTdB._Closure\u0024__52)), FieldInfo.GetFieldFromHandle(__fieldref (clsEngineCTdB._Closure\u0024__52.\u0024VB\u0024Local_ReleaseDtEnd))), typeof (DateTime?)), true, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (DateTime.op_LessThanOrEqual)))), (Expression) Expression.LessThan((Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression1, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_4<SEOrder, OrderLine, AssemblyLine, SEPlant, OrderLinesExt>.get_ol), __typeref (VB\u0024AnonymousType_4<SEOrder, OrderLine, AssemblyLine, SEPlant, OrderLinesExt>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (OrderLine.get_OrderLineShipDt))), (Expression) Expression.Convert((Expression) Expression.Convert((Expression) Expression.Constant((object) "12-31-2020", typeof (string)), typeof (DateTime), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (Conversions.ToDate))), typeof (DateTime?)), true, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (DateTime.op_LessThan)))), (Expression) Expression.Constant((object) false, typeof (bool))), new ParameterExpression[1]
          {
            parameterExpression1
          })), (Expression<Func<M0, M1>>) (data => data.ol.OrderLineTargetDt)), (Expression<Func<M0, M1>>) (data => data.oe.OrderLineOrgShipDt)), (Expression<Func<M0, M1>>) (data => data.od.OrderFO)), (Expression<Func<M0, M1>>) (data => data.ol.OrderLineNum)), (Expression<Func<M0, M1>>) (data => data.ol.OrderLineSL)), (Expression<Func<M0, M1>>) (data => data.ol.OrderLineSS)), (Expression<Func<M0, M1>>) Expression.Lambda<Func<VB\u0024AnonymousType_4<SEOrder, OrderLine, AssemblyLine, SEPlant, OrderLinesExt>, scOrderImportInfo>>((Expression) Expression.MemberInit(Expression.New((ConstructorInfo) MethodBase.GetMethodFromHandle(__methodref (scOrderImportInfo.\u002Ector)), (Expression[]) null), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scOrderImportInfo.set_SEPlantId)), (Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_4<SEOrder, OrderLine, AssemblyLine, SEPlant, OrderLinesExt>.get_pl), __typeref (VB\u0024AnonymousType_4<SEOrder, OrderLine, AssemblyLine, SEPlant, OrderLinesExt>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (SEPlant.get_SEPlantId)))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scOrderImportInfo.set_AssemblyLineId)), (Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_4<SEOrder, OrderLine, AssemblyLine, SEPlant, OrderLinesExt>.get_al), __typeref (VB\u0024AnonymousType_4<SEOrder, OrderLine, AssemblyLine, SEPlant, OrderLinesExt>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (AssemblyLine.get_AssemLineId)))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scOrderImportInfo.set_OrderId)), (Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_4<SEOrder, OrderLine, AssemblyLine, SEPlant, OrderLinesExt>.get_od), __typeref (VB\u0024AnonymousType_4<SEOrder, OrderLine, AssemblyLine, SEPlant, OrderLinesExt>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (SEOrder.get_OrderId)))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scOrderImportInfo.set_OrderFO)), (Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_4<SEOrder, OrderLine, AssemblyLine, SEPlant, OrderLinesExt>.get_od), __typeref (VB\u0024AnonymousType_4<SEOrder, OrderLine, AssemblyLine, SEPlant, OrderLinesExt>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (SEOrder.get_OrderFO)))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scOrderImportInfo.set_OrderJobName)), (Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_4<SEOrder, OrderLine, AssemblyLine, SEPlant, OrderLinesExt>.get_od), __typeref (VB\u0024AnonymousType_4<SEOrder, OrderLine, AssemblyLine, SEPlant, OrderLinesExt>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (SEOrder.get_OrderJobName)))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scOrderLinesExt.set_OrderLineId)), (Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_4<SEOrder, OrderLine, AssemblyLine, SEPlant, OrderLinesExt>.get_ol), __typeref (VB\u0024AnonymousType_4<SEOrder, OrderLine, AssemblyLine, SEPlant, OrderLinesExt>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (OrderLine.get_OrderLineId)))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scOrderImportInfo.set_OrderLineNum)), (Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_4<SEOrder, OrderLine, AssemblyLine, SEPlant, OrderLinesExt>.get_ol), __typeref (VB\u0024AnonymousType_4<SEOrder, OrderLine, AssemblyLine, SEPlant, OrderLinesExt>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (OrderLine.get_OrderLineNum)))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scOrderImportInfo.set_OrderLineSL)), (Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_4<SEOrder, OrderLine, AssemblyLine, SEPlant, OrderLinesExt>.get_ol), __typeref (VB\u0024AnonymousType_4<SEOrder, OrderLine, AssemblyLine, SEPlant, OrderLinesExt>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (OrderLine.get_OrderLineSL)))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scOrderImportInfo.set_OrderLineSS)), (Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_4<SEOrder, OrderLine, AssemblyLine, SEPlant, OrderLinesExt>.get_ol), __typeref (VB\u0024AnonymousType_4<SEOrder, OrderLine, AssemblyLine, SEPlant, OrderLinesExt>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (OrderLine.get_OrderLineSS)))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scOrderImportInfo.set_OrderLineTargetDt)), (Expression) Expression.Convert((Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_4<SEOrder, OrderLine, AssemblyLine, SEPlant, OrderLinesExt>.get_ol), __typeref (VB\u0024AnonymousType_4<SEOrder, OrderLine, AssemblyLine, SEPlant, OrderLinesExt>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (OrderLine.get_OrderLineTargetDt))), typeof (DateTime))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scOrderImportInfo.set_OrderLineShipDt)), (Expression) Expression.Convert((Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_4<SEOrder, OrderLine, AssemblyLine, SEPlant, OrderLinesExt>.get_ol), __typeref (VB\u0024AnonymousType_4<SEOrder, OrderLine, AssemblyLine, SEPlant, OrderLinesExt>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (OrderLine.get_OrderLineShipDt))), typeof (DateTime))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scOrderLinesExt.set_OrderLineExtId)), (Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_4<SEOrder, OrderLine, AssemblyLine, SEPlant, OrderLinesExt>.get_oe), __typeref (VB\u0024AnonymousType_4<SEOrder, OrderLine, AssemblyLine, SEPlant, OrderLinesExt>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (OrderLinesExt.get_OrderLineExtId)))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scOrderLinesExt.set_OrderLineSER)), (Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_4<SEOrder, OrderLine, AssemblyLine, SEPlant, OrderLinesExt>.get_ol), __typeref (VB\u0024AnonymousType_4<SEOrder, OrderLine, AssemblyLine, SEPlant, OrderLinesExt>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (OrderLine.get_OrderLineSER)))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scOrderLinesExt.set_OrderLineBook)), (Expression) Expression.Convert((Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_4<SEOrder, OrderLine, AssemblyLine, SEPlant, OrderLinesExt>.get_oe), __typeref (VB\u0024AnonymousType_4<SEOrder, OrderLine, AssemblyLine, SEPlant, OrderLinesExt>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (OrderLinesExt.get_OrderLineBook))), typeof (Decimal))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scOrderLinesExt.set_OrderLineNet)), (Expression) Expression.Convert((Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_4<SEOrder, OrderLine, AssemblyLine, SEPlant, OrderLinesExt>.get_oe), __typeref (VB\u0024AnonymousType_4<SEOrder, OrderLine, AssemblyLine, SEPlant, OrderLinesExt>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (OrderLinesExt.get_OrderLineNet))), typeof (Decimal))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scOrderLinesExt.set_OrderLineOrgTargetDt)), (Expression) Expression.Convert((Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_4<SEOrder, OrderLine, AssemblyLine, SEPlant, OrderLinesExt>.get_oe), __typeref (VB\u0024AnonymousType_4<SEOrder, OrderLine, AssemblyLine, SEPlant, OrderLinesExt>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (OrderLinesExt.get_OrderLineOrgTargetDt))), typeof (DateTime))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scOrderLinesExt.set_OrderLineOrgShipDt)), (Expression) Expression.Convert((Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_4<SEOrder, OrderLine, AssemblyLine, SEPlant, OrderLinesExt>.get_oe), __typeref (VB\u0024AnonymousType_4<SEOrder, OrderLine, AssemblyLine, SEPlant, OrderLinesExt>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (OrderLinesExt.get_OrderLineOrgShipDt))), typeof (DateTime))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scOrderLinesExt.set_OrderLineOrgAssyStDt)), (Expression) Expression.Convert((Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_4<SEOrder, OrderLine, AssemblyLine, SEPlant, OrderLinesExt>.get_oe), __typeref (VB\u0024AnonymousType_4<SEOrder, OrderLine, AssemblyLine, SEPlant, OrderLinesExt>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (OrderLinesExt.get_OrderLineOrgAssyStDt))), typeof (DateTime))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scOrderLinesExt.set_OrderLineCurAssyStDt)), (Expression) Expression.Convert((Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_4<SEOrder, OrderLine, AssemblyLine, SEPlant, OrderLinesExt>.get_oe), __typeref (VB\u0024AnonymousType_4<SEOrder, OrderLine, AssemblyLine, SEPlant, OrderLinesExt>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (OrderLinesExt.get_OrderLineCurAssyStDt))), typeof (DateTime))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scOrderLinesExt.set_OrderLineActAssyStDt)), (Expression) Expression.Convert((Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_4<SEOrder, OrderLine, AssemblyLine, SEPlant, OrderLinesExt>.get_oe), __typeref (VB\u0024AnonymousType_4<SEOrder, OrderLine, AssemblyLine, SEPlant, OrderLinesExt>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (OrderLinesExt.get_OrderLineActAssyStDt))), typeof (DateTime))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scOrderLinesExt.set_OrderLineOrgEngrRelDt)), (Expression) Expression.Convert((Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_4<SEOrder, OrderLine, AssemblyLine, SEPlant, OrderLinesExt>.get_oe), __typeref (VB\u0024AnonymousType_4<SEOrder, OrderLine, AssemblyLine, SEPlant, OrderLinesExt>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (OrderLinesExt.get_OrderLineOrgEngrRelDt))), typeof (DateTime))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scOrderLinesExt.set_OrderLineCurEngrRelDt)), (Expression) Expression.Convert((Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_4<SEOrder, OrderLine, AssemblyLine, SEPlant, OrderLinesExt>.get_oe), __typeref (VB\u0024AnonymousType_4<SEOrder, OrderLine, AssemblyLine, SEPlant, OrderLinesExt>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (OrderLinesExt.get_OrderLineCurEngrRelDt))), typeof (DateTime))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scOrderLinesExt.set_OrderLineActEngrRelDt)), (Expression) Expression.Convert((Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_4<SEOrder, OrderLine, AssemblyLine, SEPlant, OrderLinesExt>.get_oe), __typeref (VB\u0024AnonymousType_4<SEOrder, OrderLine, AssemblyLine, SEPlant, OrderLinesExt>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (OrderLinesExt.get_OrderLineActEngrRelDt))), typeof (DateTime))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scOrderLinesExt.set_OrderLineNB4Dt)), (Expression) Expression.Convert((Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_4<SEOrder, OrderLine, AssemblyLine, SEPlant, OrderLinesExt>.get_oe), __typeref (VB\u0024AnonymousType_4<SEOrder, OrderLine, AssemblyLine, SEPlant, OrderLinesExt>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (OrderLinesExt.get_OrderLineNB4Dt))), typeof (DateTime))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scOrderLinesExt.set_OrderLineEngrGrp)), (Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_4<SEOrder, OrderLine, AssemblyLine, SEPlant, OrderLinesExt>.get_oe), __typeref (VB\u0024AnonymousType_4<SEOrder, OrderLine, AssemblyLine, SEPlant, OrderLinesExt>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (OrderLinesExt.get_OrderLineEngrGrp)))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scOrderLinesExt.set_OrderLineMechClpx)), (Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_4<SEOrder, OrderLine, AssemblyLine, SEPlant, OrderLinesExt>.get_oe), __typeref (VB\u0024AnonymousType_4<SEOrder, OrderLine, AssemblyLine, SEPlant, OrderLinesExt>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (OrderLinesExt.get_OrderLineMechClpx)))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scOrderLinesExt.set_OrderLineElecClpx)), (Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_4<SEOrder, OrderLine, AssemblyLine, SEPlant, OrderLinesExt>.get_oe), __typeref (VB\u0024AnonymousType_4<SEOrder, OrderLine, AssemblyLine, SEPlant, OrderLinesExt>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (OrderLinesExt.get_OrderLineElecClpx)))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scOrderLinesExt.set_OrderLineEngComposite)), (Expression) Expression.ConvertChecked((Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_4<SEOrder, OrderLine, AssemblyLine, SEPlant, OrderLinesExt>.get_oe), __typeref (VB\u0024AnonymousType_4<SEOrder, OrderLine, AssemblyLine, SEPlant, OrderLinesExt>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (OrderLinesExt.get_OrderLineEngComposite))), typeof (long))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scOrderLinesExt.set_OrderLinePeltCode)), (Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_4<SEOrder, OrderLine, AssemblyLine, SEPlant, OrderLinesExt>.get_oe), __typeref (VB\u0024AnonymousType_4<SEOrder, OrderLine, AssemblyLine, SEPlant, OrderLinesExt>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (OrderLinesExt.get_OrderLinePeltCode))))), new ParameterExpression[1]
          {
            parameterExpression2
          }));
          if (source != null && source.Count<scOrderImportInfo>() > 0)
          {
            scOrderImportInfoList = source.ToList<scOrderImportInfo>();
            clsPlant clsPlant = new clsPlant();
            scPlants scPlants = new scPlants();
            scPlants Plant = clsPlant.rtnPlantById(scOrderImportInfoList[0].SEPlantId);
            clsAssemblyLine clsAssemblyLine = new clsAssemblyLine(Plant);
            List<scOrderImportInfo>.Enumerator enumerator;
            try
            {
              enumerator = scOrderImportInfoList.GetEnumerator();
              while (enumerator.MoveNext())
              {
                scOrderImportInfo current = enumerator.Current;
                current.SEPlant = Plant;
                current.AssemblyLine = (scLevels) clsAssemblyLine.rtnAssemblyLineById(current.AssemblyLineId);
                current.OrderLineOE = this.rtnOrderLineAssocAssign(current.OrderLineId, emOLAssignType.OrderEngr);
                current.OrderLineME = this.rtnOrderLineAssocAssign(current.OrderLineId, emOLAssignType.MechEngr);
                current.OrderComments = this.rtnOrderLineComments(current.OrderLineId);
                current.OrderStatus = this.rtnOrderLineStatus(current.OrderLineId, 0);
              }
            }
            finally
            {
              enumerator.Dispose();
            }
          }
          se0085CtEntities1.Database.Connection.Close();
        }
      }
      return scOrderImportInfoList;
    }
  }
}
