// Decompiled with JetBrains decompiler
// Type: SE0085.CTdB.clsRoutings
// 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.dBc;
using SE0085.StCl;
using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Linq.Expressions;
using System.Reflection;
using System.Runtime.CompilerServices;

namespace SE0085.CTdB
{
  public class clsRoutings
  {
    private string _CTConnection;
    private scLevels _Plant;
    private scLevels _AssemblyLine;

    public clsRoutings()
    {
      this.GetdBConnString();
    }

    public clsRoutings(scLevels Plant, scLevels AssemblyLine)
    {
      this._Plant = Plant;
      this._AssemblyLine = AssemblyLine;
      this.GetdBConnString();
    }

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

    private void GetdBConnString()
    {
      clsDBC clsDbc = new clsDBC();
      clsDbc.GetServer((object) "SE0085CTEntities1");
      this._CTConnection = Conversions.ToString(clsDbc.ConnectionString);
    }

    public List<SE0085.StCl.scSectionsRoutingInfo> rtnRoutingWorkCenters(int SectionId)
    {
      // ISSUE: object of a compiler-generated type is created
      // ISSUE: variable of a compiler-generated type
      clsRoutings._Closure\u0024__63 closure63 = new clsRoutings._Closure\u0024__63();
      // ISSUE: reference to a compiler-generated field
      closure63.\u0024VB\u0024Local_SectionId = SectionId;
      List<SE0085.StCl.scSectionsRoutingInfo> sectionsRoutingInfoList = new List<SE0085.StCl.scSectionsRoutingInfo>();
      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: 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<SE0085.StCl.scSectionsRoutingInfo> source = (IQueryable<SE0085.StCl.scSectionsRoutingInfo>) Queryable.Select((IQueryable<M0>) Queryable.OrderBy(Queryable.Where((IQueryable<M0>) Queryable.Join((IQueryable<M0>) Queryable.Join((IQueryable<M0>) Queryable.Join((IQueryable<M0>) Queryable.Join((IQueryable<M0>) se0085CtEntities1.SEPlants, (IEnumerable<M1>) se0085CtEntities1.AssemblyLines, (Expression<Func<M0, M2>>) (pl => pl.SEPlantId), (Expression<Func<M1, M2>>) (al => al.SEPlant.SEPlantId), (Expression<Func<M0, M1, M3>>) ((pl, al) => new{ pl = pl, al = al })), (IEnumerable<M1>) se0085CtEntities1.OrderLines, (Expression<Func<M0, M2>>) (data => data.al.AssemLineId), (Expression<Func<M1, M2>>) (ol => ol.AssemblyLine.AssemLineId), (Expression<Func<M0, M1, M3>>) ((data, ol) => new{ \u0024VB\u0024It1 = data, 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.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{ pl = data.\u0024VB\u0024It1.\u0024VB\u0024It1.pl, al = data.\u0024VB\u0024It1.\u0024VB\u0024It1.al, ol = data.\u0024VB\u0024It1.ol, sc = data.sc, rt = rt })), (Expression<Func<M0, bool>>) Expression.Lambda<Func<VB\u0024AnonymousType_25<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting>, bool>>((Expression) Expression.And((Expression) Expression.And((Expression) Expression.Equal(\u0024VB\u0024It.pl.SEPlantId, this._Plant.LevelId, true, (MethodInfo) null), (Expression) Expression.Equal((Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression1, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_25<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting>.get_al), __typeref (VB\u0024AnonymousType_25<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (AssemblyLine.get_AssemLineId))), (Expression) Expression.Property((Expression) Expression.Field((Expression) Expression.Constant((object) this, typeof (clsRoutings)), FieldInfo.GetFieldFromHandle(__fieldref (clsRoutings._AssemblyLine))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scLevels.get_LevelId))), true, (MethodInfo) null)), (Expression) Expression.Equal((Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression1, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_25<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting>.get_sc), __typeref (VB\u0024AnonymousType_25<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (OrdSection.get_OrdSectsId))), (Expression) Expression.Field((Expression) Expression.Constant((object) closure63, typeof (clsRoutings._Closure\u0024__63)), FieldInfo.GetFieldFromHandle(__fieldref (clsRoutings._Closure\u0024__63.\u0024VB\u0024Local_SectionId))), true, (MethodInfo) null)), new ParameterExpression[1]{ parameterExpression1 })), (Expression<Func<M0, M1>>) (data => data.rt.RoutingSchStartDt)), (Expression<Func<M0, M1>>) Expression.Lambda<Func<VB\u0024AnonymousType_25<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting>, SE0085.StCl.scSectionsRoutingInfo>>((Expression) Expression.MemberInit(Expression.New((ConstructorInfo) MethodBase.GetMethodFromHandle(__methodref (SE0085.StCl.scSectionsRoutingInfo.\u002Ector)), (Expression[]) null), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (SE0085.StCl.scSectionsRoutingInfo.set_RoutingId)), (Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_25<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting>.get_rt), __typeref (VB\u0024AnonymousType_25<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (SectionsRouting.get_RoutingId)))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (SE0085.StCl.scSectionsRoutingInfo.set_RoutingActFinishDt)), (Expression) Expression.Convert((Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_25<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting>.get_rt), __typeref (VB\u0024AnonymousType_25<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (SectionsRouting.get_RoutingActFinishDt))), typeof (DateTime))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (SE0085.StCl.scSectionsRoutingInfo.set_RoutingActStartDt)), (Expression) Expression.Convert((Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_25<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting>.get_rt), __typeref (VB\u0024AnonymousType_25<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (SectionsRouting.get_RoutingActStartDt))), typeof (DateTime))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (SE0085.StCl.scSectionsRoutingInfo.set_RoutingNextWorkCtr)), (Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_25<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting>.get_rt), __typeref (VB\u0024AnonymousType_25<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (SectionsRouting.get_RoutingNextWorkCtr)))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (SE0085.StCl.scSectionsRoutingInfo.set_RoutingRunTimeMin)), (Expression) Expression.ConvertChecked((Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_25<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting>.get_rt), __typeref (VB\u0024AnonymousType_25<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (SectionsRouting.get_RoutingRunTimeMin))), typeof (int))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (SE0085.StCl.scSectionsRoutingInfo.set_RoutingSchFinishDt)), (Expression) Expression.Convert((Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_25<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting>.get_rt), __typeref (VB\u0024AnonymousType_25<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (SectionsRouting.get_RoutingSchFinishDt))), typeof (DateTime))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (SE0085.StCl.scSectionsRoutingInfo.set_RoutingSchStartDt)), (Expression) Expression.Convert((Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_25<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting>.get_rt), __typeref (VB\u0024AnonymousType_25<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (SectionsRouting.get_RoutingSchStartDt))), typeof (DateTime))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (SE0085.StCl.scSectionsRoutingInfo.set_RoutingWorkCenter)), (Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_25<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting>.get_rt), __typeref (VB\u0024AnonymousType_25<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (SectionsRouting.get_RoutingWorkCenter))))), new ParameterExpression[1]{ parameterExpression2 }));
        if (source.Count<SE0085.StCl.scSectionsRoutingInfo>() > 0)
          sectionsRoutingInfoList = source.ToList<SE0085.StCl.scSectionsRoutingInfo>();
        se0085CtEntities1.Database.Connection.Close();
      }
      return sectionsRoutingInfoList;
    }

    public List<string> rtnRoutingWorkCenterNames()
    {
      using (SE0085CTEntities1 se0085CtEntities1 = new SE0085CTEntities1())
      {
        se0085CtEntities1.Database.Connection.ConnectionString = this._CTConnection;
        ParameterExpression parameterExpression;
        // ISSUE: method reference
        // ISSUE: type reference
        // ISSUE: method reference
        // ISSUE: field reference
        // ISSUE: method reference
        IQueryable<string> source = ((IQueryable<string>) Queryable.Select((IQueryable<M0>) Queryable.OrderBy(Queryable.Where((IQueryable<M0>) Queryable.Join((IQueryable<M0>) Queryable.Join((IQueryable<M0>) Queryable.Join((IQueryable<M0>) Queryable.Join((IQueryable<M0>) se0085CtEntities1.SEPlants, (IEnumerable<M1>) se0085CtEntities1.AssemblyLines, (Expression<Func<M0, M2>>) (pl => pl.SEPlantId), (Expression<Func<M1, M2>>) (al => al.SEPlant.SEPlantId), (Expression<Func<M0, M1, M3>>) ((pl, al) => new{ pl = pl, al = al })), (IEnumerable<M1>) se0085CtEntities1.OrderLines, (Expression<Func<M0, M2>>) (data => data.al.AssemLineId), (Expression<Func<M1, M2>>) (ol => ol.AssemblyLine.AssemLineId), (Expression<Func<M0, M1, M3>>) ((data, ol) => new{ \u0024VB\u0024It1 = data, 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.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{ pl = data.\u0024VB\u0024It1.\u0024VB\u0024It1.pl, al = data.\u0024VB\u0024It1.\u0024VB\u0024It1.al, ol = data.\u0024VB\u0024It1.ol, sc = data.sc, rt = rt })), (Expression<Func<M0, bool>>) Expression.Lambda<Func<VB\u0024AnonymousType_25<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting>, bool>>((Expression) Expression.And((Expression) Expression.Equal(\u0024VB\u0024It.pl.SEPlantId, this._Plant.LevelId, true, (MethodInfo) null), (Expression) Expression.Equal((Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_25<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting>.get_al), __typeref (VB\u0024AnonymousType_25<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (AssemblyLine.get_AssemLineId))), (Expression) Expression.Property((Expression) Expression.Field((Expression) Expression.Constant((object) this, typeof (clsRoutings)), FieldInfo.GetFieldFromHandle(__fieldref (clsRoutings._AssemblyLine))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scLevels.get_LevelId))), true, (MethodInfo) null)), new ParameterExpression[1]{ parameterExpression })), (Expression<Func<M0, M1>>) (data => data.rt.RoutingWorkCenter)), (Expression<Func<M0, M1>>) (data => data.rt.RoutingWorkCenter))).Distinct<string>();
        if (source.Count<string>() > 0)
          return source.ToList<string>();
        return (List<string>) null;
      }
    }

    public List<string> rtnSectionRoutingWorkCenterNames(int SectionId)
    {
      // ISSUE: object of a compiler-generated type is created
      // ISSUE: variable of a compiler-generated type
      clsRoutings._Closure\u0024__64 closure64 = new clsRoutings._Closure\u0024__64();
      // ISSUE: reference to a compiler-generated field
      closure64.\u0024VB\u0024Local_SectionId = SectionId;
      using (SE0085CTEntities1 se0085CtEntities1 = new SE0085CTEntities1())
      {
        se0085CtEntities1.Database.Connection.ConnectionString = this._CTConnection;
        ParameterExpression parameterExpression;
        // 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
        IQueryable<string> source = ((IQueryable<string>) Queryable.Select((IQueryable<M0>) Queryable.OrderBy(Queryable.Where((IQueryable<M0>) Queryable.Join((IQueryable<M0>) Queryable.Join((IQueryable<M0>) Queryable.Join((IQueryable<M0>) Queryable.Join((IQueryable<M0>) se0085CtEntities1.SEPlants, (IEnumerable<M1>) se0085CtEntities1.AssemblyLines, (Expression<Func<M0, M2>>) (pl => pl.SEPlantId), (Expression<Func<M1, M2>>) (al => al.SEPlant.SEPlantId), (Expression<Func<M0, M1, M3>>) ((pl, al) => new{ pl = pl, al = al })), (IEnumerable<M1>) se0085CtEntities1.OrderLines, (Expression<Func<M0, M2>>) (data => data.al.AssemLineId), (Expression<Func<M1, M2>>) (ol => ol.AssemblyLine.AssemLineId), (Expression<Func<M0, M1, M3>>) ((data, ol) => new{ \u0024VB\u0024It1 = data, 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.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{ pl = data.\u0024VB\u0024It1.\u0024VB\u0024It1.pl, al = data.\u0024VB\u0024It1.\u0024VB\u0024It1.al, ol = data.\u0024VB\u0024It1.ol, sc = data.sc, rt = rt })), (Expression<Func<M0, bool>>) Expression.Lambda<Func<VB\u0024AnonymousType_25<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting>, bool>>((Expression) Expression.And((Expression) Expression.And((Expression) Expression.Equal(\u0024VB\u0024It.pl.SEPlantId, this._Plant.LevelId, true, (MethodInfo) null), (Expression) Expression.Equal((Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_25<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting>.get_al), __typeref (VB\u0024AnonymousType_25<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (AssemblyLine.get_AssemLineId))), (Expression) Expression.Property((Expression) Expression.Field((Expression) Expression.Constant((object) this, typeof (clsRoutings)), FieldInfo.GetFieldFromHandle(__fieldref (clsRoutings._AssemblyLine))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scLevels.get_LevelId))), true, (MethodInfo) null)), (Expression) Expression.Equal((Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_25<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting>.get_sc), __typeref (VB\u0024AnonymousType_25<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (OrdSection.get_OrdSectsId))), (Expression) Expression.Field((Expression) Expression.Constant((object) closure64, typeof (clsRoutings._Closure\u0024__64)), FieldInfo.GetFieldFromHandle(__fieldref (clsRoutings._Closure\u0024__64.\u0024VB\u0024Local_SectionId))), true, (MethodInfo) null)), new ParameterExpression[1]{ parameterExpression })), (Expression<Func<M0, M1>>) (data => data.rt.RoutingWorkCenter)), (Expression<Func<M0, M1>>) (data => data.rt.RoutingWorkCenter))).Distinct<string>();
        if (source.Count<string>() > 0)
          return source.ToList<string>();
        return (List<string>) null;
      }
    }

    public void DeleteRoutingData(string Q2C)
    {
      using (SE0085CTEntities1 se0085CtEntities1 = new SE0085CTEntities1())
      {
        se0085CtEntities1.Database.Connection.ConnectionString = this._CTConnection;
        se0085CtEntities1.sp_DeleteRoutingDataByQ2C(Q2C);
        se0085CtEntities1.Database.Connection.Close();
      }
    }

    public List<scRoutingCounts> rtnRoutingDashData(List<scRoutingCounts> RoutingList)
    {
      // ISSUE: object of a compiler-generated type is created
      // ISSUE: variable of a compiler-generated type
      clsRoutings._Closure\u0024__65 closure65 = new clsRoutings._Closure\u0024__65();
      // ISSUE: reference to a compiler-generated field
      closure65.\u0024VB\u0024Local_ldDefaultDate = Conversions.ToDate("01-01-1901");
      // ISSUE: reference to a compiler-generated field
      closure65.\u0024VB\u0024Local_ldQBeginDate = Conversions.ToDate("01-01-2013");
      // ISSUE: reference to a compiler-generated field
      closure65.\u0024VB\u0024Local_ldQEndDate = Conversions.ToDate("01-01-2039");
      List<int> intList = new List<int>();
      using (SE0085CTEntities1 se0085CtEntities1 = new SE0085CTEntities1())
      {
        se0085CtEntities1.Database.Connection.ConnectionString = this._CTConnection;
        List<scRoutingCounts>.Enumerator enumerator1;
        try
        {
          enumerator1 = RoutingList.GetEnumerator();
          while (enumerator1.MoveNext())
          {
            scRoutingCounts current1 = enumerator1.Current;
            // ISSUE: reference to a compiler-generated field
            closure65.\u0024VB\u0024Local_ldWorkCenter = current1.RoutingWorkCenter;
            // ISSUE: reference to a compiler-generated field
            closure65.\u0024VB\u0024Local_ldStartTime = current1.RoutingStartDt;
            // ISSUE: reference to a compiler-generated field
            closure65.\u0024VB\u0024Local_ldEndTime = current1.RoutingFinishDt;
            ParameterExpression parameterExpression1;
            // 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: 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
            IQueryable<int> source1 = (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.SEPlants, (IEnumerable<M1>) se0085CtEntities1.AssemblyLines, (Expression<Func<M0, M2>>) (pl => pl.SEPlantId), (Expression<Func<M1, M2>>) (al => al.SEPlant.SEPlantId), (Expression<Func<M0, M1, M3>>) ((pl, al) => new{ pl = pl, al = al })), (IEnumerable<M1>) se0085CtEntities1.OrderLines, (Expression<Func<M0, M2>>) (data => data.al.AssemLineId), (Expression<Func<M1, M2>>) (ol => ol.AssemblyLine.AssemLineId), (Expression<Func<M0, M1, M3>>) ((data, ol) => new{ \u0024VB\u0024It1 = data, 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.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{ pl = data.\u0024VB\u0024It1.\u0024VB\u0024It1.pl, al = data.\u0024VB\u0024It1.\u0024VB\u0024It1.al, ol = data.\u0024VB\u0024It1.ol, sc = data.sc, rt = rt })), (Expression<Func<M0, bool>>) Expression.Lambda<Func<VB\u0024AnonymousType_25<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting>, bool>>((Expression) Expression.Coalesce((Expression) Expression.And((Expression) Expression.And((Expression) Expression.Convert((Expression) Expression.And((Expression) Expression.And((Expression) Expression.Equal(\u0024VB\u0024It.pl.SEPlantId, this._Plant.LevelId, true, (MethodInfo) null), (Expression) Expression.Equal((Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression1, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_25<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting>.get_al), __typeref (VB\u0024AnonymousType_25<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (AssemblyLine.get_AssemLineId))), (Expression) Expression.Property((Expression) Expression.Field((Expression) Expression.Constant((object) this, typeof (clsRoutings)), FieldInfo.GetFieldFromHandle(__fieldref (clsRoutings._AssemblyLine))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scLevels.get_LevelId))), true, (MethodInfo) null)), (Expression) Expression.Equal((Expression) Expression.Call((Expression) null, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (Operators.CompareString)), (Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression1, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_25<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting>.get_rt), __typeref (VB\u0024AnonymousType_25<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (SectionsRouting.get_RoutingWorkCenter))), (Expression) Expression.Field((Expression) Expression.Constant((object) closure65, typeof (clsRoutings._Closure\u0024__65)), FieldInfo.GetFieldFromHandle(__fieldref (clsRoutings._Closure\u0024__65.\u0024VB\u0024Local_ldWorkCenter))), (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_25<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting>.get_rt), __typeref (VB\u0024AnonymousType_25<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (SectionsRouting.get_RoutingActFinishDt))), (Expression) Expression.Convert((Expression) Expression.Field((Expression) Expression.Constant((object) closure65, typeof (clsRoutings._Closure\u0024__65)), FieldInfo.GetFieldFromHandle(__fieldref (clsRoutings._Closure\u0024__65.\u0024VB\u0024Local_ldStartTime))), 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_25<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting>.get_rt), __typeref (VB\u0024AnonymousType_25<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (SectionsRouting.get_RoutingActFinishDt))), (Expression) Expression.Convert((Expression) Expression.Field((Expression) Expression.Constant((object) closure65, typeof (clsRoutings._Closure\u0024__65)), FieldInfo.GetFieldFromHandle(__fieldref (clsRoutings._Closure\u0024__65.\u0024VB\u0024Local_ldEndTime))), 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.sc.OrdSectsId));
            scRoutingCounts scRoutingCounts1 = current1;
            scRoutingCounts1.RoutingCompletions = checked ((short) ((int) scRoutingCounts1.RoutingCompletions + source1.Count<int>()));
            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: field reference
            // ISSUE: method 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: 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: field reference
            // ISSUE: method reference
            IQueryable<int> source2 = (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.SEPlants, (IEnumerable<M1>) se0085CtEntities1.AssemblyLines, (Expression<Func<M0, M2>>) (pl => pl.SEPlantId), (Expression<Func<M1, M2>>) (al => al.SEPlant.SEPlantId), (Expression<Func<M0, M1, M3>>) ((pl, al) => new{ pl = pl, al = al })), (IEnumerable<M1>) se0085CtEntities1.OrderLines, (Expression<Func<M0, M2>>) (data => data.al.AssemLineId), (Expression<Func<M1, M2>>) (ol => ol.AssemblyLine.AssemLineId), (Expression<Func<M0, M1, M3>>) ((data, ol) => new{ \u0024VB\u0024It1 = data, 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.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{ pl = data.\u0024VB\u0024It1.\u0024VB\u0024It1.pl, al = data.\u0024VB\u0024It1.\u0024VB\u0024It1.al, ol = data.\u0024VB\u0024It1.ol, sc = data.sc, rt = rt })), (Expression<Func<M0, bool>>) Expression.Lambda<Func<VB\u0024AnonymousType_25<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting>, bool>>((Expression) Expression.Coalesce((Expression) Expression.And((Expression) Expression.And((Expression) Expression.And((Expression) Expression.And((Expression) Expression.And((Expression) Expression.And((Expression) Expression.Convert((Expression) Expression.And((Expression) Expression.Equal(\u0024VB\u0024It.pl.SEPlantId, this._Plant.LevelId, true, (MethodInfo) null), (Expression) Expression.Equal((Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_25<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting>.get_al), __typeref (VB\u0024AnonymousType_25<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (AssemblyLine.get_AssemLineId))), (Expression) Expression.Property((Expression) Expression.Field((Expression) Expression.Constant((object) this, typeof (clsRoutings)), FieldInfo.GetFieldFromHandle(__fieldref (clsRoutings._AssemblyLine))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scLevels.get_LevelId))), true, (MethodInfo) null)), typeof (bool?)), (Expression) Expression.GreaterThan((Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_25<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting>.get_ol), __typeref (VB\u0024AnonymousType_25<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (OrderLine.get_OrderLineShipDt))), (Expression) Expression.Convert((Expression) Expression.Field((Expression) Expression.Constant((object) closure65, typeof (clsRoutings._Closure\u0024__65)), FieldInfo.GetFieldFromHandle(__fieldref (clsRoutings._Closure\u0024__65.\u0024VB\u0024Local_ldQBeginDate))), typeof (DateTime?)), true, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (DateTime.op_GreaterThan)))), (Expression) Expression.LessThan((Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_25<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting>.get_ol), __typeref (VB\u0024AnonymousType_25<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (OrderLine.get_OrderLineShipDt))), (Expression) Expression.Convert((Expression) Expression.Field((Expression) Expression.Constant((object) closure65, typeof (clsRoutings._Closure\u0024__65)), FieldInfo.GetFieldFromHandle(__fieldref (clsRoutings._Closure\u0024__65.\u0024VB\u0024Local_ldQEndDate))), typeof (DateTime?)), true, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (DateTime.op_LessThan)))), (Expression) Expression.Convert((Expression) Expression.Equal((Expression) Expression.Call((Expression) null, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (Operators.CompareString)), (Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_25<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting>.get_rt), __typeref (VB\u0024AnonymousType_25<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (SectionsRouting.get_RoutingWorkCenter))), (Expression) Expression.Field((Expression) Expression.Constant((object) closure65, typeof (clsRoutings._Closure\u0024__65)), FieldInfo.GetFieldFromHandle(__fieldref (clsRoutings._Closure\u0024__65.\u0024VB\u0024Local_ldWorkCenter))), (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) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_25<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting>.get_rt), __typeref (VB\u0024AnonymousType_25<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (SectionsRouting.get_RoutingSchStartDt))), (Expression) Expression.Convert((Expression) Expression.Field((Expression) Expression.Constant((object) closure65, typeof (clsRoutings._Closure\u0024__65)), FieldInfo.GetFieldFromHandle(__fieldref (clsRoutings._Closure\u0024__65.\u0024VB\u0024Local_ldQBeginDate))), typeof (DateTime?)), true, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (DateTime.op_GreaterThanOrEqual)))), (Expression) Expression.LessThanOrEqual((Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_25<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting>.get_rt), __typeref (VB\u0024AnonymousType_25<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (SectionsRouting.get_RoutingSchFinishDt))), (Expression) Expression.Convert((Expression) Expression.Field((Expression) Expression.Constant((object) closure65, typeof (clsRoutings._Closure\u0024__65)), FieldInfo.GetFieldFromHandle(__fieldref (clsRoutings._Closure\u0024__65.\u0024VB\u0024Local_ldEndTime))), typeof (DateTime?)), true, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (DateTime.op_LessThanOrEqual)))), (Expression) Expression.LessThanOrEqual((Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_25<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting>.get_rt), __typeref (VB\u0024AnonymousType_25<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (SectionsRouting.get_RoutingActFinishDt))), (Expression) Expression.Convert((Expression) Expression.Field((Expression) Expression.Constant((object) closure65, typeof (clsRoutings._Closure\u0024__65)), FieldInfo.GetFieldFromHandle(__fieldref (clsRoutings._Closure\u0024__65.\u0024VB\u0024Local_ldDefaultDate))), typeof (DateTime?)), true, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (DateTime.op_LessThanOrEqual)))), (Expression) Expression.Constant((object) false, typeof (bool))), new ParameterExpression[1]{ parameterExpression2 })), (Expression<Func<M0, M1>>) (data => data.sc.OrdSectsId));
            if (source2 != null && source2.Count<int>() > 0)
            {
              scRoutingCounts scRoutingCounts2 = current1;
              scRoutingCounts2.RoutingBacklog = checked ((short) ((int) scRoutingCounts2.RoutingBacklog + source2.Count<int>()));
            }
            ParameterExpression parameterExpression3;
            // 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: field reference
            // ISSUE: method 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: 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: field reference
            // ISSUE: method reference
            IQueryable<int> source3 = (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.SEPlants, (IEnumerable<M1>) se0085CtEntities1.AssemblyLines, (Expression<Func<M0, M2>>) (pl => pl.SEPlantId), (Expression<Func<M1, M2>>) (al => al.SEPlant.SEPlantId), (Expression<Func<M0, M1, M3>>) ((pl, al) => new{ pl = pl, al = al })), (IEnumerable<M1>) se0085CtEntities1.OrderLines, (Expression<Func<M0, M2>>) (data => data.al.AssemLineId), (Expression<Func<M1, M2>>) (ol => ol.AssemblyLine.AssemLineId), (Expression<Func<M0, M1, M3>>) ((data, ol) => new{ \u0024VB\u0024It1 = data, 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.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{ pl = data.\u0024VB\u0024It1.\u0024VB\u0024It1.pl, al = data.\u0024VB\u0024It1.\u0024VB\u0024It1.al, ol = data.\u0024VB\u0024It1.ol, sc = data.sc, rt = rt })), (Expression<Func<M0, bool>>) Expression.Lambda<Func<VB\u0024AnonymousType_25<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting>, bool>>((Expression) Expression.Coalesce((Expression) Expression.And((Expression) Expression.And((Expression) Expression.And((Expression) Expression.And((Expression) Expression.And((Expression) Expression.And((Expression) Expression.Convert((Expression) Expression.And((Expression) Expression.Equal(\u0024VB\u0024It.pl.SEPlantId, this._Plant.LevelId, true, (MethodInfo) null), (Expression) Expression.Equal((Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression3, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_25<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting>.get_al), __typeref (VB\u0024AnonymousType_25<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (AssemblyLine.get_AssemLineId))), (Expression) Expression.Property((Expression) Expression.Field((Expression) Expression.Constant((object) this, typeof (clsRoutings)), FieldInfo.GetFieldFromHandle(__fieldref (clsRoutings._AssemblyLine))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scLevels.get_LevelId))), true, (MethodInfo) null)), typeof (bool?)), (Expression) Expression.GreaterThan((Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression3, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_25<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting>.get_ol), __typeref (VB\u0024AnonymousType_25<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (OrderLine.get_OrderLineShipDt))), (Expression) Expression.Convert((Expression) Expression.Field((Expression) Expression.Constant((object) closure65, typeof (clsRoutings._Closure\u0024__65)), FieldInfo.GetFieldFromHandle(__fieldref (clsRoutings._Closure\u0024__65.\u0024VB\u0024Local_ldQBeginDate))), typeof (DateTime?)), true, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (DateTime.op_GreaterThan)))), (Expression) Expression.LessThan((Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression3, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_25<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting>.get_ol), __typeref (VB\u0024AnonymousType_25<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (OrderLine.get_OrderLineShipDt))), (Expression) Expression.Convert((Expression) Expression.Field((Expression) Expression.Constant((object) closure65, typeof (clsRoutings._Closure\u0024__65)), FieldInfo.GetFieldFromHandle(__fieldref (clsRoutings._Closure\u0024__65.\u0024VB\u0024Local_ldQEndDate))), typeof (DateTime?)), true, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (DateTime.op_LessThan)))), (Expression) Expression.Convert((Expression) Expression.Equal((Expression) Expression.Call((Expression) null, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (Operators.CompareString)), (Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression3, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_25<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting>.get_rt), __typeref (VB\u0024AnonymousType_25<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (SectionsRouting.get_RoutingWorkCenter))), (Expression) Expression.Field((Expression) Expression.Constant((object) closure65, typeof (clsRoutings._Closure\u0024__65)), FieldInfo.GetFieldFromHandle(__fieldref (clsRoutings._Closure\u0024__65.\u0024VB\u0024Local_ldWorkCenter))), (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) parameterExpression3, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_25<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting>.get_rt), __typeref (VB\u0024AnonymousType_25<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (SectionsRouting.get_RoutingSchStartDt))), (Expression) Expression.Convert((Expression) Expression.Field((Expression) Expression.Constant((object) closure65, typeof (clsRoutings._Closure\u0024__65)), FieldInfo.GetFieldFromHandle(__fieldref (clsRoutings._Closure\u0024__65.\u0024VB\u0024Local_ldQBeginDate))), typeof (DateTime?)), true, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (DateTime.op_GreaterThanOrEqual)))), (Expression) Expression.LessThan((Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression3, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_25<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting>.get_rt), __typeref (VB\u0024AnonymousType_25<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (SectionsRouting.get_RoutingSchFinishDt))), (Expression) Expression.Convert((Expression) Expression.Field((Expression) Expression.Constant((object) closure65, typeof (clsRoutings._Closure\u0024__65)), FieldInfo.GetFieldFromHandle(__fieldref (clsRoutings._Closure\u0024__65.\u0024VB\u0024Local_ldQEndDate))), typeof (DateTime?)), true, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (DateTime.op_LessThan)))), (Expression) Expression.LessThanOrEqual((Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression3, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_25<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting>.get_rt), __typeref (VB\u0024AnonymousType_25<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (SectionsRouting.get_RoutingActFinishDt))), (Expression) Expression.Convert((Expression) Expression.Field((Expression) Expression.Constant((object) closure65, typeof (clsRoutings._Closure\u0024__65)), FieldInfo.GetFieldFromHandle(__fieldref (clsRoutings._Closure\u0024__65.\u0024VB\u0024Local_ldDefaultDate))), typeof (DateTime?)), true, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (DateTime.op_LessThanOrEqual)))), (Expression) Expression.Constant((object) false, typeof (bool))), new ParameterExpression[1]{ parameterExpression3 })), (Expression<Func<M0, M1>>) (data => data.sc.OrdSectsId));
            if (source3 != null && source3.Count<int>() > 0)
            {
              List<int> list = source3.ToList<int>();
              List<int>.Enumerator enumerator2;
              try
              {
                enumerator2 = list.GetEnumerator();
                while (enumerator2.MoveNext())
                {
                  int current2 = enumerator2.Current;
                  clsRoutings.rltBklWIP rltBklWip = new clsRoutings.rltBklWIP(true);
                  // ISSUE: reference to a compiler-generated field
                  rltBklWip = this.ProdStatus(current2, closure65.\u0024VB\u0024Local_ldWorkCenter);
                  if (rltBklWip.IsWcWIPq | rltBklWip.IsWcWIPip)
                  {
                    scRoutingCounts scRoutingCounts2 = current1;
                    scRoutingCounts2.RoutingWIP = checked ((short) ((int) scRoutingCounts2.RoutingWIP + 1));
                  }
                }
              }
              finally
              {
                enumerator2.Dispose();
              }
            }
          }
        }
        finally
        {
          enumerator1.Dispose();
        }
        se0085CtEntities1.Database.Connection.Close();
      }
      return RoutingList;
    }

    public List<scRoutingCounts> rtnRoutingWorkCenterCompletions(List<scRoutingCounts> RoutingList)
    {
      // ISSUE: object of a compiler-generated type is created
      // ISSUE: variable of a compiler-generated type
      clsRoutings._Closure\u0024__66 closure66 = new clsRoutings._Closure\u0024__66();
      // ISSUE: reference to a compiler-generated field
      closure66.\u0024VB\u0024Local_ldFIFOWC01 = "CBLUGDR";
      // ISSUE: reference to a compiler-generated field
      closure66.\u0024VB\u0024Local_ldFIFOWC02 = "STRUWIRE";
      // ISSUE: reference to a compiler-generated field
      closure66.\u0024VB\u0024Local_ldPackOutWC01 = "NEMA3R";
      // ISSUE: reference to a compiler-generated field
      closure66.\u0024VB\u0024Local_ldPackOutWC02 = "PACKOUT";
      using (SE0085CTEntities1 se0085CtEntities1 = new SE0085CTEntities1())
      {
        se0085CtEntities1.Database.Connection.ConnectionString = this._CTConnection;
        List<scRoutingCounts>.Enumerator enumerator1;
        try
        {
          enumerator1 = RoutingList.GetEnumerator();
          while (enumerator1.MoveNext())
          {
            scRoutingCounts current1 = enumerator1.Current;
            // ISSUE: reference to a compiler-generated field
            closure66.\u0024VB\u0024Local_ldWorkCenter = current1.RoutingWorkCenter;
            // ISSUE: reference to a compiler-generated field
            closure66.\u0024VB\u0024Local_ldStartTime = current1.RoutingStartDt;
            // ISSUE: reference to a compiler-generated field
            closure66.\u0024VB\u0024Local_ldEndTime = current1.RoutingFinishDt;
            // ISSUE: reference to a compiler-generated field
            if (Operators.CompareString(closure66.\u0024VB\u0024Local_ldWorkCenter, "FIFO", false) == 0)
            {
              ParameterExpression parameterExpression1;
              // 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: 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
              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.SEPlants, (IEnumerable<M1>) se0085CtEntities1.AssemblyLines, (Expression<Func<M0, M2>>) (pl => pl.SEPlantId), (Expression<Func<M1, M2>>) (al => al.SEPlant.SEPlantId), (Expression<Func<M0, M1, M3>>) ((pl, al) => new{ pl = pl, al = al })), (IEnumerable<M1>) se0085CtEntities1.OrderLines, (Expression<Func<M0, M2>>) (data => data.al.AssemLineId), (Expression<Func<M1, M2>>) (ol => ol.AssemblyLine.AssemLineId), (Expression<Func<M0, M1, M3>>) ((data, ol) => new{ \u0024VB\u0024It1 = data, 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.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{ pl = data.\u0024VB\u0024It1.\u0024VB\u0024It1.pl, al = data.\u0024VB\u0024It1.\u0024VB\u0024It1.al, ol = data.\u0024VB\u0024It1.ol, sc = data.sc, rt = rt })), (Expression<Func<M0, bool>>) Expression.Lambda<Func<VB\u0024AnonymousType_25<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting>, bool>>((Expression) Expression.Coalesce((Expression) Expression.And((Expression) Expression.And((Expression) Expression.Convert((Expression) Expression.And((Expression) Expression.And((Expression) Expression.Equal(\u0024VB\u0024It.pl.SEPlantId, this._Plant.LevelId, true, (MethodInfo) null), (Expression) Expression.Equal((Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression1, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_25<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting>.get_al), __typeref (VB\u0024AnonymousType_25<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (AssemblyLine.get_AssemLineId))), (Expression) Expression.Property((Expression) Expression.Field((Expression) Expression.Constant((object) this, typeof (clsRoutings)), FieldInfo.GetFieldFromHandle(__fieldref (clsRoutings._AssemblyLine))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scLevels.get_LevelId))), true, (MethodInfo) null)), (Expression) Expression.Equal((Expression) Expression.Call((Expression) null, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (Operators.CompareString)), (Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression1, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_25<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting>.get_rt), __typeref (VB\u0024AnonymousType_25<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (SectionsRouting.get_RoutingWorkCenter))), (Expression) Expression.Field((Expression) Expression.Constant((object) closure66, typeof (clsRoutings._Closure\u0024__66)), FieldInfo.GetFieldFromHandle(__fieldref (clsRoutings._Closure\u0024__66.\u0024VB\u0024Local_ldFIFOWC01))), (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_25<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting>.get_rt), __typeref (VB\u0024AnonymousType_25<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (SectionsRouting.get_RoutingActFinishDt))), (Expression) Expression.Convert((Expression) Expression.Field((Expression) Expression.Constant((object) closure66, typeof (clsRoutings._Closure\u0024__66)), FieldInfo.GetFieldFromHandle(__fieldref (clsRoutings._Closure\u0024__66.\u0024VB\u0024Local_ldStartTime))), 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_25<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting>.get_rt), __typeref (VB\u0024AnonymousType_25<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (SectionsRouting.get_RoutingActFinishDt))), (Expression) Expression.Convert((Expression) Expression.Field((Expression) Expression.Constant((object) closure66, typeof (clsRoutings._Closure\u0024__66)), FieldInfo.GetFieldFromHandle(__fieldref (clsRoutings._Closure\u0024__66.\u0024VB\u0024Local_ldEndTime))), 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.sc.OrdSectsId));
              IEnumerator<int> enumerator2;
              if (source.Count<int>() > 0)
              {
                try
                {
                  enumerator2 = source.GetEnumerator();
                  while (enumerator2.MoveNext())
                  {
                    int current2 = enumerator2.Current;
                    // ISSUE: reference to a compiler-generated field
                    closure66.\u0024VB\u0024Local_ldFIFOSectionId = current2;
                    ParameterExpression parameterExpression2;
                    // 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: type reference
                    // ISSUE: method reference
                    // ISSUE: field reference
                    if (((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.SEPlants, (IEnumerable<M1>) se0085CtEntities1.AssemblyLines, (Expression<Func<M0, M2>>) (pl => pl.SEPlantId), (Expression<Func<M1, M2>>) (al => al.SEPlant.SEPlantId), (Expression<Func<M0, M1, M3>>) ((pl, al) => new{ pl = pl, al = al })), (IEnumerable<M1>) se0085CtEntities1.OrderLines, (Expression<Func<M0, M2>>) (data => data.al.AssemLineId), (Expression<Func<M1, M2>>) (ol => ol.AssemblyLine.AssemLineId), (Expression<Func<M0, M1, M3>>) ((data, ol) => new{ \u0024VB\u0024It1 = data, 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.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{ pl = data.\u0024VB\u0024It1.\u0024VB\u0024It1.pl, al = data.\u0024VB\u0024It1.\u0024VB\u0024It1.al, ol = data.\u0024VB\u0024It1.ol, sc = data.sc, rt = rt })), (Expression<Func<M0, bool>>) Expression.Lambda<Func<VB\u0024AnonymousType_25<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting>, bool>>((Expression) Expression.And((Expression) Expression.And((Expression) Expression.And((Expression) Expression.Equal(\u0024VB\u0024It.pl.SEPlantId, this._Plant.LevelId, true, (MethodInfo) null), (Expression) Expression.Equal((Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_25<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting>.get_al), __typeref (VB\u0024AnonymousType_25<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (AssemblyLine.get_AssemLineId))), (Expression) Expression.Property((Expression) Expression.Field((Expression) Expression.Constant((object) this, typeof (clsRoutings)), FieldInfo.GetFieldFromHandle(__fieldref (clsRoutings._AssemblyLine))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scLevels.get_LevelId))), true, (MethodInfo) null)), (Expression) Expression.Equal((Expression) Expression.Call((Expression) null, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (Operators.CompareString)), (Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_25<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting>.get_rt), __typeref (VB\u0024AnonymousType_25<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (SectionsRouting.get_RoutingWorkCenter))), (Expression) Expression.Field((Expression) Expression.Constant((object) closure66, typeof (clsRoutings._Closure\u0024__66)), FieldInfo.GetFieldFromHandle(__fieldref (clsRoutings._Closure\u0024__66.\u0024VB\u0024Local_ldFIFOWC02))), (Expression) Expression.Constant((object) false, typeof (bool))), (Expression) Expression.Constant((object) 0, typeof (int)))), (Expression) Expression.Equal((Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_25<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting>.get_sc), __typeref (VB\u0024AnonymousType_25<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (OrdSection.get_OrdSectsId))), (Expression) Expression.Field((Expression) Expression.Constant((object) closure66, typeof (clsRoutings._Closure\u0024__66)), FieldInfo.GetFieldFromHandle(__fieldref (clsRoutings._Closure\u0024__66.\u0024VB\u0024Local_ldFIFOSectionId))), true, (MethodInfo) null)), new ParameterExpression[1]{ parameterExpression2 })), (Expression<Func<M0, M1>>) (data => data.sc.OrdSectsId))).Count<int>() == 0)
                    {
                      scRoutingCounts scRoutingCounts = current1;
                      scRoutingCounts.RoutingCompletions = checked ((short) ((int) scRoutingCounts.RoutingCompletions + 1));
                    }
                  }
                }
                finally
                {
                  if (enumerator2 != null)
                    enumerator2.Dispose();
                }
              }
              // ISSUE: reference to a compiler-generated field
              // ISSUE: reference to a compiler-generated field
              closure66.\u0024VB\u0024Local_ldWorkCenter = closure66.\u0024VB\u0024Local_ldFIFOWC02;
            }
            else
            {
              // ISSUE: reference to a compiler-generated field
              if (Operators.CompareString(closure66.\u0024VB\u0024Local_ldWorkCenter, "PACKOUT", false) == 0)
              {
                ParameterExpression parameterExpression1;
                // 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: 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
                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.SEPlants, (IEnumerable<M1>) se0085CtEntities1.AssemblyLines, (Expression<Func<M0, M2>>) (pl => pl.SEPlantId), (Expression<Func<M1, M2>>) (al => al.SEPlant.SEPlantId), (Expression<Func<M0, M1, M3>>) ((pl, al) => new{ pl = pl, al = al })), (IEnumerable<M1>) se0085CtEntities1.OrderLines, (Expression<Func<M0, M2>>) (data => data.al.AssemLineId), (Expression<Func<M1, M2>>) (ol => ol.AssemblyLine.AssemLineId), (Expression<Func<M0, M1, M3>>) ((data, ol) => new{ \u0024VB\u0024It1 = data, 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.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{ pl = data.\u0024VB\u0024It1.\u0024VB\u0024It1.pl, al = data.\u0024VB\u0024It1.\u0024VB\u0024It1.al, ol = data.\u0024VB\u0024It1.ol, sc = data.sc, rt = rt })), (Expression<Func<M0, bool>>) Expression.Lambda<Func<VB\u0024AnonymousType_25<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting>, bool>>((Expression) Expression.Coalesce((Expression) Expression.And((Expression) Expression.And((Expression) Expression.Convert((Expression) Expression.And((Expression) Expression.And((Expression) Expression.Equal(\u0024VB\u0024It.pl.SEPlantId, this._Plant.LevelId, true, (MethodInfo) null), (Expression) Expression.Equal((Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression1, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_25<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting>.get_al), __typeref (VB\u0024AnonymousType_25<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (AssemblyLine.get_AssemLineId))), (Expression) Expression.Property((Expression) Expression.Field((Expression) Expression.Constant((object) this, typeof (clsRoutings)), FieldInfo.GetFieldFromHandle(__fieldref (clsRoutings._AssemblyLine))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scLevels.get_LevelId))), true, (MethodInfo) null)), (Expression) Expression.Equal((Expression) Expression.Call((Expression) null, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (Operators.CompareString)), (Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression1, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_25<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting>.get_rt), __typeref (VB\u0024AnonymousType_25<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (SectionsRouting.get_RoutingWorkCenter))), (Expression) Expression.Field((Expression) Expression.Constant((object) closure66, typeof (clsRoutings._Closure\u0024__66)), FieldInfo.GetFieldFromHandle(__fieldref (clsRoutings._Closure\u0024__66.\u0024VB\u0024Local_ldPackOutWC01))), (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_25<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting>.get_rt), __typeref (VB\u0024AnonymousType_25<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (SectionsRouting.get_RoutingActFinishDt))), (Expression) Expression.Convert((Expression) Expression.Field((Expression) Expression.Constant((object) closure66, typeof (clsRoutings._Closure\u0024__66)), FieldInfo.GetFieldFromHandle(__fieldref (clsRoutings._Closure\u0024__66.\u0024VB\u0024Local_ldStartTime))), 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_25<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting>.get_rt), __typeref (VB\u0024AnonymousType_25<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (SectionsRouting.get_RoutingActFinishDt))), (Expression) Expression.Convert((Expression) Expression.Field((Expression) Expression.Constant((object) closure66, typeof (clsRoutings._Closure\u0024__66)), FieldInfo.GetFieldFromHandle(__fieldref (clsRoutings._Closure\u0024__66.\u0024VB\u0024Local_ldEndTime))), 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.sc.OrdSectsId));
                IEnumerator<int> enumerator2;
                if (source.Count<int>() > 0)
                {
                  try
                  {
                    enumerator2 = source.GetEnumerator();
                    while (enumerator2.MoveNext())
                    {
                      int current2 = enumerator2.Current;
                      // ISSUE: reference to a compiler-generated field
                      closure66.\u0024VB\u0024Local_ldFIFOSectionId = current2;
                      ParameterExpression parameterExpression2;
                      // 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: type reference
                      // ISSUE: method reference
                      // ISSUE: field reference
                      if (((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.SEPlants, (IEnumerable<M1>) se0085CtEntities1.AssemblyLines, (Expression<Func<M0, M2>>) (pl => pl.SEPlantId), (Expression<Func<M1, M2>>) (al => al.SEPlant.SEPlantId), (Expression<Func<M0, M1, M3>>) ((pl, al) => new{ pl = pl, al = al })), (IEnumerable<M1>) se0085CtEntities1.OrderLines, (Expression<Func<M0, M2>>) (data => data.al.AssemLineId), (Expression<Func<M1, M2>>) (ol => ol.AssemblyLine.AssemLineId), (Expression<Func<M0, M1, M3>>) ((data, ol) => new{ \u0024VB\u0024It1 = data, 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.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{ pl = data.\u0024VB\u0024It1.\u0024VB\u0024It1.pl, al = data.\u0024VB\u0024It1.\u0024VB\u0024It1.al, ol = data.\u0024VB\u0024It1.ol, sc = data.sc, rt = rt })), (Expression<Func<M0, bool>>) Expression.Lambda<Func<VB\u0024AnonymousType_25<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting>, bool>>((Expression) Expression.And((Expression) Expression.And((Expression) Expression.And((Expression) Expression.Equal(\u0024VB\u0024It.pl.SEPlantId, this._Plant.LevelId, true, (MethodInfo) null), (Expression) Expression.Equal((Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_25<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting>.get_al), __typeref (VB\u0024AnonymousType_25<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (AssemblyLine.get_AssemLineId))), (Expression) Expression.Property((Expression) Expression.Field((Expression) Expression.Constant((object) this, typeof (clsRoutings)), FieldInfo.GetFieldFromHandle(__fieldref (clsRoutings._AssemblyLine))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scLevels.get_LevelId))), true, (MethodInfo) null)), (Expression) Expression.Equal((Expression) Expression.Call((Expression) null, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (Operators.CompareString)), (Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_25<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting>.get_rt), __typeref (VB\u0024AnonymousType_25<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (SectionsRouting.get_RoutingWorkCenter))), (Expression) Expression.Field((Expression) Expression.Constant((object) closure66, typeof (clsRoutings._Closure\u0024__66)), FieldInfo.GetFieldFromHandle(__fieldref (clsRoutings._Closure\u0024__66.\u0024VB\u0024Local_ldPackOutWC02))), (Expression) Expression.Constant((object) false, typeof (bool))), (Expression) Expression.Constant((object) 0, typeof (int)))), (Expression) Expression.Equal((Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_25<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting>.get_sc), __typeref (VB\u0024AnonymousType_25<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (OrdSection.get_OrdSectsId))), (Expression) Expression.Field((Expression) Expression.Constant((object) closure66, typeof (clsRoutings._Closure\u0024__66)), FieldInfo.GetFieldFromHandle(__fieldref (clsRoutings._Closure\u0024__66.\u0024VB\u0024Local_ldFIFOSectionId))), true, (MethodInfo) null)), new ParameterExpression[1]{ parameterExpression2 })), (Expression<Func<M0, M1>>) (data => data.sc.OrdSectsId))).Count<int>() == 0)
                      {
                        scRoutingCounts scRoutingCounts = current1;
                        scRoutingCounts.RoutingCompletions = checked ((short) ((int) scRoutingCounts.RoutingCompletions + 1));
                      }
                    }
                  }
                  finally
                  {
                    if (enumerator2 != null)
                      enumerator2.Dispose();
                  }
                }
                // ISSUE: reference to a compiler-generated field
                // ISSUE: reference to a compiler-generated field
                closure66.\u0024VB\u0024Local_ldWorkCenter = closure66.\u0024VB\u0024Local_ldPackOutWC02;
              }
            }
            ParameterExpression parameterExpression;
            // 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: 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
            IQueryable<int> source1 = (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.SEPlants, (IEnumerable<M1>) se0085CtEntities1.AssemblyLines, (Expression<Func<M0, M2>>) (pl => pl.SEPlantId), (Expression<Func<M1, M2>>) (al => al.SEPlant.SEPlantId), (Expression<Func<M0, M1, M3>>) ((pl, al) => new{ pl = pl, al = al })), (IEnumerable<M1>) se0085CtEntities1.OrderLines, (Expression<Func<M0, M2>>) (data => data.al.AssemLineId), (Expression<Func<M1, M2>>) (ol => ol.AssemblyLine.AssemLineId), (Expression<Func<M0, M1, M3>>) ((data, ol) => new{ \u0024VB\u0024It1 = data, 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.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{ pl = data.\u0024VB\u0024It1.\u0024VB\u0024It1.pl, al = data.\u0024VB\u0024It1.\u0024VB\u0024It1.al, ol = data.\u0024VB\u0024It1.ol, sc = data.sc, rt = rt })), (Expression<Func<M0, bool>>) Expression.Lambda<Func<VB\u0024AnonymousType_25<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting>, bool>>((Expression) Expression.Coalesce((Expression) Expression.And((Expression) Expression.And((Expression) Expression.Convert((Expression) Expression.And((Expression) Expression.And((Expression) Expression.Equal(\u0024VB\u0024It.pl.SEPlantId, this._Plant.LevelId, true, (MethodInfo) null), (Expression) Expression.Equal((Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_25<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting>.get_al), __typeref (VB\u0024AnonymousType_25<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (AssemblyLine.get_AssemLineId))), (Expression) Expression.Property((Expression) Expression.Field((Expression) Expression.Constant((object) this, typeof (clsRoutings)), FieldInfo.GetFieldFromHandle(__fieldref (clsRoutings._AssemblyLine))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scLevels.get_LevelId))), true, (MethodInfo) null)), (Expression) Expression.Equal((Expression) Expression.Call((Expression) null, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (Operators.CompareString)), (Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_25<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting>.get_rt), __typeref (VB\u0024AnonymousType_25<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (SectionsRouting.get_RoutingWorkCenter))), (Expression) Expression.Field((Expression) Expression.Constant((object) closure66, typeof (clsRoutings._Closure\u0024__66)), FieldInfo.GetFieldFromHandle(__fieldref (clsRoutings._Closure\u0024__66.\u0024VB\u0024Local_ldWorkCenter))), (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) parameterExpression, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_25<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting>.get_rt), __typeref (VB\u0024AnonymousType_25<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (SectionsRouting.get_RoutingActFinishDt))), (Expression) Expression.Convert((Expression) Expression.Field((Expression) Expression.Constant((object) closure66, typeof (clsRoutings._Closure\u0024__66)), FieldInfo.GetFieldFromHandle(__fieldref (clsRoutings._Closure\u0024__66.\u0024VB\u0024Local_ldStartTime))), typeof (DateTime?)), true, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (DateTime.op_GreaterThanOrEqual)))), (Expression) Expression.LessThanOrEqual((Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_25<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting>.get_rt), __typeref (VB\u0024AnonymousType_25<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (SectionsRouting.get_RoutingActFinishDt))), (Expression) Expression.Convert((Expression) Expression.Field((Expression) Expression.Constant((object) closure66, typeof (clsRoutings._Closure\u0024__66)), FieldInfo.GetFieldFromHandle(__fieldref (clsRoutings._Closure\u0024__66.\u0024VB\u0024Local_ldEndTime))), typeof (DateTime?)), true, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (DateTime.op_LessThanOrEqual)))), (Expression) Expression.Constant((object) false, typeof (bool))), new ParameterExpression[1]{ parameterExpression })), (Expression<Func<M0, M1>>) (data => data.sc.OrdSectsId));
            scRoutingCounts scRoutingCounts1 = current1;
            scRoutingCounts1.RoutingCompletions = checked ((short) ((int) scRoutingCounts1.RoutingCompletions + source1.Count<int>()));
          }
        }
        finally
        {
          enumerator1.Dispose();
        }
        se0085CtEntities1.Database.Connection.Close();
      }
      return RoutingList;
    }

    public List<int> rtnRoutingWorkCenterCompletedSections(DateTime StartDate, DateTime FinishDate, string Workcenter, bool ShippedOnly = false)
    {
      // ISSUE: object of a compiler-generated type is created
      // ISSUE: variable of a compiler-generated type
      clsRoutings._Closure\u0024__67 closure67 = new clsRoutings._Closure\u0024__67();
      List<int> intList = new List<int>();
      // ISSUE: reference to a compiler-generated field
      closure67.\u0024VB\u0024Local_ldShipped1 = true;
      // ISSUE: reference to a compiler-generated field
      closure67.\u0024VB\u0024Local_ldShipped2 = false;
      if (ShippedOnly)
      {
        // ISSUE: reference to a compiler-generated field
        closure67.\u0024VB\u0024Local_ldShipped2 = true;
      }
      // ISSUE: reference to a compiler-generated field
      closure67.\u0024VB\u0024Local_ldWorkCenter = Workcenter;
      // ISSUE: reference to a compiler-generated field
      closure67.\u0024VB\u0024Local_ldStartTime = StartDate;
      // ISSUE: reference to a compiler-generated field
      closure67.\u0024VB\u0024Local_ldEndTime = FinishDate;
      using (SE0085CTEntities1 se0085CtEntities1 = new SE0085CTEntities1())
      {
        se0085CtEntities1.Database.Connection.ConnectionString = this._CTConnection;
        ParameterExpression parameterExpression;
        // 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: 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: field reference
        // ISSUE: method reference
        // ISSUE: type reference
        // ISSUE: method reference
        // ISSUE: field reference
        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.SEPlants, (IEnumerable<M1>) se0085CtEntities1.AssemblyLines, (Expression<Func<M0, M2>>) (pl => pl.SEPlantId), (Expression<Func<M1, M2>>) (al => al.SEPlant.SEPlantId), (Expression<Func<M0, M1, M3>>) ((pl, al) => new{ pl = pl, al = al })), (IEnumerable<M1>) se0085CtEntities1.OrderLines, (Expression<Func<M0, M2>>) (data => data.al.AssemLineId), (Expression<Func<M1, M2>>) (ol => ol.AssemblyLine.AssemLineId), (Expression<Func<M0, M1, M3>>) ((data, ol) => new{ \u0024VB\u0024It1 = data, 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.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{ pl = data.\u0024VB\u0024It1.\u0024VB\u0024It1.pl, al = data.\u0024VB\u0024It1.\u0024VB\u0024It1.al, ol = data.\u0024VB\u0024It1.ol, sc = data.sc, rt = rt })), (Expression<Func<M0, bool>>) Expression.Lambda<Func<VB\u0024AnonymousType_25<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting>, bool>>((Expression) Expression.Coalesce((Expression) Expression.And((Expression) Expression.And((Expression) Expression.And((Expression) Expression.Convert((Expression) Expression.And((Expression) Expression.And((Expression) Expression.Equal(\u0024VB\u0024It.pl.SEPlantId, this._Plant.LevelId, true, (MethodInfo) null), (Expression) Expression.Equal((Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_25<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting>.get_al), __typeref (VB\u0024AnonymousType_25<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (AssemblyLine.get_AssemLineId))), (Expression) Expression.Property((Expression) Expression.Field((Expression) Expression.Constant((object) this, typeof (clsRoutings)), FieldInfo.GetFieldFromHandle(__fieldref (clsRoutings._AssemblyLine))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scLevels.get_LevelId))), true, (MethodInfo) null)), (Expression) Expression.Equal((Expression) Expression.Call((Expression) null, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (Operators.CompareString)), (Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_25<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting>.get_rt), __typeref (VB\u0024AnonymousType_25<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (SectionsRouting.get_RoutingWorkCenter))), (Expression) Expression.Field((Expression) Expression.Constant((object) closure67, typeof (clsRoutings._Closure\u0024__67)), FieldInfo.GetFieldFromHandle(__fieldref (clsRoutings._Closure\u0024__67.\u0024VB\u0024Local_ldWorkCenter))), (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) parameterExpression, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_25<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting>.get_rt), __typeref (VB\u0024AnonymousType_25<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (SectionsRouting.get_RoutingActFinishDt))), (Expression) Expression.Convert((Expression) Expression.Field((Expression) Expression.Constant((object) closure67, typeof (clsRoutings._Closure\u0024__67)), FieldInfo.GetFieldFromHandle(__fieldref (clsRoutings._Closure\u0024__67.\u0024VB\u0024Local_ldStartTime))), typeof (DateTime?)), true, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (DateTime.op_GreaterThanOrEqual)))), (Expression) Expression.LessThanOrEqual((Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_25<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting>.get_rt), __typeref (VB\u0024AnonymousType_25<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (SectionsRouting.get_RoutingActFinishDt))), (Expression) Expression.Convert((Expression) Expression.Field((Expression) Expression.Constant((object) closure67, typeof (clsRoutings._Closure\u0024__67)), FieldInfo.GetFieldFromHandle(__fieldref (clsRoutings._Closure\u0024__67.\u0024VB\u0024Local_ldEndTime))), typeof (DateTime?)), true, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (DateTime.op_LessThanOrEqual)))), (Expression) Expression.Or((Expression) Expression.Equal((Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_25<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting>.get_ol), __typeref (VB\u0024AnonymousType_25<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (OrderLine.get_OrderLineShipped))), (Expression) Expression.Convert((Expression) Expression.Field((Expression) Expression.Constant((object) closure67, typeof (clsRoutings._Closure\u0024__67)), FieldInfo.GetFieldFromHandle(__fieldref (clsRoutings._Closure\u0024__67.\u0024VB\u0024Local_ldShipped1))), typeof (bool?)), true, (MethodInfo) null), (Expression) Expression.Equal((Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_25<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting>.get_ol), __typeref (VB\u0024AnonymousType_25<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (OrderLine.get_OrderLineShipped))), (Expression) Expression.Convert((Expression) Expression.Field((Expression) Expression.Constant((object) closure67, typeof (clsRoutings._Closure\u0024__67)), FieldInfo.GetFieldFromHandle(__fieldref (clsRoutings._Closure\u0024__67.\u0024VB\u0024Local_ldShipped2))), typeof (bool?)), true, (MethodInfo) null))), (Expression) Expression.Constant((object) false, typeof (bool))), new ParameterExpression[1]{ parameterExpression })), (Expression<Func<M0, M1>>) (data => data.sc.OrdSectsId));
        if (source.Count<int>() > 0)
          intList = source.ToList<int>();
        se0085CtEntities1.Database.Connection.Close();
      }
      return intList;
    }

    public List<scRoutingCounts> rtnRoutingWorkCenterSpecial(List<scRoutingCounts> RoutingList)
    {
      // ISSUE: object of a compiler-generated type is created
      // ISSUE: variable of a compiler-generated type
      clsRoutings._Closure\u0024__68 closure68 = new clsRoutings._Closure\u0024__68();
      using (SE0085CTEntities1 se0085CtEntities1 = new SE0085CTEntities1())
      {
        se0085CtEntities1.Database.Connection.ConnectionString = this._CTConnection;
        List<scRoutingCounts>.Enumerator enumerator1;
        try
        {
          enumerator1 = RoutingList.GetEnumerator();
          while (enumerator1.MoveNext())
          {
            scRoutingCounts current1 = enumerator1.Current;
            string routingWorkCenter = current1.RoutingWorkCenter;
            // ISSUE: reference to a compiler-generated field
            closure68.\u0024VB\u0024Local_ldStartTime = current1.RoutingStartDt;
            // ISSUE: reference to a compiler-generated field
            closure68.\u0024VB\u0024Local_ldEndTime = current1.RoutingFinishDt;
            if (Operators.CompareString(routingWorkCenter, "PNLSASSY", false) == 0)
            {
              ParameterExpression parameterExpression1;
              // 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: 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
              IQueryable<int> queryable = (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.SEPlants, (IEnumerable<M1>) se0085CtEntities1.AssemblyLines, (Expression<Func<M0, M2>>) (pl => pl.SEPlantId), (Expression<Func<M1, M2>>) (al => al.SEPlant.SEPlantId), (Expression<Func<M0, M1, M3>>) ((pl, al) => new{ pl = pl, al = al })), (IEnumerable<M1>) se0085CtEntities1.OrderLines, (Expression<Func<M0, M2>>) (data => data.al.AssemLineId), (Expression<Func<M1, M2>>) (ol => ol.AssemblyLine.AssemLineId), (Expression<Func<M0, M1, M3>>) ((data, ol) => new{ \u0024VB\u0024It1 = data, 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.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{ pl = data.\u0024VB\u0024It1.\u0024VB\u0024It1.pl, al = data.\u0024VB\u0024It1.\u0024VB\u0024It1.al, ol = data.\u0024VB\u0024It1.ol, sc = data.sc, rt = rt })), (Expression<Func<M0, bool>>) Expression.Lambda<Func<VB\u0024AnonymousType_25<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting>, bool>>((Expression) Expression.Coalesce((Expression) Expression.And((Expression) Expression.And((Expression) Expression.Convert((Expression) Expression.And((Expression) Expression.And((Expression) Expression.Equal(\u0024VB\u0024It.pl.SEPlantId, this._Plant.LevelId, true, (MethodInfo) null), (Expression) Expression.Equal((Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression1, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_25<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting>.get_al), __typeref (VB\u0024AnonymousType_25<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (AssemblyLine.get_AssemLineId))), (Expression) Expression.Property((Expression) Expression.Field((Expression) Expression.Constant((object) this, typeof (clsRoutings)), FieldInfo.GetFieldFromHandle(__fieldref (clsRoutings._AssemblyLine))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scLevels.get_LevelId))), true, (MethodInfo) null)), (Expression) Expression.Equal((Expression) Expression.Call((Expression) null, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (Operators.CompareString)), (Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression1, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_25<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting>.get_rt), __typeref (VB\u0024AnonymousType_25<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (SectionsRouting.get_RoutingWorkCenter))), (Expression) Expression.Constant((object) "STANDUP", typeof (string)), (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_25<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting>.get_rt), __typeref (VB\u0024AnonymousType_25<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (SectionsRouting.get_RoutingActFinishDt))), (Expression) Expression.Convert((Expression) Expression.Field((Expression) Expression.Constant((object) closure68, typeof (clsRoutings._Closure\u0024__68)), FieldInfo.GetFieldFromHandle(__fieldref (clsRoutings._Closure\u0024__68.\u0024VB\u0024Local_ldStartTime))), 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_25<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting>.get_rt), __typeref (VB\u0024AnonymousType_25<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (SectionsRouting.get_RoutingActFinishDt))), (Expression) Expression.Convert((Expression) Expression.Field((Expression) Expression.Constant((object) closure68, typeof (clsRoutings._Closure\u0024__68)), FieldInfo.GetFieldFromHandle(__fieldref (clsRoutings._Closure\u0024__68.\u0024VB\u0024Local_ldEndTime))), 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.sc.OrdSectsId));
              IEnumerator<int> enumerator2;
              try
              {
                enumerator2 = queryable.GetEnumerator();
                while (enumerator2.MoveNext())
                {
                  int current2 = enumerator2.Current;
                  // ISSUE: reference to a compiler-generated field
                  closure68.\u0024VB\u0024Local_ldSectionId = current2;
                  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
                  if (((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.SEPlants, (IEnumerable<M1>) se0085CtEntities1.AssemblyLines, (Expression<Func<M0, M2>>) (pl => pl.SEPlantId), (Expression<Func<M1, M2>>) (al => al.SEPlant.SEPlantId), (Expression<Func<M0, M1, M3>>) ((pl, al) => new{ pl = pl, al = al })), (IEnumerable<M1>) se0085CtEntities1.OrderLines, (Expression<Func<M0, M2>>) (data => data.al.AssemLineId), (Expression<Func<M1, M2>>) (ol => ol.AssemblyLine.AssemLineId), (Expression<Func<M0, M1, M3>>) ((data, ol) => new{ \u0024VB\u0024It1 = data, 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.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{ pl = data.\u0024VB\u0024It1.\u0024VB\u0024It1.pl, al = data.\u0024VB\u0024It1.\u0024VB\u0024It1.al, ol = data.\u0024VB\u0024It1.ol, sc = data.sc, rt = rt })), (Expression<Func<M0, bool>>) Expression.Lambda<Func<VB\u0024AnonymousType_25<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting>, bool>>((Expression) Expression.And((Expression) Expression.And((Expression) Expression.And((Expression) Expression.Equal(\u0024VB\u0024It.pl.SEPlantId, this._Plant.LevelId, true, (MethodInfo) null), (Expression) Expression.Equal((Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_25<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting>.get_al), __typeref (VB\u0024AnonymousType_25<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (AssemblyLine.get_AssemLineId))), (Expression) Expression.Property((Expression) Expression.Field((Expression) Expression.Constant((object) this, typeof (clsRoutings)), FieldInfo.GetFieldFromHandle(__fieldref (clsRoutings._AssemblyLine))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scLevels.get_LevelId))), true, (MethodInfo) null)), (Expression) Expression.Equal((Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_25<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting>.get_sc), __typeref (VB\u0024AnonymousType_25<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (OrdSection.get_OrdSectsId))), (Expression) Expression.Field((Expression) Expression.Constant((object) closure68, typeof (clsRoutings._Closure\u0024__68)), FieldInfo.GetFieldFromHandle(__fieldref (clsRoutings._Closure\u0024__68.\u0024VB\u0024Local_ldSectionId))), true, (MethodInfo) null)), (Expression) Expression.Equal((Expression) Expression.Call((Expression) null, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (Operators.CompareString)), (Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_25<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting>.get_rt), __typeref (VB\u0024AnonymousType_25<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (SectionsRouting.get_RoutingWorkCenter))), (Expression) Expression.Constant((object) "PNLSASSY", typeof (string)), (Expression) Expression.Constant((object) false, typeof (bool))), (Expression) Expression.Constant((object) 0, typeof (int)))), new ParameterExpression[1]{ parameterExpression2 })), (Expression<Func<M0, M1>>) (data => data.sc.OrdSectsId))).Count<int>() > 0)
                  {
                    scRoutingCounts scRoutingCounts = current1;
                    scRoutingCounts.RoutingCompletions = checked ((short) ((int) scRoutingCounts.RoutingCompletions + 1));
                  }
                }
              }
              finally
              {
                if (enumerator2 != null)
                  enumerator2.Dispose();
              }
            }
            else if (Operators.CompareString(routingWorkCenter, "MAINSASY", false) == 0)
            {
              ParameterExpression parameterExpression1;
              // 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: 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
              IQueryable<int> queryable = (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.SEPlants, (IEnumerable<M1>) se0085CtEntities1.AssemblyLines, (Expression<Func<M0, M2>>) (pl => pl.SEPlantId), (Expression<Func<M1, M2>>) (al => al.SEPlant.SEPlantId), (Expression<Func<M0, M1, M3>>) ((pl, al) => new{ pl = pl, al = al })), (IEnumerable<M1>) se0085CtEntities1.OrderLines, (Expression<Func<M0, M2>>) (data => data.al.AssemLineId), (Expression<Func<M1, M2>>) (ol => ol.AssemblyLine.AssemLineId), (Expression<Func<M0, M1, M3>>) ((data, ol) => new{ \u0024VB\u0024It1 = data, 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.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{ pl = data.\u0024VB\u0024It1.\u0024VB\u0024It1.pl, al = data.\u0024VB\u0024It1.\u0024VB\u0024It1.al, ol = data.\u0024VB\u0024It1.ol, sc = data.sc, rt = rt })), (Expression<Func<M0, bool>>) Expression.Lambda<Func<VB\u0024AnonymousType_25<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting>, bool>>((Expression) Expression.Coalesce((Expression) Expression.And((Expression) Expression.And((Expression) Expression.Convert((Expression) Expression.And((Expression) Expression.And((Expression) Expression.Equal(\u0024VB\u0024It.pl.SEPlantId, this._Plant.LevelId, true, (MethodInfo) null), (Expression) Expression.Equal((Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression1, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_25<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting>.get_al), __typeref (VB\u0024AnonymousType_25<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (AssemblyLine.get_AssemLineId))), (Expression) Expression.Property((Expression) Expression.Field((Expression) Expression.Constant((object) this, typeof (clsRoutings)), FieldInfo.GetFieldFromHandle(__fieldref (clsRoutings._AssemblyLine))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scLevels.get_LevelId))), true, (MethodInfo) null)), (Expression) Expression.Equal((Expression) Expression.Call((Expression) null, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (Operators.CompareString)), (Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression1, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_25<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting>.get_rt), __typeref (VB\u0024AnonymousType_25<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (SectionsRouting.get_RoutingWorkCenter))), (Expression) Expression.Constant((object) "STANDUP", typeof (string)), (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_25<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting>.get_rt), __typeref (VB\u0024AnonymousType_25<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (SectionsRouting.get_RoutingActFinishDt))), (Expression) Expression.Convert((Expression) Expression.Field((Expression) Expression.Constant((object) closure68, typeof (clsRoutings._Closure\u0024__68)), FieldInfo.GetFieldFromHandle(__fieldref (clsRoutings._Closure\u0024__68.\u0024VB\u0024Local_ldStartTime))), 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_25<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting>.get_rt), __typeref (VB\u0024AnonymousType_25<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (SectionsRouting.get_RoutingActFinishDt))), (Expression) Expression.Convert((Expression) Expression.Field((Expression) Expression.Constant((object) closure68, typeof (clsRoutings._Closure\u0024__68)), FieldInfo.GetFieldFromHandle(__fieldref (clsRoutings._Closure\u0024__68.\u0024VB\u0024Local_ldEndTime))), 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.sc.OrdSectsId));
              IEnumerator<int> enumerator2;
              try
              {
                enumerator2 = queryable.GetEnumerator();
                while (enumerator2.MoveNext())
                {
                  int current2 = enumerator2.Current;
                  // ISSUE: reference to a compiler-generated field
                  closure68.\u0024VB\u0024Local_ldSectionId = current2;
                  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
                  if (((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.SEPlants, (IEnumerable<M1>) se0085CtEntities1.AssemblyLines, (Expression<Func<M0, M2>>) (pl => pl.SEPlantId), (Expression<Func<M1, M2>>) (al => al.SEPlant.SEPlantId), (Expression<Func<M0, M1, M3>>) ((pl, al) => new{ pl = pl, al = al })), (IEnumerable<M1>) se0085CtEntities1.OrderLines, (Expression<Func<M0, M2>>) (data => data.al.AssemLineId), (Expression<Func<M1, M2>>) (ol => ol.AssemblyLine.AssemLineId), (Expression<Func<M0, M1, M3>>) ((data, ol) => new{ \u0024VB\u0024It1 = data, 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.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{ pl = data.\u0024VB\u0024It1.\u0024VB\u0024It1.pl, al = data.\u0024VB\u0024It1.\u0024VB\u0024It1.al, ol = data.\u0024VB\u0024It1.ol, sc = data.sc, rt = rt })), (Expression<Func<M0, bool>>) Expression.Lambda<Func<VB\u0024AnonymousType_25<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting>, bool>>((Expression) Expression.And((Expression) Expression.And((Expression) Expression.And((Expression) Expression.Equal(\u0024VB\u0024It.pl.SEPlantId, this._Plant.LevelId, true, (MethodInfo) null), (Expression) Expression.Equal((Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_25<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting>.get_al), __typeref (VB\u0024AnonymousType_25<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (AssemblyLine.get_AssemLineId))), (Expression) Expression.Property((Expression) Expression.Field((Expression) Expression.Constant((object) this, typeof (clsRoutings)), FieldInfo.GetFieldFromHandle(__fieldref (clsRoutings._AssemblyLine))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scLevels.get_LevelId))), true, (MethodInfo) null)), (Expression) Expression.Equal((Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_25<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting>.get_sc), __typeref (VB\u0024AnonymousType_25<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (OrdSection.get_OrdSectsId))), (Expression) Expression.Field((Expression) Expression.Constant((object) closure68, typeof (clsRoutings._Closure\u0024__68)), FieldInfo.GetFieldFromHandle(__fieldref (clsRoutings._Closure\u0024__68.\u0024VB\u0024Local_ldSectionId))), true, (MethodInfo) null)), (Expression) Expression.Equal((Expression) Expression.Call((Expression) null, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (Operators.CompareString)), (Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_25<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting>.get_rt), __typeref (VB\u0024AnonymousType_25<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (SectionsRouting.get_RoutingWorkCenter))), (Expression) Expression.Constant((object) "MAINSASY", typeof (string)), (Expression) Expression.Constant((object) false, typeof (bool))), (Expression) Expression.Constant((object) 0, typeof (int)))), new ParameterExpression[1]{ parameterExpression2 })), (Expression<Func<M0, M1>>) (data => data.sc.OrdSectsId))).Count<int>() > 0)
                  {
                    ParameterExpression parameterExpression3;
                    // 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
                    if (((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.SEPlants, (IEnumerable<M1>) se0085CtEntities1.AssemblyLines, (Expression<Func<M0, M2>>) (pl => pl.SEPlantId), (Expression<Func<M1, M2>>) (al => al.SEPlant.SEPlantId), (Expression<Func<M0, M1, M3>>) ((pl, al) => new{ pl = pl, al = al })), (IEnumerable<M1>) se0085CtEntities1.OrderLines, (Expression<Func<M0, M2>>) (data => data.al.AssemLineId), (Expression<Func<M1, M2>>) (ol => ol.AssemblyLine.AssemLineId), (Expression<Func<M0, M1, M3>>) ((data, ol) => new{ \u0024VB\u0024It1 = data, 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.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{ pl = data.\u0024VB\u0024It1.\u0024VB\u0024It1.pl, al = data.\u0024VB\u0024It1.\u0024VB\u0024It1.al, ol = data.\u0024VB\u0024It1.ol, sc = data.sc, rt = rt })), (Expression<Func<M0, bool>>) Expression.Lambda<Func<VB\u0024AnonymousType_25<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting>, bool>>((Expression) Expression.And((Expression) Expression.And((Expression) Expression.And((Expression) Expression.Equal(\u0024VB\u0024It.pl.SEPlantId, this._Plant.LevelId, true, (MethodInfo) null), (Expression) Expression.Equal((Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression3, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_25<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting>.get_al), __typeref (VB\u0024AnonymousType_25<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (AssemblyLine.get_AssemLineId))), (Expression) Expression.Property((Expression) Expression.Field((Expression) Expression.Constant((object) this, typeof (clsRoutings)), FieldInfo.GetFieldFromHandle(__fieldref (clsRoutings._AssemblyLine))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scLevels.get_LevelId))), true, (MethodInfo) null)), (Expression) Expression.Equal((Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression3, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_25<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting>.get_sc), __typeref (VB\u0024AnonymousType_25<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (OrdSection.get_OrdSectsId))), (Expression) Expression.Field((Expression) Expression.Constant((object) closure68, typeof (clsRoutings._Closure\u0024__68)), FieldInfo.GetFieldFromHandle(__fieldref (clsRoutings._Closure\u0024__68.\u0024VB\u0024Local_ldSectionId))), true, (MethodInfo) null)), (Expression) Expression.Equal((Expression) Expression.Call((Expression) null, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (Operators.CompareString)), (Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression3, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_25<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting>.get_rt), __typeref (VB\u0024AnonymousType_25<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (SectionsRouting.get_RoutingWorkCenter))), (Expression) Expression.Constant((object) "PNLSASSY", typeof (string)), (Expression) Expression.Constant((object) false, typeof (bool))), (Expression) Expression.Constant((object) 0, typeof (int)))), new ParameterExpression[1]{ parameterExpression3 })), (Expression<Func<M0, M1>>) (data => data.sc.OrdSectsId))).Count<int>() == 0)
                    {
                      scRoutingCounts scRoutingCounts = current1;
                      scRoutingCounts.RoutingCompletions = checked ((short) ((int) scRoutingCounts.RoutingCompletions + 1));
                    }
                  }
                }
              }
              finally
              {
                if (enumerator2 != null)
                  enumerator2.Dispose();
              }
            }
            else if (Operators.CompareString(routingWorkCenter, "FRAMES", false) == 0)
            {
              ParameterExpression parameterExpression1;
              // 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: 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
              IQueryable<int> queryable = (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.SEPlants, (IEnumerable<M1>) se0085CtEntities1.AssemblyLines, (Expression<Func<M0, M2>>) (pl => pl.SEPlantId), (Expression<Func<M1, M2>>) (al => al.SEPlant.SEPlantId), (Expression<Func<M0, M1, M3>>) ((pl, al) => new{ pl = pl, al = al })), (IEnumerable<M1>) se0085CtEntities1.OrderLines, (Expression<Func<M0, M2>>) (data => data.al.AssemLineId), (Expression<Func<M1, M2>>) (ol => ol.AssemblyLine.AssemLineId), (Expression<Func<M0, M1, M3>>) ((data, ol) => new{ \u0024VB\u0024It1 = data, 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.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{ pl = data.\u0024VB\u0024It1.\u0024VB\u0024It1.pl, al = data.\u0024VB\u0024It1.\u0024VB\u0024It1.al, ol = data.\u0024VB\u0024It1.ol, sc = data.sc, rt = rt })), (Expression<Func<M0, bool>>) Expression.Lambda<Func<VB\u0024AnonymousType_25<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting>, bool>>((Expression) Expression.Coalesce((Expression) Expression.And((Expression) Expression.And((Expression) Expression.Convert((Expression) Expression.And((Expression) Expression.And((Expression) Expression.Equal(\u0024VB\u0024It.pl.SEPlantId, this._Plant.LevelId, true, (MethodInfo) null), (Expression) Expression.Equal((Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression1, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_25<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting>.get_al), __typeref (VB\u0024AnonymousType_25<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (AssemblyLine.get_AssemLineId))), (Expression) Expression.Property((Expression) Expression.Field((Expression) Expression.Constant((object) this, typeof (clsRoutings)), FieldInfo.GetFieldFromHandle(__fieldref (clsRoutings._AssemblyLine))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scLevels.get_LevelId))), true, (MethodInfo) null)), (Expression) Expression.Equal((Expression) Expression.Call((Expression) null, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (Operators.CompareString)), (Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression1, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_25<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting>.get_rt), __typeref (VB\u0024AnonymousType_25<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (SectionsRouting.get_RoutingWorkCenter))), (Expression) Expression.Constant((object) "STANDUP", typeof (string)), (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_25<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting>.get_rt), __typeref (VB\u0024AnonymousType_25<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (SectionsRouting.get_RoutingActFinishDt))), (Expression) Expression.Convert((Expression) Expression.Field((Expression) Expression.Constant((object) closure68, typeof (clsRoutings._Closure\u0024__68)), FieldInfo.GetFieldFromHandle(__fieldref (clsRoutings._Closure\u0024__68.\u0024VB\u0024Local_ldStartTime))), 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_25<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting>.get_rt), __typeref (VB\u0024AnonymousType_25<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (SectionsRouting.get_RoutingActFinishDt))), (Expression) Expression.Convert((Expression) Expression.Field((Expression) Expression.Constant((object) closure68, typeof (clsRoutings._Closure\u0024__68)), FieldInfo.GetFieldFromHandle(__fieldref (clsRoutings._Closure\u0024__68.\u0024VB\u0024Local_ldEndTime))), 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.sc.OrdSectsId));
              IEnumerator<int> enumerator2;
              try
              {
                enumerator2 = queryable.GetEnumerator();
                while (enumerator2.MoveNext())
                {
                  int current2 = enumerator2.Current;
                  // ISSUE: reference to a compiler-generated field
                  closure68.\u0024VB\u0024Local_ldSectionId = current2;
                  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: type reference
                  // ISSUE: method reference
                  if (((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.SEPlants, (IEnumerable<M1>) se0085CtEntities1.AssemblyLines, (Expression<Func<M0, M2>>) (pl => pl.SEPlantId), (Expression<Func<M1, M2>>) (al => al.SEPlant.SEPlantId), (Expression<Func<M0, M1, M3>>) ((pl, al) => new{ pl = pl, al = al })), (IEnumerable<M1>) se0085CtEntities1.OrderLines, (Expression<Func<M0, M2>>) (data => data.al.AssemLineId), (Expression<Func<M1, M2>>) (ol => ol.AssemblyLine.AssemLineId), (Expression<Func<M0, M1, M3>>) ((data, ol) => new{ \u0024VB\u0024It1 = data, 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.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{ pl = data.\u0024VB\u0024It1.\u0024VB\u0024It1.pl, al = data.\u0024VB\u0024It1.\u0024VB\u0024It1.al, ol = data.\u0024VB\u0024It1.ol, sc = data.sc, rt = rt })), (Expression<Func<M0, bool>>) Expression.Lambda<Func<VB\u0024AnonymousType_25<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting>, bool>>((Expression) Expression.And((Expression) Expression.And((Expression) Expression.And((Expression) Expression.Equal(\u0024VB\u0024It.pl.SEPlantId, this._Plant.LevelId, true, (MethodInfo) null), (Expression) Expression.Equal((Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_25<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting>.get_al), __typeref (VB\u0024AnonymousType_25<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (AssemblyLine.get_AssemLineId))), (Expression) Expression.Property((Expression) Expression.Field((Expression) Expression.Constant((object) this, typeof (clsRoutings)), FieldInfo.GetFieldFromHandle(__fieldref (clsRoutings._AssemblyLine))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scLevels.get_LevelId))), true, (MethodInfo) null)), (Expression) Expression.Equal((Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_25<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting>.get_sc), __typeref (VB\u0024AnonymousType_25<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (OrdSection.get_OrdSectsId))), (Expression) Expression.Field((Expression) Expression.Constant((object) closure68, typeof (clsRoutings._Closure\u0024__68)), FieldInfo.GetFieldFromHandle(__fieldref (clsRoutings._Closure\u0024__68.\u0024VB\u0024Local_ldSectionId))), true, (MethodInfo) null)), (Expression) Expression.Or((Expression) Expression.Equal((Expression) Expression.Call((Expression) null, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (Operators.CompareString)), (Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_25<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting>.get_rt), __typeref (VB\u0024AnonymousType_25<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (SectionsRouting.get_RoutingWorkCenter))), (Expression) Expression.Constant((object) "PNLSASSY", 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 (Operators.CompareString)), (Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_25<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting>.get_rt), __typeref (VB\u0024AnonymousType_25<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (SectionsRouting.get_RoutingWorkCenter))), (Expression) Expression.Constant((object) "MAINSASY", typeof (string)), (Expression) Expression.Constant((object) false, typeof (bool))), (Expression) Expression.Constant((object) 0, typeof (int))))), new ParameterExpression[1]{ parameterExpression2 })), (Expression<Func<M0, M1>>) (data => data.sc.OrdSectsId))).Count<int>() == 0)
                  {
                    scRoutingCounts scRoutingCounts = current1;
                    scRoutingCounts.RoutingCompletions = checked ((short) ((int) scRoutingCounts.RoutingCompletions + 1));
                  }
                }
              }
              finally
              {
                if (enumerator2 != null)
                  enumerator2.Dispose();
              }
            }
          }
        }
        finally
        {
          enumerator1.Dispose();
        }
        se0085CtEntities1.Database.Connection.Close();
      }
      return RoutingList;
    }

    public List<int> rtnShippedSections(DateTime StartDate, DateTime FinishDate)
    {
      // ISSUE: object of a compiler-generated type is created
      // ISSUE: variable of a compiler-generated type
      clsRoutings._Closure\u0024__69 closure69 = new clsRoutings._Closure\u0024__69();
      List<int> intList = new List<int>();
      // ISSUE: reference to a compiler-generated field
      closure69.\u0024VB\u0024Local_ldStartTime = StartDate;
      // ISSUE: reference to a compiler-generated field
      closure69.\u0024VB\u0024Local_ldEndTime = FinishDate;
      using (SE0085CTEntities1 se0085CtEntities1 = new SE0085CTEntities1())
      {
        se0085CtEntities1.Database.Connection.ConnectionString = this._CTConnection;
        ParameterExpression parameterExpression;
        // 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: field reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: type reference
        // ISSUE: method reference
        IQueryable<int> source = (IQueryable<int>) Queryable.Select(Queryable.Where((IQueryable<M0>) Queryable.Join((IQueryable<M0>) Queryable.Join((IQueryable<M0>) Queryable.Join((IQueryable<M0>) se0085CtEntities1.SEPlants, (IEnumerable<M1>) se0085CtEntities1.AssemblyLines, (Expression<Func<M0, M2>>) (pl => pl.SEPlantId), (Expression<Func<M1, M2>>) (al => al.SEPlant.SEPlantId), (Expression<Func<M0, M1, M3>>) ((pl, al) => new{ pl = pl, al = al })), (IEnumerable<M1>) se0085CtEntities1.OrderLines, (Expression<Func<M0, M2>>) (data => data.al.AssemLineId), (Expression<Func<M1, M2>>) (ol => ol.AssemblyLine.AssemLineId), (Expression<Func<M0, M1, M3>>) ((data, ol) => new{ \u0024VB\u0024It1 = data, 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{ pl = data.\u0024VB\u0024It1.pl, al = data.\u0024VB\u0024It1.al, ol = data.ol, sc = sc })), (Expression<Func<M0, bool>>) Expression.Lambda<Func<VB\u0024AnonymousType_26<SEPlant, AssemblyLine, OrderLine, OrdSection>, bool>>((Expression) Expression.Coalesce((Expression) Expression.And((Expression) Expression.And((Expression) Expression.And((Expression) Expression.Convert((Expression) Expression.And((Expression) Expression.Equal(\u0024VB\u0024It.pl.SEPlantId, this._Plant.LevelId, true, (MethodInfo) null), (Expression) Expression.Equal((Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_26<SEPlant, AssemblyLine, OrderLine, OrdSection>.get_al), __typeref (VB\u0024AnonymousType_26<SEPlant, AssemblyLine, OrderLine, OrdSection>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (AssemblyLine.get_AssemLineId))), (Expression) Expression.Property((Expression) Expression.Field((Expression) Expression.Constant((object) this, typeof (clsRoutings)), FieldInfo.GetFieldFromHandle(__fieldref (clsRoutings._AssemblyLine))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scLevels.get_LevelId))), true, (MethodInfo) null)), typeof (bool?)), (Expression) Expression.GreaterThanOrEqual((Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_26<SEPlant, AssemblyLine, OrderLine, OrdSection>.get_ol), __typeref (VB\u0024AnonymousType_26<SEPlant, AssemblyLine, OrderLine, OrdSection>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (OrderLine.get_OrderLineShippedDt))), (Expression) Expression.Convert((Expression) Expression.Field((Expression) Expression.Constant((object) closure69, typeof (clsRoutings._Closure\u0024__69)), FieldInfo.GetFieldFromHandle(__fieldref (clsRoutings._Closure\u0024__69.\u0024VB\u0024Local_ldStartTime))), typeof (DateTime?)), true, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (DateTime.op_GreaterThanOrEqual)))), (Expression) Expression.LessThanOrEqual((Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_26<SEPlant, AssemblyLine, OrderLine, OrdSection>.get_ol), __typeref (VB\u0024AnonymousType_26<SEPlant, AssemblyLine, OrderLine, OrdSection>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (OrderLine.get_OrderLineShippedDt))), (Expression) Expression.Convert((Expression) Expression.Field((Expression) Expression.Constant((object) closure69, typeof (clsRoutings._Closure\u0024__69)), FieldInfo.GetFieldFromHandle(__fieldref (clsRoutings._Closure\u0024__69.\u0024VB\u0024Local_ldEndTime))), typeof (DateTime?)), true, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (DateTime.op_LessThanOrEqual)))), (Expression) Expression.Equal((Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_26<SEPlant, AssemblyLine, OrderLine, OrdSection>.get_ol), __typeref (VB\u0024AnonymousType_26<SEPlant, AssemblyLine, OrderLine, OrdSection>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (OrderLine.get_OrderLineShipped))), (Expression) Expression.Convert((Expression) Expression.Constant((object) true, typeof (bool)), typeof (bool?)), true, (MethodInfo) null)), (Expression) Expression.Constant((object) false, typeof (bool))), new ParameterExpression[1]{ parameterExpression })), (Expression<Func<M0, M1>>) (data => data.sc.OrdSectsId));
        if (source.Count<int>() > 0)
          intList = source.ToList<int>();
        se0085CtEntities1.Database.Connection.Close();
      }
      return intList;
    }

    public List<int> rtnRoutingWorkCenterOpenSections(scLevels Plant, scLevels AssemblyLine, DateTime StartDate, DateTime FinishDate, string Workcenter, bool IncShipped = false, string OverRideCatalog = "x")
    {
      // ISSUE: object of a compiler-generated type is created
      // ISSUE: variable of a compiler-generated type
      clsRoutings._Closure\u0024__70 closure70 = new clsRoutings._Closure\u0024__70();
      // ISSUE: reference to a compiler-generated field
      closure70.\u0024VB\u0024Local_Plant = Plant;
      // ISSUE: reference to a compiler-generated field
      closure70.\u0024VB\u0024Local_AssemblyLine = AssemblyLine;
      List<int> intList = new List<int>();
      // ISSUE: reference to a compiler-generated field
      closure70.\u0024VB\u0024Local_ldActFinishConst = Conversions.ToDate("01/01/2000");
      // ISSUE: reference to a compiler-generated field
      closure70.\u0024VB\u0024Local_ldShipped1 = false;
      // ISSUE: reference to a compiler-generated field
      closure70.\u0024VB\u0024Local_ldShipped2 = false;
      if (IncShipped)
      {
        // ISSUE: reference to a compiler-generated field
        closure70.\u0024VB\u0024Local_ldShipped2 = true;
      }
      // ISSUE: reference to a compiler-generated field
      closure70.\u0024VB\u0024Local_ldWorkCenter = Workcenter;
      // ISSUE: reference to a compiler-generated field
      closure70.\u0024VB\u0024Local_ldStartTime = StartDate;
      // ISSUE: reference to a compiler-generated field
      closure70.\u0024VB\u0024Local_ldEndTime = FinishDate;
      using (SE0085CTEntities1 se0085CtEntities1 = new SE0085CTEntities1())
      {
        se0085CtEntities1.Database.Connection.ConnectionString = this._CTConnection;
        ParameterExpression parameterExpression;
        // 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: 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: 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: field reference
        IQueryable<int> source = (IQueryable<int>) 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>) Queryable.Join((IQueryable<M0>) Queryable.Join((IQueryable<M0>) se0085CtEntities1.SEPlants, (IEnumerable<M1>) se0085CtEntities1.AssemblyLines, (Expression<Func<M0, M2>>) (pl => pl.SEPlantId), (Expression<Func<M1, M2>>) (al => al.SEPlant.SEPlantId), (Expression<Func<M0, M1, M3>>) ((pl, al) => new{ pl = pl, al = al })), (IEnumerable<M1>) se0085CtEntities1.OrderLines, (Expression<Func<M0, M2>>) (data => data.al.AssemLineId), (Expression<Func<M1, M2>>) (ol => ol.AssemblyLine.AssemLineId), (Expression<Func<M0, M1, M3>>) ((data, ol) => new{ \u0024VB\u0024It1 = data, 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.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{ \u0024VB\u0024It1 = data, rt = rt })), (IEnumerable<M1>) se0085CtEntities1.SEOrders, (Expression<Func<M0, M2>>) (data => data.\u0024VB\u0024It1.\u0024VB\u0024It1.ol.SEOrder.OrderId), (Expression<Func<M1, M2>>) (so => so.OrderId), (Expression<Func<M0, M1, M3>>) ((data, so) => new{ pl = data.\u0024VB\u0024It1.\u0024VB\u0024It1.\u0024VB\u0024It1.pl, al = data.\u0024VB\u0024It1.\u0024VB\u0024It1.\u0024VB\u0024It1.al, ol = data.\u0024VB\u0024It1.\u0024VB\u0024It1.ol, sc = data.\u0024VB\u0024It1.sc, rt = data.rt, so = so })), (Expression<Func<M0, bool>>) Expression.Lambda<Func<VB\u0024AnonymousType_28<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting, SEOrder>, bool>>((Expression) Expression.Coalesce((Expression) Expression.And((Expression) Expression.And((Expression) Expression.And((Expression) Expression.And((Expression) Expression.Convert((Expression) Expression.And((Expression) Expression.And((Expression) Expression.Equal(\u0024VB\u0024It.pl.SEPlantId, closure70.\u0024VB\u0024Local_Plant.LevelId, true, (MethodInfo) null), (Expression) Expression.Equal((Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_28<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting, SEOrder>.get_al), __typeref (VB\u0024AnonymousType_28<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting, SEOrder>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (AssemblyLine.get_AssemLineId))), (Expression) Expression.Property((Expression) Expression.Field((Expression) Expression.Constant((object) closure70, typeof (clsRoutings._Closure\u0024__70)), FieldInfo.GetFieldFromHandle(__fieldref (clsRoutings._Closure\u0024__70.\u0024VB\u0024Local_AssemblyLine))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scLevels.get_LevelId))), true, (MethodInfo) null)), (Expression) Expression.Equal((Expression) Expression.Call((Expression) null, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (Operators.CompareString)), (Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_28<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting, SEOrder>.get_rt), __typeref (VB\u0024AnonymousType_28<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting, SEOrder>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (SectionsRouting.get_RoutingWorkCenter))), (Expression) Expression.Field((Expression) Expression.Constant((object) closure70, typeof (clsRoutings._Closure\u0024__70)), FieldInfo.GetFieldFromHandle(__fieldref (clsRoutings._Closure\u0024__70.\u0024VB\u0024Local_ldWorkCenter))), (Expression) Expression.Constant((object) false, typeof (bool))), (Expression) Expression.Constant((object) 0, typeof (int)))), typeof (bool?)), (Expression) Expression.LessThan((Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_28<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting, SEOrder>.get_rt), __typeref (VB\u0024AnonymousType_28<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting, SEOrder>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (SectionsRouting.get_RoutingActFinishDt))), (Expression) Expression.Convert((Expression) Expression.Field((Expression) Expression.Constant((object) closure70, typeof (clsRoutings._Closure\u0024__70)), FieldInfo.GetFieldFromHandle(__fieldref (clsRoutings._Closure\u0024__70.\u0024VB\u0024Local_ldActFinishConst))), typeof (DateTime?)), true, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (DateTime.op_LessThan)))), (Expression) Expression.GreaterThanOrEqual((Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_28<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting, SEOrder>.get_ol), __typeref (VB\u0024AnonymousType_28<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting, SEOrder>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (OrderLine.get_OrderLineShipDt))), (Expression) Expression.Convert((Expression) Expression.Field((Expression) Expression.Constant((object) closure70, typeof (clsRoutings._Closure\u0024__70)), FieldInfo.GetFieldFromHandle(__fieldref (clsRoutings._Closure\u0024__70.\u0024VB\u0024Local_ldStartTime))), typeof (DateTime?)), true, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (DateTime.op_GreaterThanOrEqual)))), (Expression) Expression.LessThanOrEqual((Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_28<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting, SEOrder>.get_ol), __typeref (VB\u0024AnonymousType_28<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting, SEOrder>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (OrderLine.get_OrderLineShipDt))), (Expression) Expression.Convert((Expression) Expression.Field((Expression) Expression.Constant((object) closure70, typeof (clsRoutings._Closure\u0024__70)), FieldInfo.GetFieldFromHandle(__fieldref (clsRoutings._Closure\u0024__70.\u0024VB\u0024Local_ldEndTime))), typeof (DateTime?)), true, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (DateTime.op_LessThanOrEqual)))), (Expression) Expression.Or((Expression) Expression.Equal((Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_28<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting, SEOrder>.get_ol), __typeref (VB\u0024AnonymousType_28<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting, SEOrder>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (OrderLine.get_OrderLineShipped))), (Expression) Expression.Convert((Expression) Expression.Field((Expression) Expression.Constant((object) closure70, typeof (clsRoutings._Closure\u0024__70)), FieldInfo.GetFieldFromHandle(__fieldref (clsRoutings._Closure\u0024__70.\u0024VB\u0024Local_ldShipped1))), typeof (bool?)), true, (MethodInfo) null), (Expression) Expression.Equal((Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_28<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting, SEOrder>.get_ol), __typeref (VB\u0024AnonymousType_28<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting, SEOrder>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (OrderLine.get_OrderLineShipped))), (Expression) Expression.Convert((Expression) Expression.Field((Expression) Expression.Constant((object) closure70, typeof (clsRoutings._Closure\u0024__70)), FieldInfo.GetFieldFromHandle(__fieldref (clsRoutings._Closure\u0024__70.\u0024VB\u0024Local_ldShipped2))), typeof (bool?)), true, (MethodInfo) null))), (Expression) Expression.Constant((object) false, typeof (bool))), new ParameterExpression[1]{ parameterExpression })), (Expression<Func<M0, M1>>) (data => data.ol.OrderLineShipDt)), (Expression<Func<M0, M1>>) (data => data.so.OrderFO)), (Expression<Func<M0, M1>>) (data => data.ol.OrderLineNum)), (Expression<Func<M0, M1>>) (data => data.sc.OrdSectsNum)), (Expression<Func<M0, M1>>) (data => data.sc.OrdSectsId));
        if (source.Count<int>() > 0)
          intList = source.ToList<int>();
        se0085CtEntities1.Database.Connection.Close();
      }
      return intList;
    }

    public scSectionRtLaData rtnCurrentWCPlusLabor(scLevels Plant, scLevels AssemblyLine, int SectionId, string OverRideCatalog = "x")
    {
      // ISSUE: object of a compiler-generated type is created
      // ISSUE: variable of a compiler-generated type
      clsRoutings._Closure\u0024__71 closure71 = new clsRoutings._Closure\u0024__71();
      scSectionRtLaData scSectionRtLaData = new scSectionRtLaData();
      // ISSUE: reference to a compiler-generated field
      closure71.\u0024VB\u0024Local_ldLaborBuild = new scSectionRtLaData();
      // ISSUE: reference to a compiler-generated field
      closure71.\u0024VB\u0024Local_ldWorkCenter = "";
      // ISSUE: reference to a compiler-generated field
      closure71.\u0024VB\u0024Local_ldSectionId = SectionId;
      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
        IQueryable<scSectionRtLaData> source1 = (IQueryable<scSectionRtLaData>) Queryable.Select(Queryable.Where((IQueryable<M0>) Queryable.Join((IQueryable<M0>) Queryable.Join((IQueryable<M0>) se0085CtEntities1.OrdSections, (IEnumerable<M1>) se0085CtEntities1.OrderLines, (Expression<Func<M0, M2>>) (sc => sc.OrderLine.OrderLineId), (Expression<Func<M1, M2>>) (ol => ol.OrderLineId), (Expression<Func<M0, M1, M3>>) ((sc, ol) => new{ sc = sc, ol = ol })), (IEnumerable<M1>) se0085CtEntities1.SEOrders, (Expression<Func<M0, M2>>) (data => data.ol.SEOrder.OrderId), (Expression<Func<M1, M2>>) (so => so.OrderId), (Expression<Func<M0, M1, M3>>) ((data, so) => new{ sc = data.sc, ol = data.ol, so = so })), (Expression<Func<M0, bool>>) Expression.Lambda<Func<VB\u0024AnonymousType_30<OrdSection, OrderLine, SEOrder>, bool>>((Expression) Expression.Equal(\u0024VB\u0024It.sc.OrdSectsId, closure71.\u0024VB\u0024Local_ldSectionId, true, (MethodInfo) null), new ParameterExpression[1]{ parameterExpression1 })), (Expression<Func<M0, M1>>) Expression.Lambda<Func<VB\u0024AnonymousType_30<OrdSection, OrderLine, SEOrder>, scSectionRtLaData>>((Expression) Expression.MemberInit(Expression.New((ConstructorInfo) MethodBase.GetMethodFromHandle(__methodref (scSectionRtLaData.\u002Ector)), (Expression[]) null), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scSectionRtLaData.set_Section)), (Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_30<OrdSection, OrderLine, SEOrder>.get_sc), __typeref (VB\u0024AnonymousType_30<OrdSection, OrderLine, SEOrder>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (OrdSection.get_OrdSectsNum)))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scSectionRtLaData.set_ProductionOrder)), (Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_30<OrdSection, OrderLine, SEOrder>.get_sc), __typeref (VB\u0024AnonymousType_30<OrdSection, OrderLine, SEOrder>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (OrdSection.get_OrdSectsProdNum)))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scSectionRtLaData.set_ShipDate)), (Expression) Expression.Convert((Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_30<OrdSection, OrderLine, SEOrder>.get_ol), __typeref (VB\u0024AnonymousType_30<OrdSection, OrderLine, SEOrder>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (OrderLine.get_OrderLineShipDt))), typeof (DateTime))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scSectionRtLaData.set_LineItem)), (Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_30<OrdSection, OrderLine, SEOrder>.get_ol), __typeref (VB\u0024AnonymousType_30<OrdSection, OrderLine, SEOrder>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (OrderLine.get_OrderLineNum)))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scSectionRtLaData.set_SLNumber)), (Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_30<OrdSection, OrderLine, SEOrder>.get_ol), __typeref (VB\u0024AnonymousType_30<OrdSection, OrderLine, SEOrder>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (OrderLine.get_OrderLineSL)))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scSectionRtLaData.set_SSNumber)), (Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_30<OrdSection, OrderLine, SEOrder>.get_ol), __typeref (VB\u0024AnonymousType_30<OrdSection, OrderLine, SEOrder>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (OrderLine.get_OrderLineSS)))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scSectionRtLaData.set_FactoryOrder)), (Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_30<OrdSection, OrderLine, SEOrder>.get_so), __typeref (VB\u0024AnonymousType_30<OrdSection, OrderLine, SEOrder>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (SEOrder.get_OrderFO)))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scSectionRtLaData.set_WorkCenter)), (Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_30<OrdSection, OrderLine, SEOrder>.get_sc), __typeref (VB\u0024AnonymousType_30<OrdSection, OrderLine, SEOrder>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (OrdSection.get_OrdSectsCurrWorkCtr))))), new ParameterExpression[1]{ parameterExpression2 }));
        if (source1.Count<scSectionRtLaData>() == 1)
        {
          scSectionRtLaData = source1.First<scSectionRtLaData>();
          // ISSUE: reference to a compiler-generated field
          closure71.\u0024VB\u0024Local_ldWorkCenter = scSectionRtLaData.WorkCenter;
          ParameterExpression parameterExpression3;
          ParameterExpression parameterExpression4;
          // ISSUE: reference to a compiler-generated field
          // 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: method reference
          // 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<scSectionRtLaData> source2 = (IQueryable<scSectionRtLaData>) Queryable.Select((IQueryable<M0>) Queryable.OrderByDescending(Queryable.Where((IQueryable<M0>) Queryable.Join((IQueryable<M0>) Queryable.Join((IQueryable<M0>) se0085CtEntities1.OrdSections, (IEnumerable<M1>) se0085CtEntities1.SectionsRoutings, (Expression<Func<M0, M2>>) (sc => sc.OrdSectsId), (Expression<Func<M1, M2>>) (rt => rt.OrdSection.OrdSectsId), (Expression<Func<M0, M1, M3>>) ((sc, rt) => new{ sc = sc, rt = rt })), (IEnumerable<M1>) se0085CtEntities1.LaborVouchers, (Expression<Func<M0, M2>>) (data => data.rt.RoutingId), (Expression<Func<M1, M2>>) (la => la.SectionsRouting.RoutingId), (Expression<Func<M0, M1, M3>>) ((data, la) => new{ sc = data.sc, rt = data.rt, la = la })), (Expression<Func<M0, bool>>) Expression.Lambda<Func<VB\u0024AnonymousType_32<OrdSection, SectionsRouting, LaborVoucher>, bool>>((Expression) Expression.And((Expression) Expression.Equal(\u0024VB\u0024It.sc.OrdSectsId, closure71.\u0024VB\u0024Local_ldSectionId, true, (MethodInfo) null), (Expression) Expression.Equal((Expression) Expression.Call((Expression) null, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (Operators.CompareString)), (Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression3, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_32<OrdSection, SectionsRouting, LaborVoucher>.get_rt), __typeref (VB\u0024AnonymousType_32<OrdSection, SectionsRouting, LaborVoucher>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (SectionsRouting.get_RoutingWorkCenter))), (Expression) Expression.Field((Expression) Expression.Constant((object) closure71, typeof (clsRoutings._Closure\u0024__71)), FieldInfo.GetFieldFromHandle(__fieldref (clsRoutings._Closure\u0024__71.\u0024VB\u0024Local_ldWorkCenter))), (Expression) Expression.Constant((object) false, typeof (bool))), (Expression) Expression.Constant((object) 0, typeof (int)))), new ParameterExpression[1]{ parameterExpression3 })), (Expression<Func<M0, M1>>) (data => data.la.LaborVohStartDt)), (Expression<Func<M0, M1>>) Expression.Lambda<Func<VB\u0024AnonymousType_32<OrdSection, SectionsRouting, LaborVoucher>, scSectionRtLaData>>((Expression) Expression.MemberInit(Expression.New((ConstructorInfo) MethodBase.GetMethodFromHandle(__methodref (scSectionRtLaData.\u002Ector)), (Expression[]) null), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scSectionRtLaData.set_OperatorName)), (Expression) Expression.Convert((Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression4, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_32<OrdSection, SectionsRouting, LaborVoucher>.get_la), __typeref (VB\u0024AnonymousType_32<OrdSection, SectionsRouting, LaborVoucher>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (LaborVoucher.get_LaborVohOperId))), typeof (string), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (Conversions.ToString)))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scSectionRtLaData.set_StartDate)), (Expression) Expression.Convert((Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression4, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_32<OrdSection, SectionsRouting, LaborVoucher>.get_la), __typeref (VB\u0024AnonymousType_32<OrdSection, SectionsRouting, LaborVoucher>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (LaborVoucher.get_LaborVohStartDt))), typeof (DateTime))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scSectionRtLaData.set_EndDate)), (Expression) Expression.Convert((Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression4, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_32<OrdSection, SectionsRouting, LaborVoucher>.get_la), __typeref (VB\u0024AnonymousType_32<OrdSection, SectionsRouting, LaborVoucher>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (LaborVoucher.get_LaborVohEndDt))), typeof (DateTime)))), new ParameterExpression[1]{ parameterExpression4 }));
          if (source2.Count<scSectionRtLaData>() == 1)
          {
            // ISSUE: reference to a compiler-generated field
            closure71.\u0024VB\u0024Local_ldLaborBuild = source2.First<scSectionRtLaData>();
            // ISSUE: reference to a compiler-generated field
            scSectionRtLaData.OperatorName = closure71.\u0024VB\u0024Local_ldLaborBuild.OperatorName;
            // ISSUE: reference to a compiler-generated field
            scSectionRtLaData.StartDate = closure71.\u0024VB\u0024Local_ldLaborBuild.StartDate;
            // ISSUE: reference to a compiler-generated field
            scSectionRtLaData.EndDate = closure71.\u0024VB\u0024Local_ldLaborBuild.EndDate;
            if (scSectionRtLaData.OperatorName.Length == 8)
            {
              ParameterExpression parameterExpression5;
              ParameterExpression parameterExpression6;
              // ISSUE: reference to a compiler-generated field
              // ISSUE: method reference
              // ISSUE: method reference
              // ISSUE: method reference
              // ISSUE: method reference
              // ISSUE: method reference
              IQueryable<scAssociateData> source3 = (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((double) ac.AssocEmpId, (double) closure71.\u0024VB\u0024Local_ldLaborBuild.OperatorName, true, (MethodInfo) null), new ParameterExpression[1]{ parameterExpression5 })), (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_AssocFirstName)), (Expression) Expression.Property((Expression) parameterExpression6, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (Associate.get_AssocFirstName)))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scAssociateData.set_AssocLastName)), (Expression) Expression.Property((Expression) parameterExpression6, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (Associate.get_AssocLastName))))), new ParameterExpression[1]{ parameterExpression6 }));
              if (source3.Count<scAssociateData>() == 1)
              {
                scAssociateData scAssociateData1 = new scAssociateData();
                scAssociateData scAssociateData2 = source3.First<scAssociateData>();
                scSectionRtLaData.OperatorName = scAssociateData2.AssocFirstName + " " + scAssociateData2.AssocLastName;
              }
            }
          }
        }
        se0085CtEntities1.Database.Connection.Close();
      }
      return scSectionRtLaData;
    }

    public List<scLaborData> rtnWIP4QuickLabor(scLevels Plant, scLevels AssemblyLine, string OverRideCatalog = "x")
    {
      List<scLaborData> scLaborDataList = new List<scLaborData>();
      DateTime dateTime = DateTime.Today.AddDays(-5.0);
      DateTime date = Conversions.ToDate("01/01/2010");
      using (SE0085CTEntities1 se0085CtEntities1 = new SE0085CTEntities1())
      {
        se0085CtEntities1.Database.Connection.ConnectionString = this._CTConnection;
        ParameterExpression parameterExpression;
        // ISSUE: method reference
        // 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<scLaborData> source = (IQueryable<scLaborData>) Queryable.Select(Queryable.Where((IQueryable<M0>) Queryable.Join((IQueryable<M0>) Queryable.Join((IQueryable<M0>) Queryable.Join((IQueryable<M0>) se0085CtEntities1.OrdSections, (IEnumerable<M1>) se0085CtEntities1.OrderLines, (Expression<Func<M0, M2>>) (sc => sc.OrderLine.OrderLineId), (Expression<Func<M1, M2>>) (ol => ol.OrderLineId), (Expression<Func<M0, M1, M3>>) ((sc, ol) => new{ sc = sc, ol = ol })), (IEnumerable<M1>) se0085CtEntities1.SEOrders, (Expression<Func<M0, M2>>) (data => data.ol.SEOrder.OrderId), (Expression<Func<M1, M2>>) (so => so.OrderId), (Expression<Func<M0, M1, M3>>) ((data, so) => new{ \u0024VB\u0024It1 = data, so = so })), (IEnumerable<M1>) se0085CtEntities1.SectionsRoutings, (Expression<Func<M0, M2>>) (data => data.\u0024VB\u0024It1.sc.OrdSectsId), (Expression<Func<M1, M2>>) (rt => rt.OrdSection.OrdSectsId), (Expression<Func<M0, M1, M3>>) ((data, rt) => new{ sc = data.\u0024VB\u0024It1.sc, ol = data.\u0024VB\u0024It1.ol, so = data.so, rt = rt })), (Expression<Func<M0, bool>>) (data => data.rt.RoutingActStartDt > (DateTime?) dateTime & data.rt.RoutingActFinishDt < (DateTime?) date ?? false)), (Expression<Func<M0, M1>>) Expression.Lambda<Func<VB\u0024AnonymousType_34<OrdSection, OrderLine, SEOrder, SectionsRouting>, scLaborData>>((Expression) Expression.MemberInit(Expression.New((ConstructorInfo) MethodBase.GetMethodFromHandle(__methodref (scLaborData.\u002Ector)), (Expression[]) null), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scLaborData.set_ProductionOrder)), (Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_34<OrdSection, OrderLine, SEOrder, SectionsRouting>.get_sc), __typeref (VB\u0024AnonymousType_34<OrdSection, OrderLine, SEOrder, SectionsRouting>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (OrdSection.get_OrdSectsProdNum)))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scLaborData.set_FactoryOrder)), (Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_34<OrdSection, OrderLine, SEOrder, SectionsRouting>.get_so), __typeref (VB\u0024AnonymousType_34<OrdSection, OrderLine, SEOrder, SectionsRouting>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (SEOrder.get_OrderFO)))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scLaborData.set_LineItem)), (Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_34<OrdSection, OrderLine, SEOrder, SectionsRouting>.get_ol), __typeref (VB\u0024AnonymousType_34<OrdSection, OrderLine, SEOrder, SectionsRouting>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (OrderLine.get_OrderLineNum)))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scLaborData.set_SLNumber)), (Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_34<OrdSection, OrderLine, SEOrder, SectionsRouting>.get_ol), __typeref (VB\u0024AnonymousType_34<OrdSection, OrderLine, SEOrder, SectionsRouting>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (OrderLine.get_OrderLineSL)))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scLaborData.set_SSNumber)), (Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_34<OrdSection, OrderLine, SEOrder, SectionsRouting>.get_ol), __typeref (VB\u0024AnonymousType_34<OrdSection, OrderLine, SEOrder, SectionsRouting>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (OrderLine.get_OrderLineSS)))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scLaborData.set_Section)), (Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_34<OrdSection, OrderLine, SEOrder, SectionsRouting>.get_sc), __typeref (VB\u0024AnonymousType_34<OrdSection, OrderLine, SEOrder, SectionsRouting>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (OrdSection.get_OrdSectsNum)))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scLaborData.set_WorkCenter)), (Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_34<OrdSection, OrderLine, SEOrder, SectionsRouting>.get_sc), __typeref (VB\u0024AnonymousType_34<OrdSection, OrderLine, SEOrder, SectionsRouting>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (OrdSection.get_OrdSectsCurrWorkCtr)))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scLaborData.set_StandardTime)), (Expression) Expression.ConvertChecked((Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_34<OrdSection, OrderLine, SEOrder, SectionsRouting>.get_rt), __typeref (VB\u0024AnonymousType_34<OrdSection, OrderLine, SEOrder, SectionsRouting>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (SectionsRouting.get_RoutingRunTimeMin))), typeof (int))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scLaborData.set_StartDate)), (Expression) Expression.Convert((Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_34<OrdSection, OrderLine, SEOrder, SectionsRouting>.get_rt), __typeref (VB\u0024AnonymousType_34<OrdSection, OrderLine, SEOrder, SectionsRouting>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (SectionsRouting.get_RoutingActStartDt))), typeof (DateTime))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scLaborData.set_EndDate)), (Expression) Expression.Convert((Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_34<OrdSection, OrderLine, SEOrder, SectionsRouting>.get_rt), __typeref (VB\u0024AnonymousType_34<OrdSection, OrderLine, SEOrder, SectionsRouting>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (SectionsRouting.get_RoutingActFinishDt))), typeof (DateTime)))), new ParameterExpression[1]{ parameterExpression }));
        if (source.Count<scLaborData>() > 1)
          scLaborDataList = source.ToList<scLaborData>();
        se0085CtEntities1.Database.Connection.Close();
      }
      return scLaborDataList;
    }

    public List<int> rtnRoutingWorkCenterBacklogSections(scLevels Plant, scLevels AssemblyLine, DateTime StartDate, DateTime FinishDate, string Workcenter, bool IncShipped = false, string OverRideCatalog = "x")
    {
      // ISSUE: object of a compiler-generated type is created
      // ISSUE: variable of a compiler-generated type
      clsRoutings._Closure\u0024__73 closure73 = new clsRoutings._Closure\u0024__73();
      // ISSUE: reference to a compiler-generated field
      closure73.\u0024VB\u0024Local_Plant = Plant;
      // ISSUE: reference to a compiler-generated field
      closure73.\u0024VB\u0024Local_AssemblyLine = AssemblyLine;
      List<int> intList = new List<int>();
      // ISSUE: reference to a compiler-generated field
      closure73.\u0024VB\u0024Local_ldActFinishConst = Conversions.ToDate("01/01/2000");
      // ISSUE: reference to a compiler-generated field
      closure73.\u0024VB\u0024Local_ldShipped1 = false;
      // ISSUE: reference to a compiler-generated field
      closure73.\u0024VB\u0024Local_ldShipped2 = false;
      if (IncShipped)
      {
        // ISSUE: reference to a compiler-generated field
        closure73.\u0024VB\u0024Local_ldShipped2 = true;
      }
      // ISSUE: reference to a compiler-generated field
      closure73.\u0024VB\u0024Local_ldWorkCenter = Workcenter;
      // ISSUE: reference to a compiler-generated field
      closure73.\u0024VB\u0024Local_ldStartTime = StartDate;
      // ISSUE: reference to a compiler-generated field
      closure73.\u0024VB\u0024Local_ldEndTime = FinishDate;
      using (SE0085CTEntities1 se0085CtEntities1 = new SE0085CTEntities1())
      {
        se0085CtEntities1.Database.Connection.ConnectionString = this._CTConnection;
        ParameterExpression parameterExpression;
        // 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: 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: 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: field reference
        // ISSUE: method reference
        // ISSUE: type reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: type reference
        // ISSUE: method reference
        IQueryable<int> source = (IQueryable<int>) 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>) Queryable.Join((IQueryable<M0>) Queryable.Join((IQueryable<M0>) se0085CtEntities1.SEPlants, (IEnumerable<M1>) se0085CtEntities1.AssemblyLines, (Expression<Func<M0, M2>>) (pl => pl.SEPlantId), (Expression<Func<M1, M2>>) (al => al.SEPlant.SEPlantId), (Expression<Func<M0, M1, M3>>) ((pl, al) => new{ pl = pl, al = al })), (IEnumerable<M1>) se0085CtEntities1.OrderLines, (Expression<Func<M0, M2>>) (data => data.al.AssemLineId), (Expression<Func<M1, M2>>) (ol => ol.AssemblyLine.AssemLineId), (Expression<Func<M0, M1, M3>>) ((data, ol) => new{ \u0024VB\u0024It1 = data, 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.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{ \u0024VB\u0024It1 = data, rt = rt })), (IEnumerable<M1>) se0085CtEntities1.SEOrders, (Expression<Func<M0, M2>>) (data => data.\u0024VB\u0024It1.\u0024VB\u0024It1.ol.SEOrder.OrderId), (Expression<Func<M1, M2>>) (so => so.OrderId), (Expression<Func<M0, M1, M3>>) ((data, so) => new{ pl = data.\u0024VB\u0024It1.\u0024VB\u0024It1.\u0024VB\u0024It1.pl, al = data.\u0024VB\u0024It1.\u0024VB\u0024It1.\u0024VB\u0024It1.al, ol = data.\u0024VB\u0024It1.\u0024VB\u0024It1.ol, sc = data.\u0024VB\u0024It1.sc, rt = data.rt, so = so })), (Expression<Func<M0, bool>>) Expression.Lambda<Func<VB\u0024AnonymousType_28<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting, SEOrder>, bool>>((Expression) Expression.Coalesce((Expression) Expression.And((Expression) Expression.And((Expression) Expression.And((Expression) Expression.And((Expression) Expression.And((Expression) Expression.Convert((Expression) Expression.And((Expression) Expression.And((Expression) Expression.Equal(\u0024VB\u0024It.pl.SEPlantId, closure73.\u0024VB\u0024Local_Plant.LevelId, true, (MethodInfo) null), (Expression) Expression.Equal((Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_28<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting, SEOrder>.get_al), __typeref (VB\u0024AnonymousType_28<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting, SEOrder>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (AssemblyLine.get_AssemLineId))), (Expression) Expression.Property((Expression) Expression.Field((Expression) Expression.Constant((object) closure73, typeof (clsRoutings._Closure\u0024__73)), FieldInfo.GetFieldFromHandle(__fieldref (clsRoutings._Closure\u0024__73.\u0024VB\u0024Local_AssemblyLine))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scLevels.get_LevelId))), true, (MethodInfo) null)), (Expression) Expression.Equal((Expression) Expression.Call((Expression) null, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (Operators.CompareString)), (Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_28<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting, SEOrder>.get_rt), __typeref (VB\u0024AnonymousType_28<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting, SEOrder>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (SectionsRouting.get_RoutingWorkCenter))), (Expression) Expression.Field((Expression) Expression.Constant((object) closure73, typeof (clsRoutings._Closure\u0024__73)), FieldInfo.GetFieldFromHandle(__fieldref (clsRoutings._Closure\u0024__73.\u0024VB\u0024Local_ldWorkCenter))), (Expression) Expression.Constant((object) false, typeof (bool))), (Expression) Expression.Constant((object) 0, typeof (int)))), typeof (bool?)), (Expression) Expression.LessThan((Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_28<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting, SEOrder>.get_rt), __typeref (VB\u0024AnonymousType_28<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting, SEOrder>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (SectionsRouting.get_RoutingActFinishDt))), (Expression) Expression.Convert((Expression) Expression.Field((Expression) Expression.Constant((object) closure73, typeof (clsRoutings._Closure\u0024__73)), FieldInfo.GetFieldFromHandle(__fieldref (clsRoutings._Closure\u0024__73.\u0024VB\u0024Local_ldActFinishConst))), typeof (DateTime?)), true, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (DateTime.op_LessThan)))), (Expression) Expression.GreaterThanOrEqual((Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_28<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting, SEOrder>.get_rt), __typeref (VB\u0024AnonymousType_28<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting, SEOrder>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (SectionsRouting.get_RoutingSchStartDt))), (Expression) Expression.Convert((Expression) Expression.Field((Expression) Expression.Constant((object) closure73, typeof (clsRoutings._Closure\u0024__73)), FieldInfo.GetFieldFromHandle(__fieldref (clsRoutings._Closure\u0024__73.\u0024VB\u0024Local_ldStartTime))), typeof (DateTime?)), true, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (DateTime.op_GreaterThanOrEqual)))), (Expression) Expression.LessThanOrEqual((Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_28<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting, SEOrder>.get_rt), __typeref (VB\u0024AnonymousType_28<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting, SEOrder>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (SectionsRouting.get_RoutingSchStartDt))), (Expression) Expression.Convert((Expression) Expression.Field((Expression) Expression.Constant((object) closure73, typeof (clsRoutings._Closure\u0024__73)), FieldInfo.GetFieldFromHandle(__fieldref (clsRoutings._Closure\u0024__73.\u0024VB\u0024Local_ldEndTime))), typeof (DateTime?)), true, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (DateTime.op_LessThanOrEqual)))), (Expression) Expression.Or((Expression) Expression.Equal((Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_28<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting, SEOrder>.get_ol), __typeref (VB\u0024AnonymousType_28<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting, SEOrder>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (OrderLine.get_OrderLineShipped))), (Expression) Expression.Convert((Expression) Expression.Field((Expression) Expression.Constant((object) closure73, typeof (clsRoutings._Closure\u0024__73)), FieldInfo.GetFieldFromHandle(__fieldref (clsRoutings._Closure\u0024__73.\u0024VB\u0024Local_ldShipped1))), typeof (bool?)), true, (MethodInfo) null), (Expression) Expression.Equal((Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_28<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting, SEOrder>.get_ol), __typeref (VB\u0024AnonymousType_28<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting, SEOrder>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (OrderLine.get_OrderLineShipped))), (Expression) Expression.Convert((Expression) Expression.Field((Expression) Expression.Constant((object) closure73, typeof (clsRoutings._Closure\u0024__73)), FieldInfo.GetFieldFromHandle(__fieldref (clsRoutings._Closure\u0024__73.\u0024VB\u0024Local_ldShipped2))), typeof (bool?)), true, (MethodInfo) null))), (Expression) Expression.LessThan((Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_28<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting, SEOrder>.get_ol), __typeref (VB\u0024AnonymousType_28<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting, SEOrder>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (OrderLine.get_OrderLineShipDt))), (Expression) Expression.Convert((Expression) Expression.Convert((Expression) Expression.Constant((object) "01/01/2020", typeof (string)), typeof (DateTime), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (Conversions.ToDate))), typeof (DateTime?), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (DateTime?.op_Implicit), __typeref (DateTime?))), true, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (DateTime.op_LessThan)))), (Expression) Expression.Constant((object) false, typeof (bool))), new ParameterExpression[1]{ parameterExpression })), (Expression<Func<M0, M1>>) (data => data.ol.OrderLineShipDt)), (Expression<Func<M0, M1>>) (data => data.so.OrderFO)), (Expression<Func<M0, M1>>) (data => data.ol.OrderLineNum)), (Expression<Func<M0, M1>>) (data => data.sc.OrdSectsNum)), (Expression<Func<M0, M1>>) (data => data.sc.OrdSectsId));
        if (source.Count<int>() > 0)
          intList = source.ToList<int>();
        se0085CtEntities1.Database.Connection.Close();
      }
      return intList;
    }

    public List<int> rtnRoutingWorkCenterWIP(scLevels Plant, scLevels AssemblyLine, string Workcenter)
    {
      // ISSUE: object of a compiler-generated type is created
      // ISSUE: variable of a compiler-generated type
      clsRoutings._Closure\u0024__74 closure74 = new clsRoutings._Closure\u0024__74();
      // ISSUE: reference to a compiler-generated field
      closure74.\u0024VB\u0024Local_Plant = Plant;
      // ISSUE: reference to a compiler-generated field
      closure74.\u0024VB\u0024Local_AssemblyLine = AssemblyLine;
      List<int> intList = new List<int>();
      // ISSUE: reference to a compiler-generated field
      closure74.\u0024VB\u0024Local_ldActFinishConst = Conversions.ToDate("01/01/2000");
      // ISSUE: reference to a compiler-generated field
      closure74.\u0024VB\u0024Local_ldWorkCenter = Workcenter;
      // ISSUE: reference to a compiler-generated field
      closure74.\u0024VB\u0024Local_ldStartTime = Conversions.ToDate("01/01/2014");
      using (SE0085CTEntities1 se0085CtEntities1 = new SE0085CTEntities1())
      {
        se0085CtEntities1.Database.Connection.ConnectionString = this._CTConnection;
        ParameterExpression parameterExpression;
        // 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: 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: type reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: type reference
        // ISSUE: method reference
        IQueryable<int> source = (IQueryable<int>) 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>) Queryable.Join((IQueryable<M0>) Queryable.Join((IQueryable<M0>) se0085CtEntities1.SEPlants, (IEnumerable<M1>) se0085CtEntities1.AssemblyLines, (Expression<Func<M0, M2>>) (pl => pl.SEPlantId), (Expression<Func<M1, M2>>) (al => al.SEPlant.SEPlantId), (Expression<Func<M0, M1, M3>>) ((pl, al) => new{ pl = pl, al = al })), (IEnumerable<M1>) se0085CtEntities1.OrderLines, (Expression<Func<M0, M2>>) (data => data.al.AssemLineId), (Expression<Func<M1, M2>>) (ol => ol.AssemblyLine.AssemLineId), (Expression<Func<M0, M1, M3>>) ((data, ol) => new{ \u0024VB\u0024It1 = data, 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.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{ \u0024VB\u0024It1 = data, rt = rt })), (IEnumerable<M1>) se0085CtEntities1.SEOrders, (Expression<Func<M0, M2>>) (data => data.\u0024VB\u0024It1.\u0024VB\u0024It1.ol.SEOrder.OrderId), (Expression<Func<M1, M2>>) (so => so.OrderId), (Expression<Func<M0, M1, M3>>) ((data, so) => new{ pl = data.\u0024VB\u0024It1.\u0024VB\u0024It1.\u0024VB\u0024It1.pl, al = data.\u0024VB\u0024It1.\u0024VB\u0024It1.\u0024VB\u0024It1.al, ol = data.\u0024VB\u0024It1.\u0024VB\u0024It1.ol, sc = data.\u0024VB\u0024It1.sc, rt = data.rt, so = so })), (Expression<Func<M0, bool>>) Expression.Lambda<Func<VB\u0024AnonymousType_28<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting, SEOrder>, bool>>((Expression) Expression.Coalesce((Expression) Expression.And((Expression) Expression.And((Expression) Expression.And((Expression) Expression.And((Expression) Expression.Convert((Expression) Expression.And((Expression) Expression.And((Expression) Expression.Equal(\u0024VB\u0024It.pl.SEPlantId, closure74.\u0024VB\u0024Local_Plant.LevelId, true, (MethodInfo) null), (Expression) Expression.Equal((Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_28<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting, SEOrder>.get_al), __typeref (VB\u0024AnonymousType_28<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting, SEOrder>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (AssemblyLine.get_AssemLineId))), (Expression) Expression.Property((Expression) Expression.Field((Expression) Expression.Constant((object) closure74, typeof (clsRoutings._Closure\u0024__74)), FieldInfo.GetFieldFromHandle(__fieldref (clsRoutings._Closure\u0024__74.\u0024VB\u0024Local_AssemblyLine))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scLevels.get_LevelId))), true, (MethodInfo) null)), (Expression) Expression.Equal((Expression) Expression.Call((Expression) null, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (Operators.CompareString)), (Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_28<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting, SEOrder>.get_rt), __typeref (VB\u0024AnonymousType_28<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting, SEOrder>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (SectionsRouting.get_RoutingWorkCenter))), (Expression) Expression.Field((Expression) Expression.Constant((object) closure74, typeof (clsRoutings._Closure\u0024__74)), FieldInfo.GetFieldFromHandle(__fieldref (clsRoutings._Closure\u0024__74.\u0024VB\u0024Local_ldWorkCenter))), (Expression) Expression.Constant((object) false, typeof (bool))), (Expression) Expression.Constant((object) 0, typeof (int)))), typeof (bool?)), (Expression) Expression.LessThan((Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_28<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting, SEOrder>.get_rt), __typeref (VB\u0024AnonymousType_28<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting, SEOrder>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (SectionsRouting.get_RoutingActFinishDt))), (Expression) Expression.Convert((Expression) Expression.Field((Expression) Expression.Constant((object) closure74, typeof (clsRoutings._Closure\u0024__74)), FieldInfo.GetFieldFromHandle(__fieldref (clsRoutings._Closure\u0024__74.\u0024VB\u0024Local_ldActFinishConst))), typeof (DateTime?)), true, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (DateTime.op_LessThan)))), (Expression) Expression.GreaterThanOrEqual((Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_28<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting, SEOrder>.get_rt), __typeref (VB\u0024AnonymousType_28<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting, SEOrder>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (SectionsRouting.get_RoutingActStartDt))), (Expression) Expression.Convert((Expression) Expression.Field((Expression) Expression.Constant((object) closure74, typeof (clsRoutings._Closure\u0024__74)), FieldInfo.GetFieldFromHandle(__fieldref (clsRoutings._Closure\u0024__74.\u0024VB\u0024Local_ldStartTime))), typeof (DateTime?)), true, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (DateTime.op_GreaterThanOrEqual)))), (Expression) Expression.Equal((Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_28<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting, SEOrder>.get_ol), __typeref (VB\u0024AnonymousType_28<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting, SEOrder>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (OrderLine.get_OrderLineShipped))), (Expression) Expression.Convert((Expression) Expression.Constant((object) false, typeof (bool)), typeof (bool?)), true, (MethodInfo) null)), (Expression) Expression.LessThan((Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_28<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting, SEOrder>.get_ol), __typeref (VB\u0024AnonymousType_28<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting, SEOrder>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (OrderLine.get_OrderLineShipDt))), (Expression) Expression.Convert((Expression) Expression.Convert((Expression) Expression.Constant((object) "01/01/2020", typeof (string)), typeof (DateTime), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (Conversions.ToDate))), typeof (DateTime?), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (DateTime?.op_Implicit), __typeref (DateTime?))), true, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (DateTime.op_LessThan)))), (Expression) Expression.Constant((object) false, typeof (bool))), new ParameterExpression[1]{ parameterExpression })), (Expression<Func<M0, M1>>) (data => data.ol.OrderLineShipDt)), (Expression<Func<M0, M1>>) (data => data.so.OrderFO)), (Expression<Func<M0, M1>>) (data => data.ol.OrderLineNum)), (Expression<Func<M0, M1>>) (data => data.sc.OrdSectsNum)), (Expression<Func<M0, M1>>) (data => data.sc.OrdSectsId));
        if (source.Count<int>() > 0)
          intList = source.ToList<int>();
        se0085CtEntities1.Database.Connection.Close();
      }
      return intList;
    }

    public object rtnOFOAvailableSections(string Workcenter)
    {
      // ISSUE: object of a compiler-generated type is created
      // ISSUE: variable of a compiler-generated type
      clsRoutings._Closure\u0024__75 closure75 = new clsRoutings._Closure\u0024__75();
      int num = 0;
      // ISSUE: reference to a compiler-generated field
      closure75.\u0024VB\u0024Local_ldWorkCenter = Workcenter;
      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: type reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: type reference
        // ISSUE: method reference
        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.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{ \u0024VB\u0024It1 = data, rt = rt })), (IEnumerable<M1>) se0085CtEntities1.SEOrders, (Expression<Func<M0, M2>>) (data => data.\u0024VB\u0024It1.ol.SEOrder.OrderId), (Expression<Func<M1, M2>>) (so => so.OrderId), (Expression<Func<M0, M1, M3>>) ((data, so) => new{ \u0024VB\u0024It1 = data, so = so })), (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{ ol = data.\u0024VB\u0024It1.\u0024VB\u0024It1.ol, sc = data.\u0024VB\u0024It1.\u0024VB\u0024It1.sc, rt = data.\u0024VB\u0024It1.rt, so = data.so, oe = oe })), (Expression<Func<M0, bool>>) Expression.Lambda<Func<VB\u0024AnonymousType_35<OrderLine, OrdSection, SectionsRouting, SEOrder, OrderLinesExt>, bool>>((Expression) Expression.Coalesce((Expression) Expression.And((Expression) Expression.And((bool?) (Expression.Call((Expression) null, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (Operators.CompareString)), \u0024VB\u0024It.rt.RoutingWorkCenter, closure75.\u0024VB\u0024Local_ldWorkCenter, false) == 0) & \u0024VB\u0024It.rt.RoutingSchStartDt > (DateTime?) (DateTime) "01/01/2014" & \u0024VB\u0024It.rt.RoutingActStartDt == (DateTime?) (DateTime) "01/01/1901" & \u0024VB\u0024It.oe.OrderLineActAssyStDt > (DateTime?) (DateTime) "01/01/1901", (Expression) Expression.Equal(\u0024VB\u0024It.ol.OrderLineShipped, (bool?) false, true, (MethodInfo) null)), (Expression) Expression.LessThan((Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_35<OrderLine, OrdSection, SectionsRouting, SEOrder, OrderLinesExt>.get_ol), __typeref (VB\u0024AnonymousType_35<OrderLine, OrdSection, SectionsRouting, SEOrder, OrderLinesExt>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (OrderLine.get_OrderLineShipDt))), (Expression) Expression.Convert((Expression) Expression.Convert((Expression) Expression.Constant((object) "01/01/2020", typeof (string)), typeof (DateTime), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (Conversions.ToDate))), typeof (DateTime?), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (DateTime?.op_Implicit), __typeref (DateTime?))), true, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (DateTime.op_LessThan)))), (Expression) Expression.Constant((object) false, typeof (bool))), new ParameterExpression[1]{ parameterExpression })), (Expression<Func<M0, M1>>) (data => data.sc.OrdSectsId));
        if (source != null && source.Count<int>() > 0)
          num = source.Count<int>();
        se0085CtEntities1.Database.Connection.Close();
      }
      return (object) num;
    }

    public bool rtnBreakerOrderReq(int OrderLineId, string Workcenter, clsRoutings.emBrkOrderCond StartCond = clsRoutings.emBrkOrderCond.AllSectionsStartedWC)
    {
      // ISSUE: object of a compiler-generated type is created
      // ISSUE: variable of a compiler-generated type
      clsRoutings._Closure\u0024__76 closure76 = new clsRoutings._Closure\u0024__76();
      // ISSUE: reference to a compiler-generated field
      closure76.\u0024VB\u0024Local_OrderLineId = OrderLineId;
      // ISSUE: reference to a compiler-generated field
      closure76.\u0024VB\u0024Local_Workcenter = Workcenter;
      // ISSUE: reference to a compiler-generated field
      closure76.\u0024VB\u0024Local_ldActStartConst = Conversions.ToDate("01/01/2000");
      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: type reference
        // ISSUE: method reference
        // ISSUE: field reference
        IQueryable<int> source1 = (IQueryable<int>) 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>>) Expression.Lambda<Func<VB\u0024AnonymousType_11<OrderLine, OrdSection, SectionsRouting>, bool>>((Expression) Expression.And((Expression) Expression.Equal(\u0024VB\u0024It.ol.OrderLineId, closure76.\u0024VB\u0024Local_OrderLineId, true, (MethodInfo) null), (Expression) Expression.Equal((Expression) Expression.Call((Expression) null, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (Operators.CompareString)), (Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression1, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_11<OrderLine, OrdSection, SectionsRouting>.get_rt), __typeref (VB\u0024AnonymousType_11<OrderLine, OrdSection, SectionsRouting>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (SectionsRouting.get_RoutingWorkCenter))), (Expression) Expression.Field((Expression) Expression.Constant((object) closure76, typeof (clsRoutings._Closure\u0024__76)), FieldInfo.GetFieldFromHandle(__fieldref (clsRoutings._Closure\u0024__76.\u0024VB\u0024Local_Workcenter))), (Expression) Expression.Constant((object) false, typeof (bool))), (Expression) Expression.Constant((object) 0, typeof (int)))), new ParameterExpression[1]{ parameterExpression1 })), (Expression<Func<M0, M1>>) (data => data.sc.OrdSectsId));
        int num1;
        if (source1.Count<int>() > 0)
          num1 = source1.Count<int>();
        ParameterExpression parameterExpression2;
        // ISSUE: reference to a compiler-generated field
        // 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
        IQueryable<int> source2 = (IQueryable<int>) 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>>) Expression.Lambda<Func<VB\u0024AnonymousType_11<OrderLine, OrdSection, SectionsRouting>, bool>>((Expression) Expression.Coalesce((Expression) Expression.And((Expression) Expression.Convert((Expression) Expression.And((Expression) Expression.Equal(\u0024VB\u0024It.ol.OrderLineId, closure76.\u0024VB\u0024Local_OrderLineId, true, (MethodInfo) null), (Expression) Expression.Equal((Expression) Expression.Call((Expression) null, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (Operators.CompareString)), (Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_11<OrderLine, OrdSection, SectionsRouting>.get_rt), __typeref (VB\u0024AnonymousType_11<OrderLine, OrdSection, SectionsRouting>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (SectionsRouting.get_RoutingWorkCenter))), (Expression) Expression.Field((Expression) Expression.Constant((object) closure76, typeof (clsRoutings._Closure\u0024__76)), FieldInfo.GetFieldFromHandle(__fieldref (clsRoutings._Closure\u0024__76.\u0024VB\u0024Local_Workcenter))), (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) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_11<OrderLine, OrdSection, SectionsRouting>.get_rt), __typeref (VB\u0024AnonymousType_11<OrderLine, OrdSection, SectionsRouting>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (SectionsRouting.get_RoutingActStartDt))), (Expression) Expression.Convert((Expression) Expression.Field((Expression) Expression.Constant((object) closure76, typeof (clsRoutings._Closure\u0024__76)), FieldInfo.GetFieldFromHandle(__fieldref (clsRoutings._Closure\u0024__76.\u0024VB\u0024Local_ldActStartConst))), typeof (DateTime?)), true, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (DateTime.op_GreaterThan)))), (Expression) Expression.Constant((object) false, typeof (bool))), new ParameterExpression[1]{ parameterExpression2 })), (Expression<Func<M0, M1>>) (data => data.sc.OrdSectsId));
        int num2;
        if (source2.Count<int>() > 0)
          num2 = source2.Count<int>();
        switch (StartCond)
        {
          case clsRoutings.emBrkOrderCond.AllSectionsStartedWC:
            return num2 == num1 & num1 > 0;
          case clsRoutings.emBrkOrderCond.OneSectionStartedWC:
            return num2 > 0 & num1 > 0;
          default:
            return false;
        }
      }
    }

    private List<int> junkforlatergetRoutingWorkCenterCompletedSections(DateTime StartDate, DateTime FinishDate, string Workcenter)
    {
      // ISSUE: object of a compiler-generated type is created
      // ISSUE: variable of a compiler-generated type
      clsRoutings._Closure\u0024__77 closure77 = new clsRoutings._Closure\u0024__77();
      List<int> intList = new List<int>();
      // ISSUE: reference to a compiler-generated field
      closure77.\u0024VB\u0024Local_ldFIFOWC01 = "CBLUGDR";
      // ISSUE: reference to a compiler-generated field
      closure77.\u0024VB\u0024Local_ldFIFOWC02 = "STRUWIRE";
      // ISSUE: reference to a compiler-generated field
      closure77.\u0024VB\u0024Local_ldPackOutWC01 = "NEMA3R";
      // ISSUE: reference to a compiler-generated field
      closure77.\u0024VB\u0024Local_ldPackOutWC02 = "PACKOUT";
      // ISSUE: reference to a compiler-generated field
      closure77.\u0024VB\u0024Local_ldWorkCenter = Workcenter;
      // ISSUE: reference to a compiler-generated field
      closure77.\u0024VB\u0024Local_ldStartTime = StartDate;
      // ISSUE: reference to a compiler-generated field
      closure77.\u0024VB\u0024Local_ldEndTime = FinishDate;
      using (SE0085CTEntities1 se0085CtEntities1 = new SE0085CTEntities1())
      {
        se0085CtEntities1.Database.Connection.ConnectionString = this._CTConnection;
        // ISSUE: reference to a compiler-generated field
        if (Operators.CompareString(closure77.\u0024VB\u0024Local_ldWorkCenter, "FIFO", false) == 0)
        {
          ParameterExpression parameterExpression1;
          // 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: 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
          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.SEPlants, (IEnumerable<M1>) se0085CtEntities1.AssemblyLines, (Expression<Func<M0, M2>>) (pl => pl.SEPlantId), (Expression<Func<M1, M2>>) (al => al.SEPlant.SEPlantId), (Expression<Func<M0, M1, M3>>) ((pl, al) => new{ pl = pl, al = al })), (IEnumerable<M1>) se0085CtEntities1.OrderLines, (Expression<Func<M0, M2>>) (data => data.al.AssemLineId), (Expression<Func<M1, M2>>) (ol => ol.AssemblyLine.AssemLineId), (Expression<Func<M0, M1, M3>>) ((data, ol) => new{ \u0024VB\u0024It1 = data, 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.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{ pl = data.\u0024VB\u0024It1.\u0024VB\u0024It1.pl, al = data.\u0024VB\u0024It1.\u0024VB\u0024It1.al, ol = data.\u0024VB\u0024It1.ol, sc = data.sc, rt = rt })), (Expression<Func<M0, bool>>) Expression.Lambda<Func<VB\u0024AnonymousType_25<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting>, bool>>((Expression) Expression.Coalesce((Expression) Expression.And((Expression) Expression.And((Expression) Expression.Convert((Expression) Expression.And((Expression) Expression.And((Expression) Expression.Equal(\u0024VB\u0024It.pl.SEPlantId, this._Plant.LevelId, true, (MethodInfo) null), (Expression) Expression.Equal((Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression1, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_25<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting>.get_al), __typeref (VB\u0024AnonymousType_25<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (AssemblyLine.get_AssemLineId))), (Expression) Expression.Property((Expression) Expression.Field((Expression) Expression.Constant((object) this, typeof (clsRoutings)), FieldInfo.GetFieldFromHandle(__fieldref (clsRoutings._AssemblyLine))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scLevels.get_LevelId))), true, (MethodInfo) null)), (Expression) Expression.Equal((Expression) Expression.Call((Expression) null, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (Operators.CompareString)), (Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression1, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_25<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting>.get_rt), __typeref (VB\u0024AnonymousType_25<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (SectionsRouting.get_RoutingWorkCenter))), (Expression) Expression.Field((Expression) Expression.Constant((object) closure77, typeof (clsRoutings._Closure\u0024__77)), FieldInfo.GetFieldFromHandle(__fieldref (clsRoutings._Closure\u0024__77.\u0024VB\u0024Local_ldFIFOWC01))), (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_25<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting>.get_rt), __typeref (VB\u0024AnonymousType_25<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (SectionsRouting.get_RoutingActFinishDt))), (Expression) Expression.Convert((Expression) Expression.Field((Expression) Expression.Constant((object) closure77, typeof (clsRoutings._Closure\u0024__77)), FieldInfo.GetFieldFromHandle(__fieldref (clsRoutings._Closure\u0024__77.\u0024VB\u0024Local_ldStartTime))), 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_25<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting>.get_rt), __typeref (VB\u0024AnonymousType_25<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (SectionsRouting.get_RoutingActFinishDt))), (Expression) Expression.Convert((Expression) Expression.Field((Expression) Expression.Constant((object) closure77, typeof (clsRoutings._Closure\u0024__77)), FieldInfo.GetFieldFromHandle(__fieldref (clsRoutings._Closure\u0024__77.\u0024VB\u0024Local_ldEndTime))), 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.sc.OrdSectsId));
          IEnumerator<int> enumerator;
          if (source.Count<int>() > 0)
          {
            try
            {
              enumerator = source.GetEnumerator();
              while (enumerator.MoveNext())
              {
                int current = enumerator.Current;
                // ISSUE: reference to a compiler-generated field
                closure77.\u0024VB\u0024Local_ldFIFOSectionId = current;
                ParameterExpression parameterExpression2;
                // 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: type reference
                // ISSUE: method reference
                // ISSUE: field reference
                if (((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.SEPlants, (IEnumerable<M1>) se0085CtEntities1.AssemblyLines, (Expression<Func<M0, M2>>) (pl => pl.SEPlantId), (Expression<Func<M1, M2>>) (al => al.SEPlant.SEPlantId), (Expression<Func<M0, M1, M3>>) ((pl, al) => new{ pl = pl, al = al })), (IEnumerable<M1>) se0085CtEntities1.OrderLines, (Expression<Func<M0, M2>>) (data => data.al.AssemLineId), (Expression<Func<M1, M2>>) (ol => ol.AssemblyLine.AssemLineId), (Expression<Func<M0, M1, M3>>) ((data, ol) => new{ \u0024VB\u0024It1 = data, 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.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{ pl = data.\u0024VB\u0024It1.\u0024VB\u0024It1.pl, al = data.\u0024VB\u0024It1.\u0024VB\u0024It1.al, ol = data.\u0024VB\u0024It1.ol, sc = data.sc, rt = rt })), (Expression<Func<M0, bool>>) Expression.Lambda<Func<VB\u0024AnonymousType_25<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting>, bool>>((Expression) Expression.And((Expression) Expression.And((Expression) Expression.And((Expression) Expression.Equal(\u0024VB\u0024It.pl.SEPlantId, this._Plant.LevelId, true, (MethodInfo) null), (Expression) Expression.Equal((Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_25<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting>.get_al), __typeref (VB\u0024AnonymousType_25<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (AssemblyLine.get_AssemLineId))), (Expression) Expression.Property((Expression) Expression.Field((Expression) Expression.Constant((object) this, typeof (clsRoutings)), FieldInfo.GetFieldFromHandle(__fieldref (clsRoutings._AssemblyLine))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scLevels.get_LevelId))), true, (MethodInfo) null)), (Expression) Expression.Equal((Expression) Expression.Call((Expression) null, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (Operators.CompareString)), (Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_25<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting>.get_rt), __typeref (VB\u0024AnonymousType_25<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (SectionsRouting.get_RoutingWorkCenter))), (Expression) Expression.Field((Expression) Expression.Constant((object) closure77, typeof (clsRoutings._Closure\u0024__77)), FieldInfo.GetFieldFromHandle(__fieldref (clsRoutings._Closure\u0024__77.\u0024VB\u0024Local_ldFIFOWC02))), (Expression) Expression.Constant((object) false, typeof (bool))), (Expression) Expression.Constant((object) 0, typeof (int)))), (Expression) Expression.Equal((Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_25<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting>.get_sc), __typeref (VB\u0024AnonymousType_25<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (OrdSection.get_OrdSectsId))), (Expression) Expression.Field((Expression) Expression.Constant((object) closure77, typeof (clsRoutings._Closure\u0024__77)), FieldInfo.GetFieldFromHandle(__fieldref (clsRoutings._Closure\u0024__77.\u0024VB\u0024Local_ldFIFOSectionId))), true, (MethodInfo) null)), new ParameterExpression[1]{ parameterExpression2 })), (Expression<Func<M0, M1>>) (data => data.sc.OrdSectsId))).Count<int>() == 0)
                  intList.AddRange((IEnumerable<int>) source.ToArray<int>());
              }
            }
            finally
            {
              if (enumerator != null)
                enumerator.Dispose();
            }
          }
          // ISSUE: reference to a compiler-generated field
          // ISSUE: reference to a compiler-generated field
          closure77.\u0024VB\u0024Local_ldWorkCenter = closure77.\u0024VB\u0024Local_ldFIFOWC02;
        }
        else
        {
          // ISSUE: reference to a compiler-generated field
          if (Operators.CompareString(closure77.\u0024VB\u0024Local_ldWorkCenter, "PACKOUT", false) == 0)
          {
            ParameterExpression parameterExpression1;
            // 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: 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
            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.SEPlants, (IEnumerable<M1>) se0085CtEntities1.AssemblyLines, (Expression<Func<M0, M2>>) (pl => pl.SEPlantId), (Expression<Func<M1, M2>>) (al => al.SEPlant.SEPlantId), (Expression<Func<M0, M1, M3>>) ((pl, al) => new{ pl = pl, al = al })), (IEnumerable<M1>) se0085CtEntities1.OrderLines, (Expression<Func<M0, M2>>) (data => data.al.AssemLineId), (Expression<Func<M1, M2>>) (ol => ol.AssemblyLine.AssemLineId), (Expression<Func<M0, M1, M3>>) ((data, ol) => new{ \u0024VB\u0024It1 = data, 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.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{ pl = data.\u0024VB\u0024It1.\u0024VB\u0024It1.pl, al = data.\u0024VB\u0024It1.\u0024VB\u0024It1.al, ol = data.\u0024VB\u0024It1.ol, sc = data.sc, rt = rt })), (Expression<Func<M0, bool>>) Expression.Lambda<Func<VB\u0024AnonymousType_25<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting>, bool>>((Expression) Expression.Coalesce((Expression) Expression.And((Expression) Expression.And((Expression) Expression.Convert((Expression) Expression.And((Expression) Expression.And((Expression) Expression.Equal(\u0024VB\u0024It.pl.SEPlantId, this._Plant.LevelId, true, (MethodInfo) null), (Expression) Expression.Equal((Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression1, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_25<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting>.get_al), __typeref (VB\u0024AnonymousType_25<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (AssemblyLine.get_AssemLineId))), (Expression) Expression.Property((Expression) Expression.Field((Expression) Expression.Constant((object) this, typeof (clsRoutings)), FieldInfo.GetFieldFromHandle(__fieldref (clsRoutings._AssemblyLine))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scLevels.get_LevelId))), true, (MethodInfo) null)), (Expression) Expression.Equal((Expression) Expression.Call((Expression) null, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (Operators.CompareString)), (Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression1, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_25<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting>.get_rt), __typeref (VB\u0024AnonymousType_25<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (SectionsRouting.get_RoutingWorkCenter))), (Expression) Expression.Field((Expression) Expression.Constant((object) closure77, typeof (clsRoutings._Closure\u0024__77)), FieldInfo.GetFieldFromHandle(__fieldref (clsRoutings._Closure\u0024__77.\u0024VB\u0024Local_ldPackOutWC01))), (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_25<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting>.get_rt), __typeref (VB\u0024AnonymousType_25<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (SectionsRouting.get_RoutingActFinishDt))), (Expression) Expression.Convert((Expression) Expression.Field((Expression) Expression.Constant((object) closure77, typeof (clsRoutings._Closure\u0024__77)), FieldInfo.GetFieldFromHandle(__fieldref (clsRoutings._Closure\u0024__77.\u0024VB\u0024Local_ldStartTime))), 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_25<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting>.get_rt), __typeref (VB\u0024AnonymousType_25<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (SectionsRouting.get_RoutingActFinishDt))), (Expression) Expression.Convert((Expression) Expression.Field((Expression) Expression.Constant((object) closure77, typeof (clsRoutings._Closure\u0024__77)), FieldInfo.GetFieldFromHandle(__fieldref (clsRoutings._Closure\u0024__77.\u0024VB\u0024Local_ldEndTime))), 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.sc.OrdSectsId));
            IEnumerator<int> enumerator;
            if (source.Count<int>() > 0)
            {
              try
              {
                enumerator = source.GetEnumerator();
                while (enumerator.MoveNext())
                {
                  int current = enumerator.Current;
                  // ISSUE: reference to a compiler-generated field
                  closure77.\u0024VB\u0024Local_ldFIFOSectionId = current;
                  ParameterExpression parameterExpression2;
                  // 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: type reference
                  // ISSUE: method reference
                  // ISSUE: field reference
                  if (((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.SEPlants, (IEnumerable<M1>) se0085CtEntities1.AssemblyLines, (Expression<Func<M0, M2>>) (pl => pl.SEPlantId), (Expression<Func<M1, M2>>) (al => al.SEPlant.SEPlantId), (Expression<Func<M0, M1, M3>>) ((pl, al) => new{ pl = pl, al = al })), (IEnumerable<M1>) se0085CtEntities1.OrderLines, (Expression<Func<M0, M2>>) (data => data.al.AssemLineId), (Expression<Func<M1, M2>>) (ol => ol.AssemblyLine.AssemLineId), (Expression<Func<M0, M1, M3>>) ((data, ol) => new{ \u0024VB\u0024It1 = data, 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.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{ pl = data.\u0024VB\u0024It1.\u0024VB\u0024It1.pl, al = data.\u0024VB\u0024It1.\u0024VB\u0024It1.al, ol = data.\u0024VB\u0024It1.ol, sc = data.sc, rt = rt })), (Expression<Func<M0, bool>>) Expression.Lambda<Func<VB\u0024AnonymousType_25<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting>, bool>>((Expression) Expression.And((Expression) Expression.And((Expression) Expression.And((Expression) Expression.Equal(\u0024VB\u0024It.pl.SEPlantId, this._Plant.LevelId, true, (MethodInfo) null), (Expression) Expression.Equal((Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_25<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting>.get_al), __typeref (VB\u0024AnonymousType_25<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (AssemblyLine.get_AssemLineId))), (Expression) Expression.Property((Expression) Expression.Field((Expression) Expression.Constant((object) this, typeof (clsRoutings)), FieldInfo.GetFieldFromHandle(__fieldref (clsRoutings._AssemblyLine))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scLevels.get_LevelId))), true, (MethodInfo) null)), (Expression) Expression.Equal((Expression) Expression.Call((Expression) null, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (Operators.CompareString)), (Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_25<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting>.get_rt), __typeref (VB\u0024AnonymousType_25<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (SectionsRouting.get_RoutingWorkCenter))), (Expression) Expression.Field((Expression) Expression.Constant((object) closure77, typeof (clsRoutings._Closure\u0024__77)), FieldInfo.GetFieldFromHandle(__fieldref (clsRoutings._Closure\u0024__77.\u0024VB\u0024Local_ldPackOutWC02))), (Expression) Expression.Constant((object) false, typeof (bool))), (Expression) Expression.Constant((object) 0, typeof (int)))), (Expression) Expression.Equal((Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_25<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting>.get_sc), __typeref (VB\u0024AnonymousType_25<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (OrdSection.get_OrdSectsId))), (Expression) Expression.Field((Expression) Expression.Constant((object) closure77, typeof (clsRoutings._Closure\u0024__77)), FieldInfo.GetFieldFromHandle(__fieldref (clsRoutings._Closure\u0024__77.\u0024VB\u0024Local_ldFIFOSectionId))), true, (MethodInfo) null)), new ParameterExpression[1]{ parameterExpression2 })), (Expression<Func<M0, M1>>) (data => data.sc.OrdSectsId))).Count<int>() == 0)
                    intList.AddRange((IEnumerable<int>) source.ToArray<int>());
                }
              }
              finally
              {
                if (enumerator != null)
                  enumerator.Dispose();
              }
            }
            // ISSUE: reference to a compiler-generated field
            // ISSUE: reference to a compiler-generated field
            closure77.\u0024VB\u0024Local_ldWorkCenter = closure77.\u0024VB\u0024Local_ldPackOutWC02;
          }
        }
        ParameterExpression parameterExpression;
        // 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: 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
        IQueryable<int> source1 = (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.SEPlants, (IEnumerable<M1>) se0085CtEntities1.AssemblyLines, (Expression<Func<M0, M2>>) (pl => pl.SEPlantId), (Expression<Func<M1, M2>>) (al => al.SEPlant.SEPlantId), (Expression<Func<M0, M1, M3>>) ((pl, al) => new{ pl = pl, al = al })), (IEnumerable<M1>) se0085CtEntities1.OrderLines, (Expression<Func<M0, M2>>) (data => data.al.AssemLineId), (Expression<Func<M1, M2>>) (ol => ol.AssemblyLine.AssemLineId), (Expression<Func<M0, M1, M3>>) ((data, ol) => new{ \u0024VB\u0024It1 = data, 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.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{ pl = data.\u0024VB\u0024It1.\u0024VB\u0024It1.pl, al = data.\u0024VB\u0024It1.\u0024VB\u0024It1.al, ol = data.\u0024VB\u0024It1.ol, sc = data.sc, rt = rt })), (Expression<Func<M0, bool>>) Expression.Lambda<Func<VB\u0024AnonymousType_25<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting>, bool>>((Expression) Expression.Coalesce((Expression) Expression.And((Expression) Expression.And((Expression) Expression.Convert((Expression) Expression.And((Expression) Expression.And((Expression) Expression.Equal(\u0024VB\u0024It.pl.SEPlantId, this._Plant.LevelId, true, (MethodInfo) null), (Expression) Expression.Equal((Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_25<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting>.get_al), __typeref (VB\u0024AnonymousType_25<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (AssemblyLine.get_AssemLineId))), (Expression) Expression.Property((Expression) Expression.Field((Expression) Expression.Constant((object) this, typeof (clsRoutings)), FieldInfo.GetFieldFromHandle(__fieldref (clsRoutings._AssemblyLine))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scLevels.get_LevelId))), true, (MethodInfo) null)), (Expression) Expression.Equal((Expression) Expression.Call((Expression) null, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (Operators.CompareString)), (Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_25<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting>.get_rt), __typeref (VB\u0024AnonymousType_25<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (SectionsRouting.get_RoutingWorkCenter))), (Expression) Expression.Field((Expression) Expression.Constant((object) closure77, typeof (clsRoutings._Closure\u0024__77)), FieldInfo.GetFieldFromHandle(__fieldref (clsRoutings._Closure\u0024__77.\u0024VB\u0024Local_ldWorkCenter))), (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) parameterExpression, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_25<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting>.get_rt), __typeref (VB\u0024AnonymousType_25<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (SectionsRouting.get_RoutingActFinishDt))), (Expression) Expression.Convert((Expression) Expression.Field((Expression) Expression.Constant((object) closure77, typeof (clsRoutings._Closure\u0024__77)), FieldInfo.GetFieldFromHandle(__fieldref (clsRoutings._Closure\u0024__77.\u0024VB\u0024Local_ldStartTime))), typeof (DateTime?)), true, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (DateTime.op_GreaterThanOrEqual)))), (Expression) Expression.LessThanOrEqual((Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_25<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting>.get_rt), __typeref (VB\u0024AnonymousType_25<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (SectionsRouting.get_RoutingActFinishDt))), (Expression) Expression.Convert((Expression) Expression.Field((Expression) Expression.Constant((object) closure77, typeof (clsRoutings._Closure\u0024__77)), FieldInfo.GetFieldFromHandle(__fieldref (clsRoutings._Closure\u0024__77.\u0024VB\u0024Local_ldEndTime))), typeof (DateTime?)), true, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (DateTime.op_LessThanOrEqual)))), (Expression) Expression.Constant((object) false, typeof (bool))), new ParameterExpression[1]{ parameterExpression })), (Expression<Func<M0, M1>>) (data => data.sc.OrdSectsId));
        intList.AddRange((IEnumerable<int>) source1.ToArray<int>());
        se0085CtEntities1.Database.Connection.Close();
      }
      return intList;
    }

    public List<scOrdSectIdplusNum> rtnSectionsByOrderLineId(int OrderLineId)
    {
      // ISSUE: object of a compiler-generated type is created
      // ISSUE: variable of a compiler-generated type
      clsRoutings._Closure\u0024__78 closure78 = new clsRoutings._Closure\u0024__78();
      // ISSUE: reference to a compiler-generated field
      closure78.\u0024VB\u0024Local_OrderLineId = OrderLineId;
      List<scOrdSectIdplusNum> ordSectIdplusNumList = new List<scOrdSectIdplusNum>();
      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: 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<scOrdSectIdplusNum> source = (IQueryable<scOrdSectIdplusNum>) Queryable.Select((IQueryable<M0>) Queryable.OrderBy(Queryable.Where((IQueryable<M0>) Queryable.Join((IQueryable<M0>) Queryable.Join((IQueryable<M0>) Queryable.Join((IQueryable<M0>) se0085CtEntities1.SEPlants, (IEnumerable<M1>) se0085CtEntities1.AssemblyLines, (Expression<Func<M0, M2>>) (pl => pl.SEPlantId), (Expression<Func<M1, M2>>) (al => al.SEPlant.SEPlantId), (Expression<Func<M0, M1, M3>>) ((pl, al) => new{ pl = pl, al = al })), (IEnumerable<M1>) se0085CtEntities1.OrderLines, (Expression<Func<M0, M2>>) (data => data.al.AssemLineId), (Expression<Func<M1, M2>>) (ol => ol.AssemblyLine.AssemLineId), (Expression<Func<M0, M1, M3>>) ((data, ol) => new{ \u0024VB\u0024It1 = data, 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{ pl = data.\u0024VB\u0024It1.pl, al = data.\u0024VB\u0024It1.al, ol = data.ol, sc = sc })), (Expression<Func<M0, bool>>) Expression.Lambda<Func<VB\u0024AnonymousType_26<SEPlant, AssemblyLine, OrderLine, OrdSection>, bool>>((Expression) Expression.And((Expression) Expression.And((Expression) Expression.Equal(\u0024VB\u0024It.pl.SEPlantId, this._Plant.LevelId, true, (MethodInfo) null), (Expression) Expression.Equal((Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression1, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_26<SEPlant, AssemblyLine, OrderLine, OrdSection>.get_al), __typeref (VB\u0024AnonymousType_26<SEPlant, AssemblyLine, OrderLine, OrdSection>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (AssemblyLine.get_AssemLineId))), (Expression) Expression.Property((Expression) Expression.Field((Expression) Expression.Constant((object) this, typeof (clsRoutings)), FieldInfo.GetFieldFromHandle(__fieldref (clsRoutings._AssemblyLine))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scLevels.get_LevelId))), true, (MethodInfo) null)), (Expression) Expression.Equal((Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression1, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_26<SEPlant, AssemblyLine, OrderLine, OrdSection>.get_ol), __typeref (VB\u0024AnonymousType_26<SEPlant, AssemblyLine, OrderLine, OrdSection>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (OrderLine.get_OrderLineId))), (Expression) Expression.Field((Expression) Expression.Constant((object) closure78, typeof (clsRoutings._Closure\u0024__78)), FieldInfo.GetFieldFromHandle(__fieldref (clsRoutings._Closure\u0024__78.\u0024VB\u0024Local_OrderLineId))), true, (MethodInfo) null)), new ParameterExpression[1]{ parameterExpression1 })), (Expression<Func<M0, M1>>) (data => data.sc.OrdSectsNum)), (Expression<Func<M0, M1>>) Expression.Lambda<Func<VB\u0024AnonymousType_26<SEPlant, AssemblyLine, OrderLine, OrdSection>, scOrdSectIdplusNum>>((Expression) Expression.MemberInit(Expression.New((ConstructorInfo) MethodBase.GetMethodFromHandle(__methodref (scOrdSectIdplusNum.\u002Ector)), (Expression[]) null), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scOrdSectIdplusNum.set_OrdSectsId)), (Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_26<SEPlant, AssemblyLine, OrderLine, OrdSection>.get_sc), __typeref (VB\u0024AnonymousType_26<SEPlant, AssemblyLine, OrderLine, OrdSection>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (OrdSection.get_OrdSectsId)))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scOrdSectIdplusNum.set_OrdSectsNum)), (Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_26<SEPlant, AssemblyLine, OrderLine, OrdSection>.get_sc), __typeref (VB\u0024AnonymousType_26<SEPlant, AssemblyLine, OrderLine, OrdSection>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (OrdSection.get_OrdSectsNum)))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scOrdSectIdplusNum.set_OrdSectsProdNum)), (Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_26<SEPlant, AssemblyLine, OrderLine, OrdSection>.get_sc), __typeref (VB\u0024AnonymousType_26<SEPlant, AssemblyLine, OrderLine, OrdSection>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (OrdSection.get_OrdSectsProdNum))))), new ParameterExpression[1]{ parameterExpression2 }));
        if (source.Count<scOrdSectIdplusNum>() > 0)
          ordSectIdplusNumList = source.ToList<scOrdSectIdplusNum>();
        se0085CtEntities1.Database.Connection.Close();
      }
      return ordSectIdplusNumList;
    }

    public clsRoutings.rltBklWIP ProdStatus(int SectId, string WorkCenter)
    {
      // ISSUE: object of a compiler-generated type is created
      // ISSUE: variable of a compiler-generated type
      clsRoutings._Closure\u0024__79 closure79 = new clsRoutings._Closure\u0024__79();
      clsRoutings.rltBklWIP rltBklWip1 = new clsRoutings.rltBklWIP(true);
      DateTime date = Conversions.ToDate("01-01-1901");
      Conversions.ToDate("01-01-2013");
      Conversions.ToDate("01-01-2039");
      int num1 = 1;
      Hashtable hashtable1 = new Hashtable();
      string levelAbbrv = this._AssemblyLine.LevelAbbrv;
      int num2;
      if (Operators.CompareString(levelAbbrv, "SWBD", false) == 0)
      {
        hashtable1.Add((object) "INSULBUS", (object) num1);
        int num3 = checked (num1 + 1);
        hashtable1.Add((object) "SPPALLET", (object) num3);
        int num4 = checked (num3 + 1);
        hashtable1.Add((object) "FRAMEKIT", (object) num4);
        int num5 = checked (num4 + 1);
        hashtable1.Add((object) "FRAMES", (object) num5);
        int num6 = checked (num5 + 1);
        hashtable1.Add((object) "TBMOUNT", (object) num6);
        int num7 = checked (num6 + 1);
        hashtable1.Add((object) "BNEUTRAL", (object) num7);
        int num8 = checked (num7 + 1);
        hashtable1.Add((object) "DEVMOUNT", (object) num8);
        int num9 = checked (num8 + 1);
        hashtable1.Add((object) "CMPMOUNT", (object) num9);
        int num10 = checked (num9 + 1);
        hashtable1.Add((object) "COVERS", (object) num10);
        int num11 = checked (num10 + 1);
        hashtable1.Add((object) "STANDUP", (object) num11);
        int num12 = checked (num11 + 1);
        hashtable1.Add((object) "ILTBCONN", (object) num12);
        int num13 = checked (num12 + 1);
        hashtable1.Add((object) "STDCONN", (object) num13);
        int num14 = checked (num13 + 1);
        hashtable1.Add((object) "WIRING", (object) num14);
        int num15 = checked (num14 + 1);
        hashtable1.Add((object) "INSPTEST", (object) num15);
        int num16 = checked (num15 + 1);
        hashtable1.Add((object) "FINALPRP", (object) num16);
        int num17 = checked (num16 + 1);
        hashtable1.Add((object) "SHIPWITH", (object) num17);
        int num18 = checked (num17 + 1);
        hashtable1.Add((object) "CLOSEUP", (object) num18);
        int num19 = checked (num18 + 1);
        hashtable1.Add((object) "FPY", (object) num19);
        int num20 = checked (num19 + 1);
        hashtable1.Add((object) "SHIPPING", (object) num20);
        num2 = checked (num20 + 0);
      }
      else
      {
        if (Operators.CompareString(levelAbbrv, "LVDO", false) != 0)
          return rltBklWip1;
        hashtable1.Add((object) "SUPVREL", (object) num1);
        int num3 = checked (num1 + 1);
        hashtable1.Add((object) "PNLWIRE", (object) num3);
        int num4 = checked (num3 + 1);
        hashtable1.Add((object) "NTSUBASY", (object) num4);
        int num5 = checked (num4 + 1);
        hashtable1.Add((object) "STRUCT1", (object) num5);
        int num6 = checked (num5 + 1);
        hashtable1.Add((object) "RISER", (object) num6);
        int num7 = checked (num6 + 1);
        hashtable1.Add((object) "STRUCT2", (object) num7);
        int num8 = checked (num7 + 1);
        hashtable1.Add((object) "HORIZON", (object) num8);
        int num9 = checked (num8 + 1);
        hashtable1.Add((object) "VERTICAL", (object) num9);
        int num10 = checked (num9 + 1);
        hashtable1.Add((object) "ROOFSTAN", (object) num10);
        int num11 = checked (num10 + 1);
        hashtable1.Add((object) "BOLTDOWN", (object) num11);
        int num12 = checked (num11 + 1);
        hashtable1.Add((object) "CBLUGDR", (object) num12);
        int num13 = checked (num12 + 1);
        hashtable1.Add((object) "STRUWIRE", (object) num13);
        int num14 = checked (num13 + 1);
        hashtable1.Add((object) "METESTSW", (object) num14);
        int num15 = checked (num14 + 1);
        hashtable1.Add((object) "ELTESTLB", (object) num15);
        int num16 = checked (num15 + 1);
        hashtable1.Add((object) "SHIP", (object) num16);
        num2 = checked (num16 + 1);
      }
      List<SE0085.StCl.scSectionsRoutingInfo> sectionsRoutingInfoList1 = new List<SE0085.StCl.scSectionsRoutingInfo>();
      List<SE0085.StCl.scSectionsRoutingInfo> sectionsRoutingInfoList2 = this.rtnRoutingWorkCenters(SectId);
      bool flag = false;
      // ISSUE: reference to a compiler-generated field
      closure79.\u0024VB\u0024Local_ldOrdStallDate = DateTime.Now.AddDays(-15.0);
      List<SE0085.StCl.scSectionsRoutingInfo> sectionsRoutingInfoList3 = sectionsRoutingInfoList2;
      // ISSUE: virtual method pointer
      IntPtr num21 = __vmethodptr(closure79, _Lambda\u0024__1);
      Func<SE0085.StCl.scSectionsRoutingInfo, bool> func = new Func<SE0085.StCl.scSectionsRoutingInfo, bool>((object) closure79, num21);
      // ISSUE: method pointer
      IEnumerable<int> source = (IEnumerable<int>) Enumerable.Select<SE0085.StCl.scSectionsRoutingInfo, int>(Enumerable.Where<SE0085.StCl.scSectionsRoutingInfo>((IEnumerable<M0>) sectionsRoutingInfoList3, (Func<M0, bool>) func), (Func<M0, M1>) new Func<SE0085.StCl.scSectionsRoutingInfo, int>((object) null, __methodptr(_Lambda\u0024__2)));
      if (source != null)
      {
        if (source.Count<int>() <= 0)
        {
          clsRoutings.rltBklWIP rltBklWip2;
          return rltBklWip2;
        }
        flag = true;
      }
      Hashtable hashtable2 = new Hashtable();
      if (sectionsRoutingInfoList2 != null)
      {
        List<SE0085.StCl.scSectionsRoutingInfo>.Enumerator enumerator;
        try
        {
          enumerator = sectionsRoutingInfoList2.GetEnumerator();
          while (enumerator.MoveNext())
          {
            SE0085.StCl.scSectionsRoutingInfo current = enumerator.Current;
            if (hashtable1.ContainsKey((object) current.RoutingWorkCenter))
            {
              int integer = Conversions.ToInteger(hashtable1[(object) current.RoutingWorkCenter]);
              if (!hashtable2.ContainsKey((object) integer))
                hashtable2.Add((object) integer, (object) current);
            }
          }
        }
        finally
        {
          enumerator.Dispose();
        }
        int num3 = num2;
        while (num3 >= 1)
        {
          if (hashtable2.ContainsKey((object) num3))
          {
            SE0085.StCl.scSectionsRoutingInfo sectionsRoutingInfo1 = new SE0085.StCl.scSectionsRoutingInfo();
            SE0085.StCl.scSectionsRoutingInfo sectionsRoutingInfo2 = (SE0085.StCl.scSectionsRoutingInfo) hashtable2[(object) num3];
            if (Operators.CompareString(sectionsRoutingInfo2.RoutingWorkCenter.Trim(), WorkCenter.Trim(), false) == 0)
              rltBklWip1.IsWcRequired = true;
            if (DateTime.Compare(sectionsRoutingInfo2.RoutingActStartDt, date) > 0 & DateTime.Compare(sectionsRoutingInfo2.RoutingActFinishDt, date) <= 0 & flag)
            {
              if (Operators.CompareString(sectionsRoutingInfo2.RoutingWorkCenter.Trim(), WorkCenter.Trim(), false) == 0)
              {
                rltBklWip1.IsWcWIPip = true;
                rltBklWip1.IsWcComplete = false;
              }
              rltBklWip1.WcCurrent = sectionsRoutingInfo2.RoutingWorkCenter;
              rltBklWip1.CalProgress(sectionsRoutingInfo2.RoutingSchFinishDt);
            }
            else if (DateTime.Compare(sectionsRoutingInfo2.RoutingActStartDt, date) <= 0 & DateTime.Compare(sectionsRoutingInfo2.RoutingActFinishDt, date) <= 0 & flag)
            {
              SE0085.StCl.scSectionsRoutingInfo sectionsRoutingInfo3 = new SE0085.StCl.scSectionsRoutingInfo();
              int num4 = checked (num3 - 1);
              while (num4 > 0)
              {
                if (hashtable2.ContainsKey((object) num4))
                {
                  if (DateTime.Compare(((SE0085.StCl.scSectionsRoutingInfo) hashtable2[(object) num4]).RoutingActFinishDt, date) > 0 & flag)
                  {
                    if (Operators.CompareString(sectionsRoutingInfo2.RoutingWorkCenter.Trim(), WorkCenter.Trim(), false) == 0)
                    {
                      rltBklWip1.IsWcWIPq = true;
                      rltBklWip1.IsWcComplete = false;
                    }
                    rltBklWip1.WcCurrent = sectionsRoutingInfo2.RoutingWorkCenter;
                    rltBklWip1.CalProgress(sectionsRoutingInfo2.RoutingSchStartDt);
                    break;
                  }
                  break;
                }
                checked { num4 += -1; }
              }
            }
            if (Operators.CompareString(sectionsRoutingInfo2.RoutingWorkCenter.Trim(), WorkCenter.Trim(), false) == 0 && DateTime.Compare(sectionsRoutingInfo2.RoutingActFinishDt, date) <= 0 & flag)
              rltBklWip1.IsWcBacklog = true;
            if (DateTime.Compare(sectionsRoutingInfo2.RoutingActStartDt, date) > 0 & DateTime.Compare(sectionsRoutingInfo2.RoutingActFinishDt, date) > 0 & Operators.CompareString(WorkCenter.Trim(), sectionsRoutingInfo2.RoutingWorkCenter, false) == 0)
              rltBklWip1.IsWcComplete = true;
          }
          checked { num3 += -1; }
        }
      }
      return rltBklWip1;
    }

    public clsRoutings.rltBklWIP rtnODVProdStatus(string AssemblyLine, int SectId, string WorkCenterStart, string WorkCenterEnd)
    {
      clsRoutings.rltBklWIP rltBklWip = new clsRoutings.rltBklWIP(true);
      DateTime date = Conversions.ToDate("01-01-1901");
      Conversions.ToDate("01-01-2013");
      Conversions.ToDate("01-01-2039");
      int num1 = 1;
      Hashtable hashtable1 = new Hashtable();
      string Left = AssemblyLine;
      if (Operators.CompareString(Left, "SWBD", false) == 0)
      {
        hashtable1.Add((object) "SPWIRKIT", (object) num1);
        int num2 = checked (num1 + 1);
        hashtable1.Add((object) "SPREWIRE", (object) num2);
        int num3 = checked (num2 + 1);
        hashtable1.Add((object) "INSULBUS", (object) num3);
        int num4 = checked (num3 + 1);
        hashtable1.Add((object) "SPPALLET", (object) num4);
        int num5 = checked (num4 + 1);
        hashtable1.Add((object) "FRAMEKIT", (object) num5);
        int num6 = checked (num5 + 1);
        hashtable1.Add((object) "FRAMES", (object) num6);
        int num7 = checked (num6 + 1);
        hashtable1.Add((object) "TBMOUNT", (object) num7);
        int num8 = checked (num7 + 1);
        hashtable1.Add((object) "BNEUTRAL", (object) num8);
        int num9 = checked (num8 + 1);
        hashtable1.Add((object) "DEVMOUNT", (object) num9);
        int num10 = checked (num9 + 1);
        hashtable1.Add((object) "CMPMOUNT", (object) num10);
        int num11 = checked (num10 + 1);
        hashtable1.Add((object) "COVERS", (object) num11);
        int num12 = checked (num11 + 1);
        hashtable1.Add((object) "STANDUP", (object) num12);
        int num13 = checked (num12 + 1);
        hashtable1.Add((object) "ILTBCONN", (object) num13);
        int num14 = checked (num13 + 1);
        hashtable1.Add((object) "STDCONN", (object) num14);
        int num15 = checked (num14 + 1);
        hashtable1.Add((object) "WIRING", (object) num15);
        int num16 = checked (num15 + 1);
        hashtable1.Add((object) "INSPTEST", (object) num16);
        int num17 = checked (num16 + 1);
        hashtable1.Add((object) "FINALPRP", (object) num17);
        int num18 = checked (num17 + 1);
        hashtable1.Add((object) "SHIPWITH", (object) num18);
        int num19 = checked (num18 + 1);
        hashtable1.Add((object) "CLOSEUP", (object) num19);
        int num20 = checked (num19 + 1);
        hashtable1.Add((object) "FPY", (object) num20);
        int num21 = checked (num20 + 1);
        hashtable1.Add((object) "SHIPPING", (object) num21);
        num1 = checked (num21 + 0);
      }
      else if (Operators.CompareString(Left, "LVDO", false) == 0)
      {
        hashtable1.Add((object) "PNLWKIT", (object) num1);
        int num2 = checked (num1 + 1);
        hashtable1.Add((object) "PNLWIRE", (object) num2);
        int num3 = checked (num2 + 1);
        hashtable1.Add((object) "STRUCT1", (object) num3);
        int num4 = checked (num3 + 1);
        hashtable1.Add((object) "RISER", (object) num4);
        int num5 = checked (num4 + 1);
        hashtable1.Add((object) "STRUCT2", (object) num5);
        int num6 = checked (num5 + 1);
        hashtable1.Add((object) "HORIZON", (object) num6);
        int num7 = checked (num6 + 1);
        hashtable1.Add((object) "VERTICAL", (object) num7);
        int num8 = checked (num7 + 1);
        hashtable1.Add((object) "ROOFSTAN", (object) num8);
        int num9 = checked (num8 + 1);
        hashtable1.Add((object) "BOLTDOWN", (object) num9);
        int num10 = checked (num9 + 1);
        hashtable1.Add((object) "PANINSTL", (object) num10);
        int num11 = checked (num10 + 1);
        hashtable1.Add((object) "CBLUGDR", (object) num11);
        int num12 = checked (num11 + 1);
        hashtable1.Add((object) "STRUWIRE", (object) num12);
        int num13 = checked (num12 + 1);
        hashtable1.Add((object) "METESTSW", (object) num13);
        int num14 = checked (num13 + 1);
        hashtable1.Add((object) "ELTESTLB", (object) num14);
        int num15 = checked (num14 + 1);
        hashtable1.Add((object) "PACKOUT", (object) num15);
        int num16 = checked (num15 + 1);
        hashtable1.Add((object) "NEMA3R", (object) num16);
        int num17 = checked (num16 + 1);
        hashtable1.Add((object) "SHIPWKIT", (object) num17);
        int num18 = checked (num17 + 1);
        hashtable1.Add((object) "SHIP", (object) num18);
        num1 = checked (num18 + 0);
      }
      List<SE0085.StCl.scSectionsRoutingInfo> sectionsRoutingInfoList1 = new List<SE0085.StCl.scSectionsRoutingInfo>();
      List<SE0085.StCl.scSectionsRoutingInfo> sectionsRoutingInfoList2 = this.rtnRoutingWorkCenters(SectId);
      Hashtable hashtable2 = new Hashtable();
      if (sectionsRoutingInfoList2 != null)
      {
        List<SE0085.StCl.scSectionsRoutingInfo>.Enumerator enumerator;
        try
        {
          enumerator = sectionsRoutingInfoList2.GetEnumerator();
          while (enumerator.MoveNext())
          {
            SE0085.StCl.scSectionsRoutingInfo current = enumerator.Current;
            if (hashtable1.ContainsKey((object) current.RoutingWorkCenter))
            {
              int integer = Conversions.ToInteger(hashtable1[(object) current.RoutingWorkCenter]);
              if (!hashtable2.ContainsKey((object) integer))
                hashtable2.Add((object) integer, (object) current);
            }
            if (Operators.CompareString(current.RoutingWorkCenter, WorkCenterStart.Trim(), false) == 0 | Operators.CompareString(current.RoutingWorkCenter, WorkCenterEnd.Trim(), false) == 0)
              rltBklWip.IsWcRequired = true;
          }
        }
        finally
        {
          enumerator.Dispose();
        }
        if (!rltBklWip.IsWcRequired)
          return rltBklWip;
        SE0085.StCl.scSectionsRoutingInfo sectionsRoutingInfo1 = new SE0085.StCl.scSectionsRoutingInfo();
        SE0085.StCl.scSectionsRoutingInfo sectionsRoutingInfo2 = (SE0085.StCl.scSectionsRoutingInfo) hashtable2[RuntimeHelpers.GetObjectValue(hashtable1[(object) WorkCenterStart.Trim()])];
        SE0085.StCl.scSectionsRoutingInfo sectionsRoutingInfo3 = new SE0085.StCl.scSectionsRoutingInfo();
        SE0085.StCl.scSectionsRoutingInfo sectionsRoutingInfo4 = (SE0085.StCl.scSectionsRoutingInfo) hashtable2[RuntimeHelpers.GetObjectValue(hashtable1[(object) WorkCenterEnd.Trim()])];
        if ((DateTime.Compare(sectionsRoutingInfo2.RoutingActFinishDt, date) <= 0 | DateTime.Compare(sectionsRoutingInfo4.RoutingActFinishDt, date) <= 0) & rltBklWip.IsWcRequired)
          rltBklWip.IsWcBacklog = true;
        if (DateTime.Compare(sectionsRoutingInfo2.RoutingActStartDt, date) > 0 & DateTime.Compare(sectionsRoutingInfo2.RoutingActFinishDt, date) > 0 & DateTime.Compare(sectionsRoutingInfo4.RoutingActStartDt, date) > 0 & DateTime.Compare(sectionsRoutingInfo4.RoutingActFinishDt, date) > 0)
        {
          rltBklWip.IsWcComplete = true;
          rltBklWip.IsWcWIPq = false;
          rltBklWip.IsWcWIPip = false;
          rltBklWip.CalProgressComplete(sectionsRoutingInfo4.RoutingSchFinishDt, sectionsRoutingInfo4.RoutingActFinishDt);
        }
        if (DateTime.Compare(sectionsRoutingInfo2.RoutingActStartDt, date) > 0 & (DateTime.Compare(sectionsRoutingInfo2.RoutingActFinishDt, date) <= 0 | DateTime.Compare(sectionsRoutingInfo4.RoutingActFinishDt, date) <= 0))
        {
          rltBklWip.IsWcWIPip = true;
          rltBklWip.IsWcWIPq = false;
          rltBklWip.CalProgress(sectionsRoutingInfo4.RoutingSchFinishDt);
        }
        int num2 = num1;
        while (num2 >= 1)
        {
          if (hashtable2.ContainsKey((object) num2))
          {
            SE0085.StCl.scSectionsRoutingInfo sectionsRoutingInfo5 = new SE0085.StCl.scSectionsRoutingInfo();
            SE0085.StCl.scSectionsRoutingInfo sectionsRoutingInfo6 = (SE0085.StCl.scSectionsRoutingInfo) hashtable2[(object) num2];
            if (DateTime.Compare(sectionsRoutingInfo6.RoutingActStartDt, date) > 0 & DateTime.Compare(sectionsRoutingInfo6.RoutingActFinishDt, date) <= 0)
              rltBklWip.WcCurrent = sectionsRoutingInfo6.RoutingWorkCenter;
            if (DateTime.Compare(sectionsRoutingInfo6.RoutingActStartDt, date) <= 0 & DateTime.Compare(sectionsRoutingInfo6.RoutingActFinishDt, date) <= 0)
            {
              SE0085.StCl.scSectionsRoutingInfo sectionsRoutingInfo7 = new SE0085.StCl.scSectionsRoutingInfo();
              int num3 = checked (num2 - 1);
              while (num3 > 0)
              {
                if (hashtable2.ContainsKey((object) num3))
                {
                  if (DateTime.Compare(((SE0085.StCl.scSectionsRoutingInfo) hashtable2[(object) num3]).RoutingActFinishDt, date) > 0 && Operators.CompareString(sectionsRoutingInfo6.RoutingWorkCenter.Trim(), WorkCenterStart.Trim(), false) == 0 & !rltBklWip.IsWcWIPip)
                  {
                    rltBklWip.IsWcWIPq = true;
                    rltBklWip.WcCurrent = sectionsRoutingInfo6.RoutingWorkCenter;
                    rltBklWip.CalProgress(sectionsRoutingInfo6.RoutingSchStartDt);
                    break;
                  }
                  break;
                }
                checked { num3 += -1; }
              }
            }
          }
          checked { num2 += -1; }
        }
      }
      return rltBklWip;
    }

    public clsRoutings.rltBklWIP rtnDashProdStatus(string AssemblyLine, int SectId, string WorkCenterStart, string WorkCenterEnd)
    {
      clsRoutings.rltBklWIP rltBklWip = new clsRoutings.rltBklWIP(true);
      DateTime date = Conversions.ToDate("01-01-1901");
      Conversions.ToDate("01-01-2013");
      Conversions.ToDate("01-01-2039");
      int num1 = 1;
      Hashtable hashtable1 = new Hashtable();
      string Left = AssemblyLine;
      if (Operators.CompareString(Left, "SWBD", false) == 0)
      {
        hashtable1.Add((object) "SPWIRKIT", (object) num1);
        int num2 = checked (num1 + 1);
        hashtable1.Add((object) "SPREWIRE", (object) num2);
        int num3 = checked (num2 + 1);
        hashtable1.Add((object) "INSULBUS", (object) num3);
        int num4 = checked (num3 + 1);
        hashtable1.Add((object) "SPPALLET", (object) num4);
        int num5 = checked (num4 + 1);
        hashtable1.Add((object) "FRAMEKIT", (object) num5);
        int num6 = checked (num5 + 1);
        hashtable1.Add((object) "FRAMES", (object) num6);
        int num7 = checked (num6 + 1);
        hashtable1.Add((object) "TBMOUNT", (object) num7);
        int num8 = checked (num7 + 1);
        hashtable1.Add((object) "BNEUTRAL", (object) num8);
        int num9 = checked (num8 + 1);
        hashtable1.Add((object) "DEVMOUNT", (object) num9);
        int num10 = checked (num9 + 1);
        hashtable1.Add((object) "CMPMOUNT", (object) num10);
        int num11 = checked (num10 + 1);
        hashtable1.Add((object) "COVERS", (object) num11);
        int num12 = checked (num11 + 1);
        hashtable1.Add((object) "STANDUP", (object) num12);
        int num13 = checked (num12 + 1);
        hashtable1.Add((object) "ILTBCONN", (object) num13);
        int num14 = checked (num13 + 1);
        hashtable1.Add((object) "STDCONN", (object) num14);
        int num15 = checked (num14 + 1);
        hashtable1.Add((object) "WIRING", (object) num15);
        int num16 = checked (num15 + 1);
        hashtable1.Add((object) "INSPTEST", (object) num16);
        int num17 = checked (num16 + 1);
        hashtable1.Add((object) "FINALPRP", (object) num17);
        int num18 = checked (num17 + 1);
        hashtable1.Add((object) "SHIPWITH", (object) num18);
        int num19 = checked (num18 + 1);
        hashtable1.Add((object) "CLOSEUP", (object) num19);
        int num20 = checked (num19 + 1);
        hashtable1.Add((object) "FPY", (object) num20);
        int num21 = checked (num20 + 1);
        hashtable1.Add((object) "SHIPPING", (object) num21);
        num1 = checked (num21 + 0);
      }
      else if (Operators.CompareString(Left, "LVDO", false) == 0)
      {
        hashtable1.Add((object) "PNLWKIT", (object) num1);
        int num2 = checked (num1 + 1);
        hashtable1.Add((object) "PNLWIRE", (object) num2);
        int num3 = checked (num2 + 1);
        hashtable1.Add((object) "STRUCT1", (object) num3);
        int num4 = checked (num3 + 1);
        hashtable1.Add((object) "RISER", (object) num4);
        int num5 = checked (num4 + 1);
        hashtable1.Add((object) "STRUCT2", (object) num5);
        int num6 = checked (num5 + 1);
        hashtable1.Add((object) "HORIZON", (object) num6);
        int num7 = checked (num6 + 1);
        hashtable1.Add((object) "VERTICAL", (object) num7);
        int num8 = checked (num7 + 1);
        hashtable1.Add((object) "ROOFSTAN", (object) num8);
        int num9 = checked (num8 + 1);
        hashtable1.Add((object) "BOLTDOWN", (object) num9);
        int num10 = checked (num9 + 1);
        hashtable1.Add((object) "PANINSTL", (object) num10);
        int num11 = checked (num10 + 1);
        hashtable1.Add((object) "CBLUGDR", (object) num11);
        int num12 = checked (num11 + 1);
        hashtable1.Add((object) "STRUWIRE", (object) num12);
        int num13 = checked (num12 + 1);
        hashtable1.Add((object) "METESTSW", (object) num13);
        int num14 = checked (num13 + 1);
        hashtable1.Add((object) "ELTESTLB", (object) num14);
        int num15 = checked (num14 + 1);
        hashtable1.Add((object) "PACKOUT", (object) num15);
        int num16 = checked (num15 + 1);
        hashtable1.Add((object) "NEMA3R", (object) num16);
        int num17 = checked (num16 + 1);
        hashtable1.Add((object) "SHIP", (object) num17);
        num1 = checked (num17 + 0);
      }
      List<SE0085.StCl.scSectionsRoutingInfo> sectionsRoutingInfoList1 = new List<SE0085.StCl.scSectionsRoutingInfo>();
      List<SE0085.StCl.scSectionsRoutingInfo> sectionsRoutingInfoList2 = this.rtnRoutingWorkCenters(SectId);
      Hashtable hashtable2 = new Hashtable();
      if (sectionsRoutingInfoList2 != null)
      {
        List<SE0085.StCl.scSectionsRoutingInfo>.Enumerator enumerator;
        try
        {
          enumerator = sectionsRoutingInfoList2.GetEnumerator();
          while (enumerator.MoveNext())
          {
            SE0085.StCl.scSectionsRoutingInfo current = enumerator.Current;
            if (hashtable1.ContainsKey((object) current.RoutingWorkCenter))
            {
              int integer = Conversions.ToInteger(hashtable1[(object) current.RoutingWorkCenter]);
              if (!hashtable2.ContainsKey((object) integer))
                hashtable2.Add((object) integer, (object) current);
            }
            if (Operators.CompareString(current.RoutingWorkCenter, WorkCenterStart.Trim(), false) == 0 | Operators.CompareString(current.RoutingWorkCenter, WorkCenterEnd.Trim(), false) == 0)
              rltBklWip.IsWcRequired = true;
          }
        }
        finally
        {
          enumerator.Dispose();
        }
        if (!rltBklWip.IsWcRequired)
          return rltBklWip;
        SE0085.StCl.scSectionsRoutingInfo sectionsRoutingInfo1 = new SE0085.StCl.scSectionsRoutingInfo();
        SE0085.StCl.scSectionsRoutingInfo sectionsRoutingInfo2 = (SE0085.StCl.scSectionsRoutingInfo) hashtable2[RuntimeHelpers.GetObjectValue(hashtable1[(object) WorkCenterStart.Trim()])];
        SE0085.StCl.scSectionsRoutingInfo sectionsRoutingInfo3 = new SE0085.StCl.scSectionsRoutingInfo();
        SE0085.StCl.scSectionsRoutingInfo sectionsRoutingInfo4 = (SE0085.StCl.scSectionsRoutingInfo) hashtable2[RuntimeHelpers.GetObjectValue(hashtable1[(object) WorkCenterEnd.Trim()])];
        if ((DateTime.Compare(sectionsRoutingInfo2.RoutingActFinishDt, date) <= 0 | DateTime.Compare(sectionsRoutingInfo4.RoutingActFinishDt, date) <= 0) & rltBklWip.IsWcRequired)
          rltBklWip.IsWcBacklog = true;
        if (DateTime.Compare(sectionsRoutingInfo2.RoutingActStartDt, date) > 0 & DateTime.Compare(sectionsRoutingInfo2.RoutingActFinishDt, date) > 0 & DateTime.Compare(sectionsRoutingInfo4.RoutingActStartDt, date) > 0 & DateTime.Compare(sectionsRoutingInfo4.RoutingActFinishDt, date) > 0)
        {
          rltBklWip.IsWcComplete = true;
          rltBklWip.IsWcWIPq = false;
          rltBklWip.IsWcWIPip = false;
          rltBklWip.CalProgressComplete(sectionsRoutingInfo4.RoutingSchFinishDt, sectionsRoutingInfo4.RoutingActFinishDt);
        }
        if (DateTime.Compare(sectionsRoutingInfo2.RoutingActStartDt, date) > 0 & (DateTime.Compare(sectionsRoutingInfo2.RoutingActFinishDt, date) <= 0 | DateTime.Compare(sectionsRoutingInfo4.RoutingActFinishDt, date) <= 0))
        {
          rltBklWip.IsWcWIPip = true;
          rltBklWip.IsWcWIPq = false;
          rltBklWip.CalProgress(sectionsRoutingInfo4.RoutingSchFinishDt);
        }
        int num2 = num1;
        while (num2 >= 1)
        {
          if (hashtable2.ContainsKey((object) num2))
          {
            SE0085.StCl.scSectionsRoutingInfo sectionsRoutingInfo5 = new SE0085.StCl.scSectionsRoutingInfo();
            SE0085.StCl.scSectionsRoutingInfo sectionsRoutingInfo6 = (SE0085.StCl.scSectionsRoutingInfo) hashtable2[(object) num2];
            if (DateTime.Compare(sectionsRoutingInfo6.RoutingActStartDt, date) > 0 & DateTime.Compare(sectionsRoutingInfo6.RoutingActFinishDt, date) <= 0)
              rltBklWip.WcCurrent = sectionsRoutingInfo6.RoutingWorkCenter;
            if (DateTime.Compare(sectionsRoutingInfo6.RoutingActStartDt, date) <= 0 & DateTime.Compare(sectionsRoutingInfo6.RoutingActFinishDt, date) <= 0)
            {
              SE0085.StCl.scSectionsRoutingInfo sectionsRoutingInfo7 = new SE0085.StCl.scSectionsRoutingInfo();
              int num3 = checked (num2 - 1);
              while (num3 > 0)
              {
                if (hashtable2.ContainsKey((object) num3))
                {
                  if (DateTime.Compare(((SE0085.StCl.scSectionsRoutingInfo) hashtable2[(object) num3]).RoutingActFinishDt, date) > 0 && Operators.CompareString(sectionsRoutingInfo6.RoutingWorkCenter.Trim(), WorkCenterStart.Trim(), false) == 0 & !rltBklWip.IsWcWIPip)
                  {
                    rltBklWip.IsWcWIPq = true;
                    rltBklWip.WcCurrent = sectionsRoutingInfo6.RoutingWorkCenter;
                    rltBklWip.CalProgress(sectionsRoutingInfo6.RoutingSchStartDt);
                    break;
                  }
                  break;
                }
                checked { num3 += -1; }
              }
            }
          }
          checked { num2 += -1; }
        }
      }
      return rltBklWip;
    }

    public List<SE0085.StCl.scSectionsRoutingInfo> rtnRoutingWorkCenters(int SectionId, string AssemblyLine)
    {
      // ISSUE: object of a compiler-generated type is created
      // ISSUE: variable of a compiler-generated type
      clsRoutings._Closure\u0024__80 closure80 = new clsRoutings._Closure\u0024__80();
      // ISSUE: reference to a compiler-generated field
      closure80.\u0024VB\u0024Local_SectionId = SectionId;
      // ISSUE: reference to a compiler-generated field
      closure80.\u0024VB\u0024Local_AssemblyLine = AssemblyLine;
      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: 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<SE0085.StCl.scSectionsRoutingInfo> source = (IQueryable<SE0085.StCl.scSectionsRoutingInfo>) Queryable.Select((IQueryable<M0>) Queryable.OrderBy(Queryable.Where((IQueryable<M0>) Queryable.Join((IQueryable<M0>) Queryable.Join((IQueryable<M0>) Queryable.Join((IQueryable<M0>) Queryable.Join((IQueryable<M0>) se0085CtEntities1.SEPlants, (IEnumerable<M1>) se0085CtEntities1.AssemblyLines, (Expression<Func<M0, M2>>) (pl => pl.SEPlantId), (Expression<Func<M1, M2>>) (al => al.SEPlant.SEPlantId), (Expression<Func<M0, M1, M3>>) ((pl, al) => new{ pl = pl, al = al })), (IEnumerable<M1>) se0085CtEntities1.OrderLines, (Expression<Func<M0, M2>>) (data => data.al.AssemLineId), (Expression<Func<M1, M2>>) (ol => ol.AssemblyLine.AssemLineId), (Expression<Func<M0, M1, M3>>) ((data, ol) => new{ \u0024VB\u0024It1 = data, 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.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{ pl = data.\u0024VB\u0024It1.\u0024VB\u0024It1.pl, al = data.\u0024VB\u0024It1.\u0024VB\u0024It1.al, ol = data.\u0024VB\u0024It1.ol, sc = data.sc, rt = rt })), (Expression<Func<M0, bool>>) Expression.Lambda<Func<VB\u0024AnonymousType_25<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting>, bool>>((Expression) Expression.And((Expression) Expression.And((Expression) Expression.Equal(\u0024VB\u0024It.pl.SEPlantId, 1, true, (MethodInfo) null), (Expression) Expression.Equal((Expression) Expression.Call((Expression) null, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (Operators.CompareString)), (Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression1, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_25<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting>.get_al), __typeref (VB\u0024AnonymousType_25<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (AssemblyLine.get_AssemLineAbbrv))), (Expression) Expression.Field((Expression) Expression.Constant((object) closure80, typeof (clsRoutings._Closure\u0024__80)), FieldInfo.GetFieldFromHandle(__fieldref (clsRoutings._Closure\u0024__80.\u0024VB\u0024Local_AssemblyLine))), (Expression) Expression.Constant((object) false, typeof (bool))), (Expression) Expression.Constant((object) 0, typeof (int)))), (Expression) Expression.Equal((Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression1, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_25<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting>.get_sc), __typeref (VB\u0024AnonymousType_25<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (OrdSection.get_OrdSectsId))), (Expression) Expression.Field((Expression) Expression.Constant((object) closure80, typeof (clsRoutings._Closure\u0024__80)), FieldInfo.GetFieldFromHandle(__fieldref (clsRoutings._Closure\u0024__80.\u0024VB\u0024Local_SectionId))), true, (MethodInfo) null)), new ParameterExpression[1]{ parameterExpression1 })), (Expression<Func<M0, M1>>) (data => data.rt.RoutingSchStartDt)), (Expression<Func<M0, M1>>) Expression.Lambda<Func<VB\u0024AnonymousType_25<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting>, SE0085.StCl.scSectionsRoutingInfo>>((Expression) Expression.MemberInit(Expression.New((ConstructorInfo) MethodBase.GetMethodFromHandle(__methodref (SE0085.StCl.scSectionsRoutingInfo.\u002Ector)), (Expression[]) null), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (SE0085.StCl.scSectionsRoutingInfo.set_RoutingId)), (Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_25<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting>.get_rt), __typeref (VB\u0024AnonymousType_25<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (SectionsRouting.get_RoutingId)))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (SE0085.StCl.scSectionsRoutingInfo.set_RoutingActFinishDt)), (Expression) Expression.Convert((Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_25<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting>.get_rt), __typeref (VB\u0024AnonymousType_25<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (SectionsRouting.get_RoutingActFinishDt))), typeof (DateTime))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (SE0085.StCl.scSectionsRoutingInfo.set_RoutingActStartDt)), (Expression) Expression.Convert((Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_25<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting>.get_rt), __typeref (VB\u0024AnonymousType_25<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (SectionsRouting.get_RoutingActStartDt))), typeof (DateTime))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (SE0085.StCl.scSectionsRoutingInfo.set_RoutingNextWorkCtr)), (Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_25<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting>.get_rt), __typeref (VB\u0024AnonymousType_25<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (SectionsRouting.get_RoutingNextWorkCtr)))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (SE0085.StCl.scSectionsRoutingInfo.set_RoutingRunTimeMin)), (Expression) Expression.ConvertChecked((Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_25<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting>.get_rt), __typeref (VB\u0024AnonymousType_25<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (SectionsRouting.get_RoutingRunTimeMin))), typeof (int))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (SE0085.StCl.scSectionsRoutingInfo.set_RoutingSchFinishDt)), (Expression) Expression.Convert((Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_25<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting>.get_rt), __typeref (VB\u0024AnonymousType_25<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (SectionsRouting.get_RoutingSchFinishDt))), typeof (DateTime))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (SE0085.StCl.scSectionsRoutingInfo.set_RoutingSchStartDt)), (Expression) Expression.Convert((Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_25<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting>.get_rt), __typeref (VB\u0024AnonymousType_25<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (SectionsRouting.get_RoutingSchStartDt))), typeof (DateTime))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (SE0085.StCl.scSectionsRoutingInfo.set_RoutingWorkCenter)), (Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_25<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting>.get_rt), __typeref (VB\u0024AnonymousType_25<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (SectionsRouting.get_RoutingWorkCenter))))), new ParameterExpression[1]{ parameterExpression2 }));
        if (source.Count<SE0085.StCl.scSectionsRoutingInfo>() > 0)
          return source.ToList<SE0085.StCl.scSectionsRoutingInfo>();
        return (List<SE0085.StCl.scSectionsRoutingInfo>) null;
      }
    }

    public List<string> rtnRoutingWorkCenterNames(string AssemblyLine)
    {
      // ISSUE: object of a compiler-generated type is created
      // ISSUE: variable of a compiler-generated type
      clsRoutings._Closure\u0024__81 closure81 = new clsRoutings._Closure\u0024__81();
      // ISSUE: reference to a compiler-generated field
      closure81.\u0024VB\u0024Local_AssemblyLine = AssemblyLine;
      using (SE0085CTEntities1 se0085CtEntities1 = new SE0085CTEntities1())
      {
        se0085CtEntities1.Database.Connection.ConnectionString = this._CTConnection;
        ParameterExpression parameterExpression;
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: type reference
        // ISSUE: method reference
        // ISSUE: field reference
        IQueryable<string> source = ((IQueryable<string>) Queryable.Select((IQueryable<M0>) Queryable.OrderBy(Queryable.Where((IQueryable<M0>) Queryable.Join((IQueryable<M0>) Queryable.Join((IQueryable<M0>) Queryable.Join((IQueryable<M0>) Queryable.Join((IQueryable<M0>) se0085CtEntities1.SEPlants, (IEnumerable<M1>) se0085CtEntities1.AssemblyLines, (Expression<Func<M0, M2>>) (pl => pl.SEPlantId), (Expression<Func<M1, M2>>) (al => al.SEPlant.SEPlantId), (Expression<Func<M0, M1, M3>>) ((pl, al) => new{ pl = pl, al = al })), (IEnumerable<M1>) se0085CtEntities1.OrderLines, (Expression<Func<M0, M2>>) (data => data.al.AssemLineId), (Expression<Func<M1, M2>>) (ol => ol.AssemblyLine.AssemLineId), (Expression<Func<M0, M1, M3>>) ((data, ol) => new{ \u0024VB\u0024It1 = data, 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.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{ pl = data.\u0024VB\u0024It1.\u0024VB\u0024It1.pl, al = data.\u0024VB\u0024It1.\u0024VB\u0024It1.al, ol = data.\u0024VB\u0024It1.ol, sc = data.sc, rt = rt })), (Expression<Func<M0, bool>>) Expression.Lambda<Func<VB\u0024AnonymousType_25<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting>, bool>>((Expression) Expression.And((Expression) Expression.Equal(\u0024VB\u0024It.pl.SEPlantId, 1, true, (MethodInfo) null), (Expression) Expression.Equal((Expression) Expression.Call((Expression) null, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (Operators.CompareString)), (Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_25<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting>.get_al), __typeref (VB\u0024AnonymousType_25<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (AssemblyLine.get_AssemLineAbbrv))), (Expression) Expression.Field((Expression) Expression.Constant((object) closure81, typeof (clsRoutings._Closure\u0024__81)), FieldInfo.GetFieldFromHandle(__fieldref (clsRoutings._Closure\u0024__81.\u0024VB\u0024Local_AssemblyLine))), (Expression) Expression.Constant((object) false, typeof (bool))), (Expression) Expression.Constant((object) 0, typeof (int)))), new ParameterExpression[1]{ parameterExpression })), (Expression<Func<M0, M1>>) (data => data.rt.RoutingWorkCenter)), (Expression<Func<M0, M1>>) (data => data.rt.RoutingWorkCenter))).Distinct<string>();
        if (source.Count<string>() > 0)
          return source.ToList<string>();
        return (List<string>) null;
      }
    }

    public string rtnCurrentWC(string AssemblyLine, int SectId)
    {
      string str = "";
      DateTime date = Conversions.ToDate("01-01-1901");
      Conversions.ToDate("01-01-2013");
      Conversions.ToDate("01-01-2039");
      int num1 = 1;
      Hashtable hashtable1 = new Hashtable();
      string Left = AssemblyLine;
      if (Operators.CompareString(Left, "SWBD", false) == 0)
      {
        hashtable1.Add((object) "SPWIRKIT", (object) num1);
        int num2 = checked (num1 + 1);
        hashtable1.Add((object) "SPREWIRE", (object) num2);
        int num3 = checked (num2 + 1);
        hashtable1.Add((object) "INSULBUS", (object) num3);
        int num4 = checked (num3 + 1);
        hashtable1.Add((object) "SPPALLET", (object) num4);
        int num5 = checked (num4 + 1);
        hashtable1.Add((object) "FRAMEKIT", (object) num5);
        int num6 = checked (num5 + 1);
        hashtable1.Add((object) "FRAMES", (object) num6);
        int num7 = checked (num6 + 1);
        hashtable1.Add((object) "TBMOUNT", (object) num7);
        int num8 = checked (num7 + 1);
        hashtable1.Add((object) "BNEUTRAL", (object) num8);
        int num9 = checked (num8 + 1);
        hashtable1.Add((object) "DEVMOUNT", (object) num9);
        int num10 = checked (num9 + 1);
        hashtable1.Add((object) "CMPMOUNT", (object) num10);
        int num11 = checked (num10 + 1);
        hashtable1.Add((object) "COVERS", (object) num11);
        int num12 = checked (num11 + 1);
        hashtable1.Add((object) "STANDUP", (object) num12);
        int num13 = checked (num12 + 1);
        hashtable1.Add((object) "ILTBCONN", (object) num13);
        int num14 = checked (num13 + 1);
        hashtable1.Add((object) "STDCONN", (object) num14);
        int num15 = checked (num14 + 1);
        hashtable1.Add((object) "WIRING", (object) num15);
        int num16 = checked (num15 + 1);
        hashtable1.Add((object) "INSPTEST", (object) num16);
        int num17 = checked (num16 + 1);
        hashtable1.Add((object) "FINALPRP", (object) num17);
        int num18 = checked (num17 + 1);
        hashtable1.Add((object) "SHIPWITH", (object) num18);
        int num19 = checked (num18 + 1);
        hashtable1.Add((object) "CLOSEUP", (object) num19);
        int num20 = checked (num19 + 1);
        hashtable1.Add((object) "FPY", (object) num20);
        int num21 = checked (num20 + 1);
        hashtable1.Add((object) "SHIPPING", (object) num21);
        num1 = checked (num21 + 0);
      }
      else if (Operators.CompareString(Left, "LVDO", false) == 0)
      {
        hashtable1.Add((object) "PNLWKIT", (object) num1);
        int num2 = checked (num1 + 1);
        hashtable1.Add((object) "PNLWIRE", (object) num2);
        int num3 = checked (num2 + 1);
        hashtable1.Add((object) "STRUCT1", (object) num3);
        int num4 = checked (num3 + 1);
        hashtable1.Add((object) "RISER", (object) num4);
        int num5 = checked (num4 + 1);
        hashtable1.Add((object) "STRUCT2", (object) num5);
        int num6 = checked (num5 + 1);
        hashtable1.Add((object) "HORIZON", (object) num6);
        int num7 = checked (num6 + 1);
        hashtable1.Add((object) "VERTICAL", (object) num7);
        int num8 = checked (num7 + 1);
        hashtable1.Add((object) "ROOFSTAN", (object) num8);
        int num9 = checked (num8 + 1);
        hashtable1.Add((object) "BOLTDOWN", (object) num9);
        int num10 = checked (num9 + 1);
        hashtable1.Add((object) "PANINSTL", (object) num10);
        int num11 = checked (num10 + 1);
        hashtable1.Add((object) "CBLUGDR", (object) num11);
        int num12 = checked (num11 + 1);
        hashtable1.Add((object) "STRUWIRE", (object) num12);
        int num13 = checked (num12 + 1);
        hashtable1.Add((object) "METESTSW", (object) num13);
        int num14 = checked (num13 + 1);
        hashtable1.Add((object) "ELTESTLB", (object) num14);
        int num15 = checked (num14 + 1);
        hashtable1.Add((object) "PACKOUT", (object) num15);
        int num16 = checked (num15 + 1);
        hashtable1.Add((object) "NEMA3R", (object) num16);
        int num17 = checked (num16 + 1);
        hashtable1.Add((object) "SHIP", (object) num17);
        num1 = checked (num17 + 0);
      }
      List<SE0085.StCl.scSectionsRoutingInfo> sectionsRoutingInfoList1 = new List<SE0085.StCl.scSectionsRoutingInfo>();
      List<SE0085.StCl.scSectionsRoutingInfo> sectionsRoutingInfoList2 = this.rtnRoutingWorkCenters(SectId, AssemblyLine);
      Hashtable hashtable2 = new Hashtable();
      if (sectionsRoutingInfoList2 != null)
      {
        List<SE0085.StCl.scSectionsRoutingInfo>.Enumerator enumerator;
        try
        {
          enumerator = sectionsRoutingInfoList2.GetEnumerator();
          while (enumerator.MoveNext())
          {
            SE0085.StCl.scSectionsRoutingInfo current = enumerator.Current;
            if (hashtable1.ContainsKey((object) current.RoutingWorkCenter))
            {
              int integer = Conversions.ToInteger(hashtable1[(object) current.RoutingWorkCenter]);
              if (!hashtable2.ContainsKey((object) integer))
                hashtable2.Add((object) integer, (object) current);
            }
          }
        }
        finally
        {
          enumerator.Dispose();
        }
        int num2 = num1;
        while (num2 >= 1)
        {
          if (hashtable2.ContainsKey((object) num2))
          {
            SE0085.StCl.scSectionsRoutingInfo sectionsRoutingInfo1 = new SE0085.StCl.scSectionsRoutingInfo();
            SE0085.StCl.scSectionsRoutingInfo sectionsRoutingInfo2 = (SE0085.StCl.scSectionsRoutingInfo) hashtable2[(object) num2];
            if (DateTime.Compare(sectionsRoutingInfo2.RoutingActStartDt, date) > 0 & DateTime.Compare(sectionsRoutingInfo2.RoutingActFinishDt, date) <= 0)
            {
              str = sectionsRoutingInfo2.RoutingWorkCenter;
              break;
            }
            if (DateTime.Compare(sectionsRoutingInfo2.RoutingActStartDt, date) <= 0 & DateTime.Compare(sectionsRoutingInfo2.RoutingActFinishDt, date) <= 0)
            {
              SE0085.StCl.scSectionsRoutingInfo sectionsRoutingInfo3 = new SE0085.StCl.scSectionsRoutingInfo();
              int num3 = checked (num2 - 1);
              while (num3 > 0)
              {
                if (hashtable2.ContainsKey((object) num3))
                {
                  if (DateTime.Compare(((SE0085.StCl.scSectionsRoutingInfo) hashtable2[(object) num3]).RoutingActFinishDt, date) > 0)
                  {
                    str = sectionsRoutingInfo2.RoutingWorkCenter;
                    goto label_27;
                  }
                  else
                    break;
                }
                else
                  checked { num3 += -1; }
              }
            }
          }
          checked { num2 += -1; }
        }
      }
label_27:
      return str;
    }

    public string rtnCurrentWCbyPO(string AssemblyLine, string ProductionOrder)
    {
      string str = "";
      DateTime date = Conversions.ToDate("01-01-1901");
      Conversions.ToDate("01-01-2013");
      Conversions.ToDate("01-01-2039");
      int num1 = 1;
      Hashtable hashtable1 = new Hashtable();
      string Left = AssemblyLine;
      if (Operators.CompareString(Left, "SWBD", false) == 0)
      {
        hashtable1.Add((object) "SPWIRKIT", (object) num1);
        int num2 = checked (num1 + 1);
        hashtable1.Add((object) "SPREWIRE", (object) num2);
        int num3 = checked (num2 + 1);
        hashtable1.Add((object) "INSULBUS", (object) num3);
        int num4 = checked (num3 + 1);
        hashtable1.Add((object) "SPPALLET", (object) num4);
        int num5 = checked (num4 + 1);
        hashtable1.Add((object) "FRAMEKIT", (object) num5);
        int num6 = checked (num5 + 1);
        hashtable1.Add((object) "FRAMES", (object) num6);
        int num7 = checked (num6 + 1);
        hashtable1.Add((object) "TBMOUNT", (object) num7);
        int num8 = checked (num7 + 1);
        hashtable1.Add((object) "BNEUTRAL", (object) num8);
        int num9 = checked (num8 + 1);
        hashtable1.Add((object) "DEVMOUNT", (object) num9);
        int num10 = checked (num9 + 1);
        hashtable1.Add((object) "CMPMOUNT", (object) num10);
        int num11 = checked (num10 + 1);
        hashtable1.Add((object) "COVERS", (object) num11);
        int num12 = checked (num11 + 1);
        hashtable1.Add((object) "STANDUP", (object) num12);
        int num13 = checked (num12 + 1);
        hashtable1.Add((object) "ILTBCONN", (object) num13);
        int num14 = checked (num13 + 1);
        hashtable1.Add((object) "STDCONN", (object) num14);
        int num15 = checked (num14 + 1);
        hashtable1.Add((object) "WIRING", (object) num15);
        int num16 = checked (num15 + 1);
        hashtable1.Add((object) "INSPTEST", (object) num16);
        int num17 = checked (num16 + 1);
        hashtable1.Add((object) "FINALPRP", (object) num17);
        int num18 = checked (num17 + 1);
        hashtable1.Add((object) "SHIPWITH", (object) num18);
        int num19 = checked (num18 + 1);
        hashtable1.Add((object) "CLOSEUP", (object) num19);
        int num20 = checked (num19 + 1);
        hashtable1.Add((object) "FPY", (object) num20);
        int num21 = checked (num20 + 1);
        hashtable1.Add((object) "SHIPPING", (object) num21);
        num1 = checked (num21 + 0);
      }
      else if (Operators.CompareString(Left, "LVDO", false) == 0)
      {
        hashtable1.Add((object) "PNLWKIT", (object) num1);
        int num2 = checked (num1 + 1);
        hashtable1.Add((object) "PNLWIRE", (object) num2);
        int num3 = checked (num2 + 1);
        hashtable1.Add((object) "STRUCT1", (object) num3);
        int num4 = checked (num3 + 1);
        hashtable1.Add((object) "RISER", (object) num4);
        int num5 = checked (num4 + 1);
        hashtable1.Add((object) "STRUCT2", (object) num5);
        int num6 = checked (num5 + 1);
        hashtable1.Add((object) "HORIZON", (object) num6);
        int num7 = checked (num6 + 1);
        hashtable1.Add((object) "VERTICAL", (object) num7);
        int num8 = checked (num7 + 1);
        hashtable1.Add((object) "ROOFSTAN", (object) num8);
        int num9 = checked (num8 + 1);
        hashtable1.Add((object) "BOLTDOWN", (object) num9);
        int num10 = checked (num9 + 1);
        hashtable1.Add((object) "PANINSTL", (object) num10);
        int num11 = checked (num10 + 1);
        hashtable1.Add((object) "CBLUGDR", (object) num11);
        int num12 = checked (num11 + 1);
        hashtable1.Add((object) "STRUWIRE", (object) num12);
        int num13 = checked (num12 + 1);
        hashtable1.Add((object) "METESTSW", (object) num13);
        int num14 = checked (num13 + 1);
        hashtable1.Add((object) "ELTESTLB", (object) num14);
        int num15 = checked (num14 + 1);
        hashtable1.Add((object) "PACKOUT", (object) num15);
        int num16 = checked (num15 + 1);
        hashtable1.Add((object) "NEMA3R", (object) num16);
        int num17 = checked (num16 + 1);
        hashtable1.Add((object) "SHIP", (object) num17);
        num1 = checked (num17 + 0);
      }
      List<SE0085.StCl.scSectionsRoutingInfo> sectionsRoutingInfoList1 = new List<SE0085.StCl.scSectionsRoutingInfo>();
      List<SE0085.StCl.scSectionsRoutingInfo> sectionsRoutingInfoList2 = this.rtnRoutingWorkCentersbyPO(AssemblyLine, ProductionOrder);
      Hashtable hashtable2 = new Hashtable();
      if (sectionsRoutingInfoList2 != null)
      {
        List<SE0085.StCl.scSectionsRoutingInfo>.Enumerator enumerator;
        try
        {
          enumerator = sectionsRoutingInfoList2.GetEnumerator();
          while (enumerator.MoveNext())
          {
            SE0085.StCl.scSectionsRoutingInfo current = enumerator.Current;
            if (hashtable1.ContainsKey((object) current.RoutingWorkCenter))
            {
              int integer = Conversions.ToInteger(hashtable1[(object) current.RoutingWorkCenter]);
              if (!hashtable2.ContainsKey((object) integer))
                hashtable2.Add((object) integer, (object) current);
            }
          }
        }
        finally
        {
          enumerator.Dispose();
        }
        int num2 = num1;
        while (num2 >= 1)
        {
          if (hashtable2.ContainsKey((object) num2))
          {
            SE0085.StCl.scSectionsRoutingInfo sectionsRoutingInfo1 = new SE0085.StCl.scSectionsRoutingInfo();
            SE0085.StCl.scSectionsRoutingInfo sectionsRoutingInfo2 = (SE0085.StCl.scSectionsRoutingInfo) hashtable2[(object) num2];
            if (DateTime.Compare(sectionsRoutingInfo2.RoutingActStartDt, date) > 0 & DateTime.Compare(sectionsRoutingInfo2.RoutingActFinishDt, date) <= 0)
            {
              str = sectionsRoutingInfo2.RoutingWorkCenter;
              break;
            }
            if (DateTime.Compare(sectionsRoutingInfo2.RoutingActStartDt, date) <= 0 & DateTime.Compare(sectionsRoutingInfo2.RoutingActFinishDt, date) <= 0)
            {
              SE0085.StCl.scSectionsRoutingInfo sectionsRoutingInfo3 = new SE0085.StCl.scSectionsRoutingInfo();
              int num3 = checked (num2 - 1);
              while (num3 > 0)
              {
                if (hashtable2.ContainsKey((object) num3))
                {
                  if (DateTime.Compare(((SE0085.StCl.scSectionsRoutingInfo) hashtable2[(object) num3]).RoutingActFinishDt, date) > 0)
                  {
                    str = sectionsRoutingInfo2.RoutingWorkCenter;
                    goto label_27;
                  }
                  else
                    break;
                }
                else
                  checked { num3 += -1; }
              }
            }
          }
          checked { num2 += -1; }
        }
      }
label_27:
      return str;
    }

    public List<SE0085.StCl.scSectionsRoutingInfo> rtnRoutingWorkCentersbyPO(string AssemblyLine, string ProductionOrder)
    {
      // ISSUE: object of a compiler-generated type is created
      // ISSUE: variable of a compiler-generated type
      clsRoutings._Closure\u0024__82 closure82 = new clsRoutings._Closure\u0024__82();
      // ISSUE: reference to a compiler-generated field
      closure82.\u0024VB\u0024Local_AssemblyLine = AssemblyLine;
      // ISSUE: reference to a compiler-generated field
      closure82.\u0024VB\u0024Local_ProductionOrder = ProductionOrder;
      List<SE0085.StCl.scSectionsRoutingInfo> sectionsRoutingInfoList = new List<SE0085.StCl.scSectionsRoutingInfo>();
      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: 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<SE0085.StCl.scSectionsRoutingInfo> source = (IQueryable<SE0085.StCl.scSectionsRoutingInfo>) Queryable.Select((IQueryable<M0>) Queryable.OrderBy(Queryable.Where((IQueryable<M0>) Queryable.Join((IQueryable<M0>) Queryable.Join((IQueryable<M0>) Queryable.Join((IQueryable<M0>) Queryable.Join((IQueryable<M0>) se0085CtEntities1.SEPlants, (IEnumerable<M1>) se0085CtEntities1.AssemblyLines, (Expression<Func<M0, M2>>) (pl => pl.SEPlantId), (Expression<Func<M1, M2>>) (al => al.SEPlant.SEPlantId), (Expression<Func<M0, M1, M3>>) ((pl, al) => new{ pl = pl, al = al })), (IEnumerable<M1>) se0085CtEntities1.OrderLines, (Expression<Func<M0, M2>>) (data => data.al.AssemLineId), (Expression<Func<M1, M2>>) (ol => ol.AssemblyLine.AssemLineId), (Expression<Func<M0, M1, M3>>) ((data, ol) => new{ \u0024VB\u0024It1 = data, 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.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{ pl = data.\u0024VB\u0024It1.\u0024VB\u0024It1.pl, al = data.\u0024VB\u0024It1.\u0024VB\u0024It1.al, ol = data.\u0024VB\u0024It1.ol, sc = data.sc, rt = rt })), (Expression<Func<M0, bool>>) Expression.Lambda<Func<VB\u0024AnonymousType_25<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting>, bool>>((Expression) Expression.And((Expression) Expression.And((Expression) Expression.Equal(\u0024VB\u0024It.pl.SEPlantId, 1, true, (MethodInfo) null), (Expression) Expression.Equal((Expression) Expression.Call((Expression) null, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (Operators.CompareString)), (Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression1, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_25<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting>.get_al), __typeref (VB\u0024AnonymousType_25<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (AssemblyLine.get_AssemLineAbbrv))), (Expression) Expression.Field((Expression) Expression.Constant((object) closure82, typeof (clsRoutings._Closure\u0024__82)), FieldInfo.GetFieldFromHandle(__fieldref (clsRoutings._Closure\u0024__82.\u0024VB\u0024Local_AssemblyLine))), (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 (Operators.CompareString)), (Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression1, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_25<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting>.get_sc), __typeref (VB\u0024AnonymousType_25<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (OrdSection.get_OrdSectsProdNum))), (Expression) Expression.Field((Expression) Expression.Constant((object) closure82, typeof (clsRoutings._Closure\u0024__82)), FieldInfo.GetFieldFromHandle(__fieldref (clsRoutings._Closure\u0024__82.\u0024VB\u0024Local_ProductionOrder))), (Expression) Expression.Constant((object) false, typeof (bool))), (Expression) Expression.Constant((object) 0, typeof (int)))), new ParameterExpression[1]{ parameterExpression1 })), (Expression<Func<M0, M1>>) (data => data.rt.RoutingSchStartDt)), (Expression<Func<M0, M1>>) Expression.Lambda<Func<VB\u0024AnonymousType_25<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting>, SE0085.StCl.scSectionsRoutingInfo>>((Expression) Expression.MemberInit(Expression.New((ConstructorInfo) MethodBase.GetMethodFromHandle(__methodref (SE0085.StCl.scSectionsRoutingInfo.\u002Ector)), (Expression[]) null), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (SE0085.StCl.scSectionsRoutingInfo.set_RoutingId)), (Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_25<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting>.get_rt), __typeref (VB\u0024AnonymousType_25<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (SectionsRouting.get_RoutingId)))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (SE0085.StCl.scSectionsRoutingInfo.set_RoutingActFinishDt)), (Expression) Expression.Convert((Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_25<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting>.get_rt), __typeref (VB\u0024AnonymousType_25<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (SectionsRouting.get_RoutingActFinishDt))), typeof (DateTime))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (SE0085.StCl.scSectionsRoutingInfo.set_RoutingActStartDt)), (Expression) Expression.Convert((Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_25<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting>.get_rt), __typeref (VB\u0024AnonymousType_25<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (SectionsRouting.get_RoutingActStartDt))), typeof (DateTime))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (SE0085.StCl.scSectionsRoutingInfo.set_RoutingNextWorkCtr)), (Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_25<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting>.get_rt), __typeref (VB\u0024AnonymousType_25<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (SectionsRouting.get_RoutingNextWorkCtr)))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (SE0085.StCl.scSectionsRoutingInfo.set_RoutingRunTimeMin)), (Expression) Expression.ConvertChecked((Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_25<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting>.get_rt), __typeref (VB\u0024AnonymousType_25<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (SectionsRouting.get_RoutingRunTimeMin))), typeof (int))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (SE0085.StCl.scSectionsRoutingInfo.set_RoutingSchFinishDt)), (Expression) Expression.Convert((Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_25<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting>.get_rt), __typeref (VB\u0024AnonymousType_25<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (SectionsRouting.get_RoutingSchFinishDt))), typeof (DateTime))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (SE0085.StCl.scSectionsRoutingInfo.set_RoutingSchStartDt)), (Expression) Expression.Convert((Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_25<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting>.get_rt), __typeref (VB\u0024AnonymousType_25<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (SectionsRouting.get_RoutingSchStartDt))), typeof (DateTime))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (SE0085.StCl.scSectionsRoutingInfo.set_RoutingWorkCenter)), (Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_25<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting>.get_rt), __typeref (VB\u0024AnonymousType_25<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (SectionsRouting.get_RoutingWorkCenter))))), new ParameterExpression[1]{ parameterExpression2 }));
        if (source.Count<SE0085.StCl.scSectionsRoutingInfo>() > 0)
          sectionsRoutingInfoList = source.ToList<SE0085.StCl.scSectionsRoutingInfo>();
        se0085CtEntities1.Database.Connection.Close();
      }
      return sectionsRoutingInfoList;
    }

    public Hashtable rtnBacklogSections(scLevels Plant, scLevels AssemblyLine, DateTime StartDate, DateTime FinishDate, string Workcenter)
    {
      // ISSUE: object of a compiler-generated type is created
      // ISSUE: variable of a compiler-generated type
      clsRoutings._Closure\u0024__83 closure83 = new clsRoutings._Closure\u0024__83();
      // ISSUE: reference to a compiler-generated field
      closure83.\u0024VB\u0024Local_Plant = Plant;
      // ISSUE: reference to a compiler-generated field
      closure83.\u0024VB\u0024Local_AssemblyLine = AssemblyLine;
      List<scOrderData> scOrderDataList = new List<scOrderData>();
      Conversions.ToDate("01/01/1901");
      // ISSUE: reference to a compiler-generated field
      closure83.\u0024VB\u0024Local_ldUpperDateLimit = Conversions.ToDate("01/01/2020");
      Conversions.ToDate("01/01/2000");
      // ISSUE: reference to a compiler-generated field
      closure83.\u0024VB\u0024Local_ldWorkCenter = Workcenter;
      // ISSUE: reference to a compiler-generated field
      closure83.\u0024VB\u0024Local_ldStartTime = StartDate;
      // ISSUE: reference to a compiler-generated field
      closure83.\u0024VB\u0024Local_ldEndTime = FinishDate;
      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: 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: 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
        // 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.OrderBy(Queryable.Where((IQueryable<M0>) Queryable.Join((IQueryable<M0>) Queryable.Join((IQueryable<M0>) Queryable.Join((IQueryable<M0>) Queryable.Join((IQueryable<M0>) Queryable.Join((IQueryable<M0>) se0085CtEntities1.SEPlants, (IEnumerable<M1>) se0085CtEntities1.AssemblyLines, (Expression<Func<M0, M2>>) (pl => pl.SEPlantId), (Expression<Func<M1, M2>>) (al => al.SEPlant.SEPlantId), (Expression<Func<M0, M1, M3>>) ((pl, al) => new{ pl = pl, al = al })), (IEnumerable<M1>) se0085CtEntities1.OrderLines, (Expression<Func<M0, M2>>) (data => data.al.AssemLineId), (Expression<Func<M1, M2>>) (ol => ol.AssemblyLine.AssemLineId), (Expression<Func<M0, M1, M3>>) ((data, ol) => new{ \u0024VB\u0024It1 = data, 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.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{ \u0024VB\u0024It1 = data, rt = rt })), (IEnumerable<M1>) se0085CtEntities1.SEOrders, (Expression<Func<M0, M2>>) (data => data.\u0024VB\u0024It1.\u0024VB\u0024It1.ol.SEOrder.OrderId), (Expression<Func<M1, M2>>) (od => od.OrderId), (Expression<Func<M0, M1, M3>>) ((data, od) => new{ pl = data.\u0024VB\u0024It1.\u0024VB\u0024It1.\u0024VB\u0024It1.pl, al = data.\u0024VB\u0024It1.\u0024VB\u0024It1.\u0024VB\u0024It1.al, ol = data.\u0024VB\u0024It1.\u0024VB\u0024It1.ol, sc = data.\u0024VB\u0024It1.sc, rt = data.rt, od = od })), (Expression<Func<M0, bool>>) Expression.Lambda<Func<VB\u0024AnonymousType_36<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting, SEOrder>, bool>>((Expression) Expression.Coalesce((Expression) Expression.And((Expression) Expression.And((Expression) Expression.And((Expression) Expression.Convert((Expression) Expression.And((Expression) Expression.And((Expression) Expression.Equal(\u0024VB\u0024It.pl.SEPlantId, closure83.\u0024VB\u0024Local_Plant.LevelId, true, (MethodInfo) null), (Expression) Expression.Equal((Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression1, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_36<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting, SEOrder>.get_al), __typeref (VB\u0024AnonymousType_36<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting, SEOrder>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (AssemblyLine.get_AssemLineId))), (Expression) Expression.Property((Expression) Expression.Field((Expression) Expression.Constant((object) closure83, typeof (clsRoutings._Closure\u0024__83)), FieldInfo.GetFieldFromHandle(__fieldref (clsRoutings._Closure\u0024__83.\u0024VB\u0024Local_AssemblyLine))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scLevels.get_LevelId))), true, (MethodInfo) null)), (Expression) Expression.Equal((Expression) Expression.Call((Expression) null, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (Operators.CompareString)), (Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression1, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_36<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting, SEOrder>.get_rt), __typeref (VB\u0024AnonymousType_36<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting, SEOrder>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (SectionsRouting.get_RoutingWorkCenter))), (Expression) Expression.Field((Expression) Expression.Constant((object) closure83, typeof (clsRoutings._Closure\u0024__83)), FieldInfo.GetFieldFromHandle(__fieldref (clsRoutings._Closure\u0024__83.\u0024VB\u0024Local_ldWorkCenter))), (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_36<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting, SEOrder>.get_rt), __typeref (VB\u0024AnonymousType_36<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting, SEOrder>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (SectionsRouting.get_RoutingActStartDt))), (Expression) Expression.Convert((Expression) Expression.Field((Expression) Expression.Constant((object) closure83, typeof (clsRoutings._Closure\u0024__83)), FieldInfo.GetFieldFromHandle(__fieldref (clsRoutings._Closure\u0024__83.\u0024VB\u0024Local_ldStartTime))), typeof (DateTime?)), true, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (DateTime.op_GreaterThan)))), (Expression) Expression.LessThanOrEqual((Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression1, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_36<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting, SEOrder>.get_rt), __typeref (VB\u0024AnonymousType_36<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting, SEOrder>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (SectionsRouting.get_RoutingActStartDt))), (Expression) Expression.Convert((Expression) Expression.Field((Expression) Expression.Constant((object) closure83, typeof (clsRoutings._Closure\u0024__83)), FieldInfo.GetFieldFromHandle(__fieldref (clsRoutings._Closure\u0024__83.\u0024VB\u0024Local_ldEndTime))), typeof (DateTime?)), true, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (DateTime.op_LessThanOrEqual)))), (Expression) Expression.Or((Expression) Expression.Equal((Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression1, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_36<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting, SEOrder>.get_ol), __typeref (VB\u0024AnonymousType_36<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting, SEOrder>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (OrderLine.get_OrderLineShipped))), (Expression) Expression.Convert((Expression) Expression.Constant((object) false, typeof (bool)), typeof (bool?)), true, (MethodInfo) null), (Expression) Expression.And((Expression) Expression.GreaterThan((Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression1, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_36<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting, SEOrder>.get_ol), __typeref (VB\u0024AnonymousType_36<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting, SEOrder>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (OrderLine.get_OrderLineShippedDt))), (Expression) Expression.Convert((Expression) Expression.Field((Expression) Expression.Constant((object) closure83, typeof (clsRoutings._Closure\u0024__83)), FieldInfo.GetFieldFromHandle(__fieldref (clsRoutings._Closure\u0024__83.\u0024VB\u0024Local_ldEndTime))), 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_36<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting, SEOrder>.get_ol), __typeref (VB\u0024AnonymousType_36<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting, SEOrder>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (OrderLine.get_OrderLineShippedDt))), (Expression) Expression.Convert((Expression) Expression.Field((Expression) Expression.Constant((object) closure83, typeof (clsRoutings._Closure\u0024__83)), FieldInfo.GetFieldFromHandle(__fieldref (clsRoutings._Closure\u0024__83.\u0024VB\u0024Local_ldUpperDateLimit))), 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.od.OrderFO)), (Expression<Func<M0, M1>>) (data => data.ol.OrderLineNum)), (Expression<Func<M0, M1>>) (data => data.sc.OrdSectsNum)), (Expression<Func<M0, M1>>) Expression.Lambda<Func<VB\u0024AnonymousType_36<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting, SEOrder>, 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_36<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting, SEOrder>.get_al), __typeref (VB\u0024AnonymousType_36<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting, SEOrder>))), (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_36<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting, SEOrder>.get_al), __typeref (VB\u0024AnonymousType_36<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting, SEOrder>))), (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_36<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting, SEOrder>.get_od), __typeref (VB\u0024AnonymousType_36<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting, SEOrder>))), (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_36<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting, SEOrder>.get_od), __typeref (VB\u0024AnonymousType_36<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting, SEOrder>))), (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_36<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting, SEOrder>.get_od), __typeref (VB\u0024AnonymousType_36<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting, SEOrder>))), (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_36<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting, SEOrder>.get_ol), __typeref (VB\u0024AnonymousType_36<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting, SEOrder>))), (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_36<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting, SEOrder>.get_ol), __typeref (VB\u0024AnonymousType_36<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting, SEOrder>))), (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_36<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting, SEOrder>.get_ol), __typeref (VB\u0024AnonymousType_36<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting, SEOrder>))), (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_36<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting, SEOrder>.get_ol), __typeref (VB\u0024AnonymousType_36<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting, SEOrder>))), (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_36<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting, SEOrder>.get_ol), __typeref (VB\u0024AnonymousType_36<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting, SEOrder>))), (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_36<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting, SEOrder>.get_ol), __typeref (VB\u0024AnonymousType_36<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting, SEOrder>))), (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_36<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting, SEOrder>.get_ol), __typeref (VB\u0024AnonymousType_36<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting, SEOrder>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (OrderLine.get_OrderLineAssyStartDt))), typeof (DateTime)))), new ParameterExpression[1]{ parameterExpression2 }));
        if (source.Count<scOrderData>() <= 0)
          return (Hashtable) null;
        List<scOrderData> list = source.ToList<scOrderData>();
        Hashtable hashtable = new Hashtable();
        List<scOrderData>.Enumerator enumerator;
        try
        {
          enumerator = list.GetEnumerator();
          while (enumerator.MoveNext())
          {
            scOrderData current = enumerator.Current;
            if (!hashtable.ContainsKey((object) current.OrderLineId))
              hashtable.Add((object) current.OrderLineId, (object) current);
          }
        }
        finally
        {
          enumerator.Dispose();
        }
        return hashtable;
      }
    }

    public int rtnRoutingTotalSTDMin(string AssemblyLine, int SectionId)
    {
      // ISSUE: object of a compiler-generated type is created
      // ISSUE: variable of a compiler-generated type
      clsRoutings._Closure\u0024__84 closure84 = new clsRoutings._Closure\u0024__84();
      // ISSUE: reference to a compiler-generated field
      closure84.\u0024VB\u0024Local_AssemblyLine = AssemblyLine;
      // ISSUE: reference to a compiler-generated field
      closure84.\u0024VB\u0024Local_SectionId = SectionId;
      // ISSUE: reference to a compiler-generated field
      string localAssemblyLine = closure84.\u0024VB\u0024Local_AssemblyLine;
      // ISSUE: reference to a compiler-generated field
      closure84.\u0024VB\u0024Local_ldShipWC = Operators.CompareString(localAssemblyLine, "SWBD", false) != 0 ? (Operators.CompareString(localAssemblyLine, "LVDO", false) != 0 ? "?" : "SHIP") : "SHIPPING";
      using (SE0085CTEntities1 se0085CtEntities1 = new SE0085CTEntities1())
      {
        se0085CtEntities1.Database.Connection.ConnectionString = this._CTConnection;
        ParameterExpression parameterExpression;
        // 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
        IQueryable<int?> source = (IQueryable<int?>) Queryable.Select((IQueryable<M0>) Queryable.OrderBy(Queryable.Where((IQueryable<M0>) Queryable.Join((IQueryable<M0>) Queryable.Join((IQueryable<M0>) Queryable.Join((IQueryable<M0>) Queryable.Join((IQueryable<M0>) se0085CtEntities1.SEPlants, (IEnumerable<M1>) se0085CtEntities1.AssemblyLines, (Expression<Func<M0, M2>>) (pl => pl.SEPlantId), (Expression<Func<M1, M2>>) (al => al.SEPlant.SEPlantId), (Expression<Func<M0, M1, M3>>) ((pl, al) => new{ pl = pl, al = al })), (IEnumerable<M1>) se0085CtEntities1.OrderLines, (Expression<Func<M0, M2>>) (data => data.al.AssemLineId), (Expression<Func<M1, M2>>) (ol => ol.AssemblyLine.AssemLineId), (Expression<Func<M0, M1, M3>>) ((data, ol) => new{ \u0024VB\u0024It1 = data, 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.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{ pl = data.\u0024VB\u0024It1.\u0024VB\u0024It1.pl, al = data.\u0024VB\u0024It1.\u0024VB\u0024It1.al, ol = data.\u0024VB\u0024It1.ol, sc = data.sc, rt = rt })), (Expression<Func<M0, bool>>) Expression.Lambda<Func<VB\u0024AnonymousType_25<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting>, bool>>((Expression) Expression.And((Expression) Expression.And((Expression) Expression.And((Expression) Expression.Equal(\u0024VB\u0024It.pl.SEPlantId, 1, true, (MethodInfo) null), (Expression) Expression.Equal((Expression) Expression.Call((Expression) null, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (Operators.CompareString)), (Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_25<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting>.get_al), __typeref (VB\u0024AnonymousType_25<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (AssemblyLine.get_AssemLineAbbrv))), (Expression) Expression.Field((Expression) Expression.Constant((object) closure84, typeof (clsRoutings._Closure\u0024__84)), FieldInfo.GetFieldFromHandle(__fieldref (clsRoutings._Closure\u0024__84.\u0024VB\u0024Local_AssemblyLine))), (Expression) Expression.Constant((object) false, typeof (bool))), (Expression) Expression.Constant((object) 0, typeof (int)))), (Expression) Expression.Equal((Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_25<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting>.get_sc), __typeref (VB\u0024AnonymousType_25<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (OrdSection.get_OrdSectsId))), (Expression) Expression.Field((Expression) Expression.Constant((object) closure84, typeof (clsRoutings._Closure\u0024__84)), FieldInfo.GetFieldFromHandle(__fieldref (clsRoutings._Closure\u0024__84.\u0024VB\u0024Local_SectionId))), true, (MethodInfo) null)), (Expression) Expression.NotEqual((Expression) Expression.Call((Expression) null, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (Operators.CompareString)), (Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_25<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting>.get_rt), __typeref (VB\u0024AnonymousType_25<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (SectionsRouting.get_RoutingWorkCenter))), (Expression) Expression.Field((Expression) Expression.Constant((object) closure84, typeof (clsRoutings._Closure\u0024__84)), FieldInfo.GetFieldFromHandle(__fieldref (clsRoutings._Closure\u0024__84.\u0024VB\u0024Local_ldShipWC))), (Expression) Expression.Constant((object) false, typeof (bool))), (Expression) Expression.Constant((object) 0, typeof (int)))), new ParameterExpression[1]{ parameterExpression })), (Expression<Func<M0, M1>>) (data => data.rt.RoutingSchStartDt)), (Expression<Func<M0, M1>>) (data => data.rt.RoutingRunTimeMin));
        if (source.Count<int?>() <= 0)
          return 0;
        IEnumerator<int?> enumerator;
        int num;
        try
        {
          enumerator = source.GetEnumerator();
          while (enumerator.MoveNext())
          {
            int current = (int) enumerator.Current;
            if (current < 60000)
              checked { num += current; }
            else
              checked { num += 1440; }
          }
        }
        finally
        {
          if (enumerator != null)
            enumerator.Dispose();
        }
        return num;
      }
    }

    public int rtnRoutingCompletedMin(string AssemblyLine, int SectionId, DateTime CutoffDate)
    {
      // ISSUE: object of a compiler-generated type is created
      // ISSUE: variable of a compiler-generated type
      clsRoutings._Closure\u0024__85 closure85 = new clsRoutings._Closure\u0024__85();
      // ISSUE: reference to a compiler-generated field
      closure85.\u0024VB\u0024Local_AssemblyLine = AssemblyLine;
      // ISSUE: reference to a compiler-generated field
      closure85.\u0024VB\u0024Local_SectionId = SectionId;
      // ISSUE: reference to a compiler-generated field
      closure85.\u0024VB\u0024Local_CutoffDate = CutoffDate;
      // ISSUE: reference to a compiler-generated field
      closure85.\u0024VB\u0024Local_ldDefaultDate = Conversions.ToDate("01/01/1901");
      // ISSUE: reference to a compiler-generated field
      string localAssemblyLine = closure85.\u0024VB\u0024Local_AssemblyLine;
      // ISSUE: reference to a compiler-generated field
      closure85.\u0024VB\u0024Local_ldShipWC = Operators.CompareString(localAssemblyLine, "SWBD", false) != 0 ? (Operators.CompareString(localAssemblyLine, "LVDO", false) != 0 ? "?" : "SHIP") : "SHIPPING";
      using (SE0085CTEntities1 se0085CtEntities1 = new SE0085CTEntities1())
      {
        se0085CtEntities1.Database.Connection.ConnectionString = this._CTConnection;
        ParameterExpression parameterExpression;
        // 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: 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
        IQueryable<int?> source = (IQueryable<int?>) Queryable.Select((IQueryable<M0>) Queryable.OrderBy(Queryable.Where((IQueryable<M0>) Queryable.Join((IQueryable<M0>) Queryable.Join((IQueryable<M0>) Queryable.Join((IQueryable<M0>) Queryable.Join((IQueryable<M0>) se0085CtEntities1.SEPlants, (IEnumerable<M1>) se0085CtEntities1.AssemblyLines, (Expression<Func<M0, M2>>) (pl => pl.SEPlantId), (Expression<Func<M1, M2>>) (al => al.SEPlant.SEPlantId), (Expression<Func<M0, M1, M3>>) ((pl, al) => new{ pl = pl, al = al })), (IEnumerable<M1>) se0085CtEntities1.OrderLines, (Expression<Func<M0, M2>>) (data => data.al.AssemLineId), (Expression<Func<M1, M2>>) (ol => ol.AssemblyLine.AssemLineId), (Expression<Func<M0, M1, M3>>) ((data, ol) => new{ \u0024VB\u0024It1 = data, 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.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{ pl = data.\u0024VB\u0024It1.\u0024VB\u0024It1.pl, al = data.\u0024VB\u0024It1.\u0024VB\u0024It1.al, ol = data.\u0024VB\u0024It1.ol, sc = data.sc, rt = rt })), (Expression<Func<M0, bool>>) Expression.Lambda<Func<VB\u0024AnonymousType_25<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting>, bool>>((Expression) Expression.Coalesce((Expression) Expression.And((Expression) Expression.And((Expression) Expression.And((Expression) Expression.Convert((Expression) Expression.And((Expression) Expression.And((Expression) Expression.Equal(\u0024VB\u0024It.pl.SEPlantId, 1, true, (MethodInfo) null), (Expression) Expression.Equal((Expression) Expression.Call((Expression) null, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (Operators.CompareString)), (Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_25<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting>.get_al), __typeref (VB\u0024AnonymousType_25<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (AssemblyLine.get_AssemLineAbbrv))), (Expression) Expression.Field((Expression) Expression.Constant((object) closure85, typeof (clsRoutings._Closure\u0024__85)), FieldInfo.GetFieldFromHandle(__fieldref (clsRoutings._Closure\u0024__85.\u0024VB\u0024Local_AssemblyLine))), (Expression) Expression.Constant((object) false, typeof (bool))), (Expression) Expression.Constant((object) 0, typeof (int)))), (Expression) Expression.Equal((Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_25<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting>.get_sc), __typeref (VB\u0024AnonymousType_25<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (OrdSection.get_OrdSectsId))), (Expression) Expression.Field((Expression) Expression.Constant((object) closure85, typeof (clsRoutings._Closure\u0024__85)), FieldInfo.GetFieldFromHandle(__fieldref (clsRoutings._Closure\u0024__85.\u0024VB\u0024Local_SectionId))), true, (MethodInfo) null)), typeof (bool?)), (Expression) Expression.GreaterThan((Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_25<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting>.get_rt), __typeref (VB\u0024AnonymousType_25<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (SectionsRouting.get_RoutingActFinishDt))), (Expression) Expression.Convert((Expression) Expression.Field((Expression) Expression.Constant((object) closure85, typeof (clsRoutings._Closure\u0024__85)), FieldInfo.GetFieldFromHandle(__fieldref (clsRoutings._Closure\u0024__85.\u0024VB\u0024Local_ldDefaultDate))), typeof (DateTime?)), true, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (DateTime.op_GreaterThan)))), (Expression) Expression.LessThanOrEqual((Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_25<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting>.get_rt), __typeref (VB\u0024AnonymousType_25<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (SectionsRouting.get_RoutingActFinishDt))), (Expression) Expression.Convert((Expression) Expression.Field((Expression) Expression.Constant((object) closure85, typeof (clsRoutings._Closure\u0024__85)), FieldInfo.GetFieldFromHandle(__fieldref (clsRoutings._Closure\u0024__85.\u0024VB\u0024Local_CutoffDate))), typeof (DateTime?)), true, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (DateTime.op_LessThanOrEqual)))), (Expression) Expression.Convert((Expression) Expression.NotEqual((Expression) Expression.Call((Expression) null, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (Operators.CompareString)), (Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_25<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting>.get_rt), __typeref (VB\u0024AnonymousType_25<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (SectionsRouting.get_RoutingWorkCenter))), (Expression) Expression.Field((Expression) Expression.Constant((object) closure85, typeof (clsRoutings._Closure\u0024__85)), FieldInfo.GetFieldFromHandle(__fieldref (clsRoutings._Closure\u0024__85.\u0024VB\u0024Local_ldShipWC))), (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]{ parameterExpression })), (Expression<Func<M0, M1>>) (data => data.rt.RoutingSchStartDt)), (Expression<Func<M0, M1>>) (data => data.rt.RoutingRunTimeMin));
        if (source.Count<int?>() <= 0)
          return 0;
        IEnumerator<int?> enumerator;
        int num;
        try
        {
          enumerator = source.GetEnumerator();
          while (enumerator.MoveNext())
          {
            int current = (int) enumerator.Current;
            if (current < 60000)
              checked { num += current; }
            else
              checked { num += 1440; }
          }
        }
        finally
        {
          if (enumerator != null)
            enumerator.Dispose();
        }
        return num;
      }
    }

    public int rtnRoutingInProcessMin(string AssemblyLine, int SectionId, DateTime CutoffDate)
    {
      // ISSUE: object of a compiler-generated type is created
      // ISSUE: variable of a compiler-generated type
      clsRoutings._Closure\u0024__86 closure86 = new clsRoutings._Closure\u0024__86();
      // ISSUE: reference to a compiler-generated field
      closure86.\u0024VB\u0024Local_AssemblyLine = AssemblyLine;
      // ISSUE: reference to a compiler-generated field
      closure86.\u0024VB\u0024Local_SectionId = SectionId;
      // ISSUE: reference to a compiler-generated field
      closure86.\u0024VB\u0024Local_CutoffDate = CutoffDate;
      // ISSUE: reference to a compiler-generated field
      closure86.\u0024VB\u0024Local_ldDefaultDate = Conversions.ToDate("01/01/1901");
      // ISSUE: reference to a compiler-generated field
      string localAssemblyLine = closure86.\u0024VB\u0024Local_AssemblyLine;
      // ISSUE: reference to a compiler-generated field
      closure86.\u0024VB\u0024Local_ldShipWC = Operators.CompareString(localAssemblyLine, "SWBD", false) != 0 ? (Operators.CompareString(localAssemblyLine, "LVDO", false) != 0 ? "?" : "SHIP") : "SHIPPING";
      using (SE0085CTEntities1 se0085CtEntities1 = new SE0085CTEntities1())
      {
        se0085CtEntities1.Database.Connection.ConnectionString = this._CTConnection;
        ParameterExpression parameterExpression;
        // 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: 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: field reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: type reference
        // ISSUE: method reference
        // ISSUE: field reference
        IQueryable<int?> source = (IQueryable<int?>) Queryable.Select((IQueryable<M0>) Queryable.OrderBy(Queryable.Where((IQueryable<M0>) Queryable.Join((IQueryable<M0>) Queryable.Join((IQueryable<M0>) Queryable.Join((IQueryable<M0>) Queryable.Join((IQueryable<M0>) se0085CtEntities1.SEPlants, (IEnumerable<M1>) se0085CtEntities1.AssemblyLines, (Expression<Func<M0, M2>>) (pl => pl.SEPlantId), (Expression<Func<M1, M2>>) (al => al.SEPlant.SEPlantId), (Expression<Func<M0, M1, M3>>) ((pl, al) => new{ pl = pl, al = al })), (IEnumerable<M1>) se0085CtEntities1.OrderLines, (Expression<Func<M0, M2>>) (data => data.al.AssemLineId), (Expression<Func<M1, M2>>) (ol => ol.AssemblyLine.AssemLineId), (Expression<Func<M0, M1, M3>>) ((data, ol) => new{ \u0024VB\u0024It1 = data, 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.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{ pl = data.\u0024VB\u0024It1.\u0024VB\u0024It1.pl, al = data.\u0024VB\u0024It1.\u0024VB\u0024It1.al, ol = data.\u0024VB\u0024It1.ol, sc = data.sc, rt = rt })), (Expression<Func<M0, bool>>) Expression.Lambda<Func<VB\u0024AnonymousType_25<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting>, bool>>((Expression) Expression.Coalesce((Expression) Expression.And((Expression) Expression.And((Expression) Expression.And((Expression) Expression.And((Expression) Expression.Convert((Expression) Expression.And((Expression) Expression.And((Expression) Expression.Equal(\u0024VB\u0024It.pl.SEPlantId, 1, true, (MethodInfo) null), (Expression) Expression.Equal((Expression) Expression.Call((Expression) null, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (Operators.CompareString)), (Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_25<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting>.get_al), __typeref (VB\u0024AnonymousType_25<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (AssemblyLine.get_AssemLineAbbrv))), (Expression) Expression.Field((Expression) Expression.Constant((object) closure86, typeof (clsRoutings._Closure\u0024__86)), FieldInfo.GetFieldFromHandle(__fieldref (clsRoutings._Closure\u0024__86.\u0024VB\u0024Local_AssemblyLine))), (Expression) Expression.Constant((object) false, typeof (bool))), (Expression) Expression.Constant((object) 0, typeof (int)))), (Expression) Expression.Equal((Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_25<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting>.get_sc), __typeref (VB\u0024AnonymousType_25<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (OrdSection.get_OrdSectsId))), (Expression) Expression.Field((Expression) Expression.Constant((object) closure86, typeof (clsRoutings._Closure\u0024__86)), FieldInfo.GetFieldFromHandle(__fieldref (clsRoutings._Closure\u0024__86.\u0024VB\u0024Local_SectionId))), true, (MethodInfo) null)), typeof (bool?)), (Expression) Expression.GreaterThan((Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_25<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting>.get_rt), __typeref (VB\u0024AnonymousType_25<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (SectionsRouting.get_RoutingActStartDt))), (Expression) Expression.Convert((Expression) Expression.Field((Expression) Expression.Constant((object) closure86, typeof (clsRoutings._Closure\u0024__86)), FieldInfo.GetFieldFromHandle(__fieldref (clsRoutings._Closure\u0024__86.\u0024VB\u0024Local_ldDefaultDate))), typeof (DateTime?)), true, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (DateTime.op_GreaterThan)))), (Expression) Expression.LessThanOrEqual((Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_25<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting>.get_rt), __typeref (VB\u0024AnonymousType_25<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (SectionsRouting.get_RoutingActStartDt))), (Expression) Expression.Convert((Expression) Expression.Field((Expression) Expression.Constant((object) closure86, typeof (clsRoutings._Closure\u0024__86)), FieldInfo.GetFieldFromHandle(__fieldref (clsRoutings._Closure\u0024__86.\u0024VB\u0024Local_CutoffDate))), typeof (DateTime?)), true, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (DateTime.op_LessThanOrEqual)))), (Expression) Expression.Equal((Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_25<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting>.get_rt), __typeref (VB\u0024AnonymousType_25<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (SectionsRouting.get_RoutingActFinishDt))), (Expression) Expression.Convert((Expression) Expression.Field((Expression) Expression.Constant((object) closure86, typeof (clsRoutings._Closure\u0024__86)), FieldInfo.GetFieldFromHandle(__fieldref (clsRoutings._Closure\u0024__86.\u0024VB\u0024Local_ldDefaultDate))), typeof (DateTime?)), true, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (DateTime.op_Equality)))), (Expression) Expression.Convert((Expression) Expression.NotEqual((Expression) Expression.Call((Expression) null, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (Operators.CompareString)), (Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_25<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting>.get_rt), __typeref (VB\u0024AnonymousType_25<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (SectionsRouting.get_RoutingWorkCenter))), (Expression) Expression.Field((Expression) Expression.Constant((object) closure86, typeof (clsRoutings._Closure\u0024__86)), FieldInfo.GetFieldFromHandle(__fieldref (clsRoutings._Closure\u0024__86.\u0024VB\u0024Local_ldShipWC))), (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]{ parameterExpression })), (Expression<Func<M0, M1>>) (data => data.rt.RoutingSchStartDt)), (Expression<Func<M0, M1>>) (data => data.rt.RoutingRunTimeMin));
        if (source.Count<int?>() <= 0)
          return 0;
        IEnumerator<int?> enumerator;
        int num;
        try
        {
          enumerator = source.GetEnumerator();
          while (enumerator.MoveNext())
          {
            int current = (int) enumerator.Current;
            if (current < 60000)
              checked { num += current; }
            else
              checked { num += 1440; }
          }
        }
        finally
        {
          if (enumerator != null)
            enumerator.Dispose();
        }
        return num;
      }
    }

    public int rtnRoutingCurrentWCMin(string AssemblyLine, int SectionId, string WIPWorkCenter, DateTime CutoffDate)
    {
      // ISSUE: object of a compiler-generated type is created
      // ISSUE: variable of a compiler-generated type
      clsRoutings._Closure\u0024__87 closure87 = new clsRoutings._Closure\u0024__87();
      // ISSUE: reference to a compiler-generated field
      closure87.\u0024VB\u0024Local_CutoffDate = CutoffDate;
      // ISSUE: reference to a compiler-generated field
      closure87.\u0024VB\u0024Local_WIPWorkCenter = WIPWorkCenter;
      // ISSUE: reference to a compiler-generated field
      closure87.\u0024VB\u0024Local_AssemblyLine = AssemblyLine;
      // ISSUE: reference to a compiler-generated field
      closure87.\u0024VB\u0024Local_SectionId = SectionId;
      // ISSUE: reference to a compiler-generated field
      closure87.\u0024VB\u0024Local_ldDefaultDate = Conversions.ToDate("01/01/1901");
      using (SE0085CTEntities1 se0085CtEntities1 = new SE0085CTEntities1())
      {
        se0085CtEntities1.Database.Connection.ConnectionString = this._CTConnection;
        ParameterExpression parameterExpression;
        // 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: 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
        IQueryable<int?> source = (IQueryable<int?>) Queryable.Select((IQueryable<M0>) Queryable.OrderBy(Queryable.Where((IQueryable<M0>) Queryable.Join((IQueryable<M0>) Queryable.Join((IQueryable<M0>) Queryable.Join((IQueryable<M0>) Queryable.Join((IQueryable<M0>) se0085CtEntities1.SEPlants, (IEnumerable<M1>) se0085CtEntities1.AssemblyLines, (Expression<Func<M0, M2>>) (pl => pl.SEPlantId), (Expression<Func<M1, M2>>) (al => al.SEPlant.SEPlantId), (Expression<Func<M0, M1, M3>>) ((pl, al) => new{ pl = pl, al = al })), (IEnumerable<M1>) se0085CtEntities1.OrderLines, (Expression<Func<M0, M2>>) (data => data.al.AssemLineId), (Expression<Func<M1, M2>>) (ol => ol.AssemblyLine.AssemLineId), (Expression<Func<M0, M1, M3>>) ((data, ol) => new{ \u0024VB\u0024It1 = data, 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.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{ pl = data.\u0024VB\u0024It1.\u0024VB\u0024It1.pl, al = data.\u0024VB\u0024It1.\u0024VB\u0024It1.al, ol = data.\u0024VB\u0024It1.ol, sc = data.sc, rt = rt })), (Expression<Func<M0, bool>>) Expression.Lambda<Func<VB\u0024AnonymousType_25<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting>, bool>>((Expression) Expression.Coalesce((Expression) Expression.And((Expression) Expression.And((Expression) Expression.And((Expression) Expression.Convert((Expression) Expression.And((Expression) Expression.And((Expression) Expression.Equal(\u0024VB\u0024It.pl.SEPlantId, 1, true, (MethodInfo) null), (Expression) Expression.Equal((Expression) Expression.Call((Expression) null, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (Operators.CompareString)), (Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_25<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting>.get_al), __typeref (VB\u0024AnonymousType_25<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (AssemblyLine.get_AssemLineAbbrv))), (Expression) Expression.Field((Expression) Expression.Constant((object) closure87, typeof (clsRoutings._Closure\u0024__87)), FieldInfo.GetFieldFromHandle(__fieldref (clsRoutings._Closure\u0024__87.\u0024VB\u0024Local_AssemblyLine))), (Expression) Expression.Constant((object) false, typeof (bool))), (Expression) Expression.Constant((object) 0, typeof (int)))), (Expression) Expression.Equal((Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_25<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting>.get_sc), __typeref (VB\u0024AnonymousType_25<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (OrdSection.get_OrdSectsId))), (Expression) Expression.Field((Expression) Expression.Constant((object) closure87, typeof (clsRoutings._Closure\u0024__87)), FieldInfo.GetFieldFromHandle(__fieldref (clsRoutings._Closure\u0024__87.\u0024VB\u0024Local_SectionId))), true, (MethodInfo) null)), typeof (bool?)), (Expression) Expression.GreaterThan((Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_25<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting>.get_rt), __typeref (VB\u0024AnonymousType_25<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (SectionsRouting.get_RoutingActStartDt))), (Expression) Expression.Convert((Expression) Expression.Field((Expression) Expression.Constant((object) closure87, typeof (clsRoutings._Closure\u0024__87)), FieldInfo.GetFieldFromHandle(__fieldref (clsRoutings._Closure\u0024__87.\u0024VB\u0024Local_ldDefaultDate))), typeof (DateTime?)), true, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (DateTime.op_GreaterThan)))), (Expression) Expression.LessThanOrEqual((Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_25<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting>.get_rt), __typeref (VB\u0024AnonymousType_25<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (SectionsRouting.get_RoutingActFinishDt))), (Expression) Expression.Convert((Expression) Expression.Field((Expression) Expression.Constant((object) closure87, typeof (clsRoutings._Closure\u0024__87)), FieldInfo.GetFieldFromHandle(__fieldref (clsRoutings._Closure\u0024__87.\u0024VB\u0024Local_CutoffDate))), typeof (DateTime?)), true, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (DateTime.op_LessThanOrEqual)))), (Expression) Expression.Convert((Expression) Expression.Equal((Expression) Expression.Call((Expression) null, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (Operators.CompareString)), (Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_25<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting>.get_rt), __typeref (VB\u0024AnonymousType_25<SEPlant, AssemblyLine, OrderLine, OrdSection, SectionsRouting>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (SectionsRouting.get_RoutingWorkCenter))), (Expression) Expression.Field((Expression) Expression.Constant((object) closure87, typeof (clsRoutings._Closure\u0024__87)), FieldInfo.GetFieldFromHandle(__fieldref (clsRoutings._Closure\u0024__87.\u0024VB\u0024Local_WIPWorkCenter))), (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]{ parameterExpression })), (Expression<Func<M0, M1>>) (data => data.rt.RoutingSchStartDt)), (Expression<Func<M0, M1>>) (data => data.rt.RoutingRunTimeMin));
        if (source.Count<int?>() <= 0)
          return 0;
        IEnumerator<int?> enumerator;
        int num;
        try
        {
          enumerator = source.GetEnumerator();
          while (enumerator.MoveNext())
          {
            int current = (int) enumerator.Current;
            if (current < 60000)
              checked { num += current; }
            else
              checked { num += 1440; }
          }
        }
        finally
        {
          if (enumerator != null)
            enumerator.Dispose();
        }
        return num;
      }
    }

    public string rtnWIPWC4Date(string AssemblyLine, int SectId, DateTime CutoffDate)
    {
      string str = "";
      DateTime date = Conversions.ToDate("01-01-1901");
      Conversions.ToDate("01-01-2013");
      int num1 = 1;
      Hashtable hashtable1 = new Hashtable();
      string Left = AssemblyLine;
      if (Operators.CompareString(Left, "SWBD", false) == 0)
      {
        hashtable1.Add((object) "SPWIRKIT", (object) num1);
        int num2 = checked (num1 + 1);
        hashtable1.Add((object) "SPREWIRE", (object) num2);
        int num3 = checked (num2 + 1);
        hashtable1.Add((object) "INSULBUS", (object) num3);
        int num4 = checked (num3 + 1);
        hashtable1.Add((object) "SPPALLET", (object) num4);
        int num5 = checked (num4 + 1);
        hashtable1.Add((object) "FRAMEKIT", (object) num5);
        int num6 = checked (num5 + 1);
        hashtable1.Add((object) "FRAMES", (object) num6);
        int num7 = checked (num6 + 1);
        hashtable1.Add((object) "TBMOUNT", (object) num7);
        int num8 = checked (num7 + 1);
        hashtable1.Add((object) "BNEUTRAL", (object) num8);
        int num9 = checked (num8 + 1);
        hashtable1.Add((object) "DEVMOUNT", (object) num9);
        int num10 = checked (num9 + 1);
        hashtable1.Add((object) "CMPMOUNT", (object) num10);
        int num11 = checked (num10 + 1);
        hashtable1.Add((object) "COVERS", (object) num11);
        int num12 = checked (num11 + 1);
        hashtable1.Add((object) "STANDUP", (object) num12);
        int num13 = checked (num12 + 1);
        hashtable1.Add((object) "ILTBCONN", (object) num13);
        int num14 = checked (num13 + 1);
        hashtable1.Add((object) "STDCONN", (object) num14);
        int num15 = checked (num14 + 1);
        hashtable1.Add((object) "WIRING", (object) num15);
        int num16 = checked (num15 + 1);
        hashtable1.Add((object) "INSPTEST", (object) num16);
        int num17 = checked (num16 + 1);
        hashtable1.Add((object) "FINALPRP", (object) num17);
        int num18 = checked (num17 + 1);
        hashtable1.Add((object) "SHIPWITH", (object) num18);
        int num19 = checked (num18 + 1);
        hashtable1.Add((object) "CLOSEUP", (object) num19);
        int num20 = checked (num19 + 1);
        hashtable1.Add((object) "FPY", (object) num20);
        int num21 = checked (num20 + 1);
        hashtable1.Add((object) "SHIPPING", (object) num21);
        num1 = checked (num21 + 0);
      }
      else if (Operators.CompareString(Left, "LVDO", false) == 0)
      {
        hashtable1.Add((object) "PNLWKIT", (object) num1);
        int num2 = checked (num1 + 1);
        hashtable1.Add((object) "PNLWIRE", (object) num2);
        int num3 = checked (num2 + 1);
        hashtable1.Add((object) "STRUCT1", (object) num3);
        int num4 = checked (num3 + 1);
        hashtable1.Add((object) "RISER", (object) num4);
        int num5 = checked (num4 + 1);
        hashtable1.Add((object) "STRUCT2", (object) num5);
        int num6 = checked (num5 + 1);
        hashtable1.Add((object) "HORIZON", (object) num6);
        int num7 = checked (num6 + 1);
        hashtable1.Add((object) "VERTICAL", (object) num7);
        int num8 = checked (num7 + 1);
        hashtable1.Add((object) "ROOFSTAN", (object) num8);
        int num9 = checked (num8 + 1);
        hashtable1.Add((object) "BOLTDOWN", (object) num9);
        int num10 = checked (num9 + 1);
        hashtable1.Add((object) "PANINSTL", (object) num10);
        int num11 = checked (num10 + 1);
        hashtable1.Add((object) "CBLUGDR", (object) num11);
        int num12 = checked (num11 + 1);
        hashtable1.Add((object) "STRUWIRE", (object) num12);
        int num13 = checked (num12 + 1);
        hashtable1.Add((object) "METESTSW", (object) num13);
        int num14 = checked (num13 + 1);
        hashtable1.Add((object) "ELTESTLB", (object) num14);
        int num15 = checked (num14 + 1);
        hashtable1.Add((object) "PACKOUT", (object) num15);
        int num16 = checked (num15 + 1);
        hashtable1.Add((object) "NEMA3R", (object) num16);
        int num17 = checked (num16 + 1);
        hashtable1.Add((object) "SHIP", (object) num17);
        num1 = checked (num17 + 0);
      }
      List<SE0085.StCl.scSectionsRoutingInfo> sectionsRoutingInfoList1 = new List<SE0085.StCl.scSectionsRoutingInfo>();
      List<SE0085.StCl.scSectionsRoutingInfo> sectionsRoutingInfoList2 = this.rtnRoutingWorkCenters(SectId, AssemblyLine);
      Hashtable hashtable2 = new Hashtable();
      if (sectionsRoutingInfoList2 != null)
      {
        List<SE0085.StCl.scSectionsRoutingInfo>.Enumerator enumerator;
        try
        {
          enumerator = sectionsRoutingInfoList2.GetEnumerator();
          while (enumerator.MoveNext())
          {
            SE0085.StCl.scSectionsRoutingInfo current = enumerator.Current;
            if (hashtable1.ContainsKey((object) current.RoutingWorkCenter))
            {
              int integer = Conversions.ToInteger(hashtable1[(object) current.RoutingWorkCenter]);
              if (!hashtable2.ContainsKey((object) integer))
                hashtable2.Add((object) integer, (object) current);
            }
          }
        }
        finally
        {
          enumerator.Dispose();
        }
        int num2 = num1;
        while (num2 >= 1)
        {
          if (hashtable2.ContainsKey((object) num2))
          {
            SE0085.StCl.scSectionsRoutingInfo sectionsRoutingInfo1 = new SE0085.StCl.scSectionsRoutingInfo();
            SE0085.StCl.scSectionsRoutingInfo sectionsRoutingInfo2 = (SE0085.StCl.scSectionsRoutingInfo) hashtable2[(object) num2];
            if (DateTime.Compare(sectionsRoutingInfo2.RoutingActStartDt, date) > 0 & DateTime.Compare(sectionsRoutingInfo2.RoutingActStartDt, CutoffDate) <= 0)
            {
              str = sectionsRoutingInfo2.RoutingWorkCenter;
              break;
            }
            if (DateTime.Compare(sectionsRoutingInfo2.RoutingActStartDt, date) <= 0 & DateTime.Compare(sectionsRoutingInfo2.RoutingActFinishDt, date) <= 0)
            {
              SE0085.StCl.scSectionsRoutingInfo sectionsRoutingInfo3 = new SE0085.StCl.scSectionsRoutingInfo();
              int num3 = checked (num2 - 1);
              while (num3 > 0)
              {
                if (hashtable2.ContainsKey((object) num3))
                {
                  SE0085.StCl.scSectionsRoutingInfo sectionsRoutingInfo4 = (SE0085.StCl.scSectionsRoutingInfo) hashtable2[(object) num3];
                  if (DateTime.Compare(sectionsRoutingInfo4.RoutingActFinishDt, date) > 0 & DateTime.Compare(sectionsRoutingInfo4.RoutingActStartDt, CutoffDate) <= 0)
                  {
                    str = sectionsRoutingInfo2.RoutingWorkCenter;
                    goto label_27;
                  }
                  else
                    break;
                }
                else
                  checked { num3 += -1; }
              }
            }
          }
          checked { num2 += -1; }
        }
      }
label_27:
      return str;
    }

    public enum emBrkOrderCond
    {
      AllSectionsStartedWC,
      OneSectionStartedWC,
    }

    public struct rltBklWIP
    {
      public bool IsWcRequired;
      public bool IsWcBacklog;
      public bool IsWcWIPq;
      public bool IsWcWIPip;
      public bool IsWcComplete;
      public string WcCurrent;
      public TimeSpan OdSchedule;

      public rltBklWIP(bool InitStructure)
      {
        this = new clsRoutings.rltBklWIP();
        if (!InitStructure)
          return;
        this.IsWcRequired = false;
        this.IsWcBacklog = false;
        this.IsWcWIPip = false;
        this.IsWcWIPq = false;
        this.IsWcComplete = false;
        this.WcCurrent = "";
      }

      public void CalProgress(DateTime CurrentPoint)
      {
        this.OdSchedule = CurrentPoint - DateTime.Now;
      }

      public void CalProgressComplete(DateTime ScheduledFinish, DateTime ActualFinish)
      {
        this.OdSchedule = ScheduledFinish - ActualFinish;
      }
    }
  }
}
