// Decompiled with JetBrains decompiler
// Type: SE0085.CTdB.clsBackorders
// 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 LCL;
using Microsoft.VisualBasic;
using Microsoft.VisualBasic.CompilerServices;
using SE0085.dBc;
using SE0085.StCl;
using System;
using System.Collections;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Linq.Expressions;
using System.Reflection;
using System.Threading;

namespace SE0085.CTdB
{
  public class clsBackorders
  {
    private scLevels _Plant;
    private scLevels _AssemblyLine;
    private clsLogWriter lcLogWriter;
    private ecDataInterface lcBWT2;
    private string _CTConnection;

    public clsBackorders(scLevels Plant, scLevels AssemblyLine)
    {
      this._Plant = Plant;
      this._AssemblyLine = AssemblyLine;
      this.lcLogWriter = new clsLogWriter("C:\\LogFiles\\BOUImport.log");
      this.lcBWT2 = new ecDataInterface();
      clsDBC clsDbc = new clsDBC();
      clsDbc.GetServer((object) "SE0085CTEntities1");
      this._CTConnection = Conversions.ToString(clsDbc.ConnectionString);
    }

    ~clsBackorders()
    {
      try
      {
        this.lcLogWriter.logClose();
        this.lcLogWriter = (clsLogWriter) null;
      }
      catch (Exception ex)
      {
        ProjectData.SetProjectError(ex);
        ProjectData.ClearProjectError();
      }
      // ISSUE: explicit finalizer call
      base.Finalize();
    }

    public void InsertBackOrderLines(scOrderImportInfo BackOrders)
    {
      // ISSUE: object of a compiler-generated type is created
      // ISSUE: variable of a compiler-generated type
      clsBackorders._Closure\u0024__95 closure95 = new clsBackorders._Closure\u0024__95();
      string str1 = "";
      clsEngineMES clsEngineMes = new clsEngineMES(this._Plant, this._AssemblyLine);
      // ISSUE: reference to a compiler-generated field
      closure95.\u0024VB\u0024Local_ldBackOrder = new scOrderImportInfo();
      // ISSUE: reference to a compiler-generated field
      closure95.\u0024VB\u0024Local_ldBackOrder = BackOrders;
      using (SE0085CTEntities1 se0085CtEntities1 = new SE0085CTEntities1())
      {
        // ISSUE: object of a compiler-generated type is created
        // ISSUE: variable of a compiler-generated type
        clsBackorders._Closure\u0024__95._Closure\u0024__96 closure96 = new clsBackorders._Closure\u0024__95._Closure\u0024__96();
        se0085CtEntities1.Database.Connection.ConnectionString = this._CTConnection;
        ParameterExpression parameterExpression1;
        // ISSUE: reference to a compiler-generated field
        IQueryable<AssemblyLine> source1 = (IQueryable<AssemblyLine>) Queryable.Select(Queryable.Where((IQueryable<M0>) Queryable.Join((IQueryable<M0>) se0085CtEntities1.SEPlants, (IEnumerable<M1>) se0085CtEntities1.AssemblyLines, (Expression<Func<M0, M2>>) (p => p.SEPlantId), (Expression<Func<M1, M2>>) (a => a.SEPlant.SEPlantId), (Expression<Func<M0, M1, M3>>) ((p, a) => new{ p = p, a = a })), (Expression<Func<M0, bool>>) Expression.Lambda<Func<VB\u0024AnonymousType_5<SEPlant, AssemblyLine>, bool>>((Expression) Expression.Equal(\u0024VB\u0024It.a.AssemLineId, closure95.\u0024VB\u0024Local_ldBackOrder.AssemblyLine.LevelId, true, (MethodInfo) null), new ParameterExpression[1]
        {
          parameterExpression1
        })), (Expression<Func<M0, M1>>) (data => data.a));
        if (source1.Count<AssemblyLine>() == 0)
        {
          // ISSUE: reference to a compiler-generated field
          int num1 = (int) Interaction.MsgBox((object) ("Error loading Assembly Line data, aborting MES import for AssemblyLineId; " + Conversions.ToString(closure95.\u0024VB\u0024Local_ldBackOrder.AssemblyLine.LevelId)), MsgBoxStyle.Information, (object) "ONE QMS MES Import Error - E0001");
        }
        else if (source1.Count<AssemblyLine>() == 1)
        {
          AssemblyLine assemblyLine = source1.First<AssemblyLine>();
          // ISSUE: method reference
          // ISSUE: reference to a compiler-generated field
          IQueryable<SEOrder> source2 = (IQueryable<SEOrder>) Queryable.Select<SEOrder, SEOrder>(Queryable.Where<SEOrder>((IQueryable<M0>) se0085CtEntities1.SEOrders, (Expression<Func<M0, bool>>) (o => Expression.Call((Expression) null, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (Operators.CompareString)), o.OrderFO, closure95.\u0024VB\u0024Local_ldBackOrder.OrderFO, false) == 0)), (Expression<Func<M0, M1>>) (o => o));
          SEOrder entity;
          if (source2.Count<SEOrder>() == 0)
          {
            // ISSUE: reference to a compiler-generated field
            if (DateTime.Compare(closure95.\u0024VB\u0024Local_ldBackOrder.OrderLineShipDt, Conversions.ToDate("12/31/2039")) == 0)
              return;
            entity = new SEOrder();
            // ISSUE: reference to a compiler-generated field
            entity.OrderFO = closure95.\u0024VB\u0024Local_ldBackOrder.OrderFO;
            // ISSUE: reference to a compiler-generated field
            entity.OrderJobName = closure95.\u0024VB\u0024Local_ldBackOrder.OrderJobName;
            // ISSUE: reference to a compiler-generated field
            entity.OrderPurchaser = closure95.\u0024VB\u0024Local_ldBackOrder.OrderPurchaser;
            se0085CtEntities1.SEOrders.Add(entity);
            se0085CtEntities1.SaveChanges();
          }
          else if (source2.Count<SEOrder>() == 1)
          {
            entity = source2.First<SEOrder>();
            // ISSUE: reference to a compiler-generated field
            // ISSUE: reference to a compiler-generated field
            if (!(Operators.CompareString(entity.OrderJobName, closure95.\u0024VB\u0024Local_ldBackOrder.OrderJobName, false) == 0 & Operators.CompareString(entity.OrderPurchaser, closure95.\u0024VB\u0024Local_ldBackOrder.OrderPurchaser, false) == 0))
            {
              // ISSUE: reference to a compiler-generated field
              if (!closure95.\u0024VB\u0024Local_ldBackOrder.OrderJobName.Contains("Part"))
              {
                // ISSUE: reference to a compiler-generated field
                entity.OrderJobName = closure95.\u0024VB\u0024Local_ldBackOrder.OrderJobName;
              }
              // ISSUE: reference to a compiler-generated field
              entity.OrderPurchaser = closure95.\u0024VB\u0024Local_ldBackOrder.OrderPurchaser;
              se0085CtEntities1.SaveChanges();
            }
          }
          else
          {
            // ISSUE: reference to a compiler-generated field
            int num2 = (int) Interaction.MsgBox((object) ("Multiple Order numbers found, aborting MES import for Order; " + closure95.\u0024VB\u0024Local_ldBackOrder.OrderFO), MsgBoxStyle.Information, (object) "ONE QMS MES Import Error - E0001");
            return;
          }
          // ISSUE: reference to a compiler-generated field
          closure96.\u0024VB\u0024Local_ldOrderLine = (OrderLine) null;
          // ISSUE: method reference
          // ISSUE: reference to a compiler-generated field
          // ISSUE: method reference
          // ISSUE: reference to a compiler-generated field
          // ISSUE: method reference
          // ISSUE: reference to a compiler-generated field
          // ISSUE: method reference
          // ISSUE: reference to a compiler-generated field
          IQueryable<OrderLine> source3 = (IQueryable<OrderLine>) Queryable.Select(Queryable.Where((IQueryable<M0>) Queryable.Join((IQueryable<M0>) se0085CtEntities1.SEOrders, (IEnumerable<M1>) se0085CtEntities1.OrderLines, (Expression<Func<M0, M2>>) (o => o.OrderId), (Expression<Func<M1, M2>>) (l => l.SEOrder.OrderId), (Expression<Func<M0, M1, M3>>) ((o, l) => new{ o = o, l = l })), (Expression<Func<M0, bool>>) (data => Expression.Call((Expression) null, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (Operators.CompareString)), data.o.OrderFO, closure95.\u0024VB\u0024Local_ldBackOrder.OrderFO, false) == 0 & Expression.Call((Expression) null, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (Operators.CompareString)), data.l.OrderLineNum, closure95.\u0024VB\u0024Local_ldBackOrder.OrderLineNum, false) == 0 & Expression.Call((Expression) null, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (Operators.CompareString)), data.l.OrderLineSL, closure95.\u0024VB\u0024Local_ldBackOrder.OrderLineSL, false) == 0 & Expression.Call((Expression) null, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (Operators.CompareString)), data.l.OrderLineSS, closure95.\u0024VB\u0024Local_ldBackOrder.OrderLineSS, false) == 0)), (Expression<Func<M0, M1>>) (data => data.l));
          DateTime? nullable1;
          bool? nullable2;
          bool? nullable3;
          bool? nullable4;
          bool? nullable5;
          bool? nullable6;
          bool? nullable7;
          bool? nullable8;
          bool? nullable9;
          bool? nullable10;
          DateTime? nullable11;
          if (source3.Count<OrderLine>() == 0)
          {
            // ISSUE: reference to a compiler-generated field
            if (DateTime.Compare(closure95.\u0024VB\u0024Local_ldBackOrder.OrderLineShipDt, Conversions.ToDate("12/31/2039")) == 0)
              return;
            // ISSUE: reference to a compiler-generated field
            closure96.\u0024VB\u0024Local_ldOrderLine = new OrderLine();
            // ISSUE: reference to a compiler-generated field
            // ISSUE: reference to a compiler-generated field
            closure96.\u0024VB\u0024Local_ldOrderLine.OrderLineNum = closure95.\u0024VB\u0024Local_ldBackOrder.OrderLineNum;
            // ISSUE: reference to a compiler-generated field
            // ISSUE: reference to a compiler-generated field
            closure96.\u0024VB\u0024Local_ldOrderLine.OrderLineQty = (int?) closure95.\u0024VB\u0024Local_ldBackOrder.OrderLineQty;
            // ISSUE: reference to a compiler-generated field
            // ISSUE: reference to a compiler-generated field
            closure96.\u0024VB\u0024Local_ldOrderLine.OrderLineShipDt = (DateTime?) closure95.\u0024VB\u0024Local_ldBackOrder.OrderLineShipDt;
            // ISSUE: reference to a compiler-generated field
            // ISSUE: reference to a compiler-generated field
            closure96.\u0024VB\u0024Local_ldOrderLine.OrderLineShipped = (bool?) closure95.\u0024VB\u0024Local_ldBackOrder.OrderLineShipped;
            // ISSUE: reference to a compiler-generated field
            // ISSUE: reference to a compiler-generated field
            closure96.\u0024VB\u0024Local_ldOrderLine.OrderLineShippedDt = (DateTime?) closure95.\u0024VB\u0024Local_ldBackOrder.OrderLineShippedDt;
            // ISSUE: reference to a compiler-generated field
            // ISSUE: reference to a compiler-generated field
            closure96.\u0024VB\u0024Local_ldOrderLine.OrderLineSL = closure95.\u0024VB\u0024Local_ldBackOrder.OrderLineSL;
            // ISSUE: reference to a compiler-generated field
            // ISSUE: reference to a compiler-generated field
            closure96.\u0024VB\u0024Local_ldOrderLine.OrderLineSS = closure95.\u0024VB\u0024Local_ldBackOrder.OrderLineSS;
            // ISSUE: reference to a compiler-generated field
            // ISSUE: reference to a compiler-generated field
            closure96.\u0024VB\u0024Local_ldOrderLine.OrderLineTargetDt = (DateTime?) closure95.\u0024VB\u0024Local_ldBackOrder.OrderLineTargetDt;
            // ISSUE: reference to a compiler-generated field
            // ISSUE: reference to a compiler-generated field
            closure96.\u0024VB\u0024Local_ldOrderLine.OrderLineAssyStartDt = (DateTime?) closure95.\u0024VB\u0024Local_ldBackOrder.OrderLineOrgAssyStDt;
            // ISSUE: reference to a compiler-generated field
            entity.OrderLines.Add(closure96.\u0024VB\u0024Local_ldOrderLine);
            // ISSUE: reference to a compiler-generated field
            assemblyLine.OrderLines.Add(closure96.\u0024VB\u0024Local_ldOrderLine);
            int num2 = 1;
            // ISSUE: reference to a compiler-generated field
            int ordSectsCnt = closure95.\u0024VB\u0024Local_ldBackOrder.OrdSectsCnt;
            // ISSUE: reference to a compiler-generated field
            closure95.\u0024VB\u0024Local_ldCounter01 = num2;
            // ISSUE: reference to a compiler-generated field
            while (closure95.\u0024VB\u0024Local_ldCounter01 <= ordSectsCnt)
            {
              // ISSUE: reference to a compiler-generated field
              // ISSUE: reference to a compiler-generated field
              closure96.\u0024VB\u0024Local_ldOrderLine.OrdSections.Add(new OrdSection()
              {
                OrdSectsNum = closure95.\u0024VB\u0024Local_ldCounter01,
                OrdSectShipSpt = (int?) 0,
                OrdSectsRelActDt = (DateTime?) Conversions.ToDate("01/01/1901"),
                OrdSectsRelSchDt = (DateTime?) Conversions.ToDate("01/01/1901"),
                OrdSectsFabActDt = (DateTime?) Conversions.ToDate("01/01/1901"),
                OrdSectsFabSchDt = (DateTime?) Conversions.ToDate("01/01/1901"),
                OrdSectsRelMfg = (DateTime?) Conversions.ToDate("01/01/1901")
              });
              // ISSUE: reference to a compiler-generated field
              checked { ++closure95.\u0024VB\u0024Local_ldCounter01; }
            }
            se0085CtEntities1.SaveChanges();
          }
          else if (source3.Count<OrderLine>() == 1)
          {
            // ISSUE: reference to a compiler-generated field
            closure96.\u0024VB\u0024Local_ldOrderLine = source3.First<OrderLine>();
            // ISSUE: reference to a compiler-generated field
            // ISSUE: reference to a compiler-generated field
            closure96.\u0024VB\u0024Local_ldOrderLine.OrderLineQty = (int?) closure95.\u0024VB\u0024Local_ldBackOrder.OrderLineQty;
            // ISSUE: reference to a compiler-generated field
            DateTime orderLineShipDt1 = closure95.\u0024VB\u0024Local_ldBackOrder.OrderLineShipDt;
            // ISSUE: reference to a compiler-generated field
            nullable1 = closure96.\u0024VB\u0024Local_ldOrderLine.OrderLineShipDt;
            bool? nullable12;
            if (!nullable1.HasValue)
            {
              nullable12 = new bool?();
            }
            else
            {
              nullable2 = new bool?(DateTime.Compare(nullable1.GetValueOrDefault(), orderLineShipDt1) == 0);
              nullable12 = nullable2;
            }
            nullable3 = nullable12;
            DateTime date1 = Conversions.ToDate("01/01/1901");
            // ISSUE: reference to a compiler-generated field
            DateTime? orderLineShipDt2 = closure96.\u0024VB\u0024Local_ldOrderLine.OrderLineShipDt;
            bool? nullable13;
            if (!orderLineShipDt2.HasValue)
            {
              nullable13 = new bool?();
            }
            else
            {
              nullable4 = new bool?(DateTime.Compare(orderLineShipDt2.GetValueOrDefault(), date1) == 0);
              nullable13 = nullable4;
            }
            nullable5 = nullable13;
            bool? nullable14;
            if (!nullable3.HasValue || !nullable3.GetValueOrDefault())
            {
              if (!nullable5.HasValue)
                nullable14 = new bool?();
              else if (!nullable5.GetValueOrDefault())
              {
                nullable14 = nullable3;
              }
              else
              {
                nullable6 = new bool?(true);
                nullable14 = nullable6;
              }
            }
            else
            {
              nullable7 = new bool?(true);
              nullable14 = nullable7;
            }
            nullable8 = nullable14;
            bool? nullable15;
            if (!nullable8.HasValue)
            {
              nullable15 = new bool?();
            }
            else
            {
              nullable9 = new bool?(!nullable8.GetValueOrDefault());
              nullable15 = nullable9;
            }
            nullable10 = nullable15;
            if (nullable10.GetValueOrDefault())
            {
              clsLogWriter lcLogWriter = this.lcLogWriter;
              // ISSUE: reference to a compiler-generated field
              string[] strArray1 = new string[6]
              {
                "Order ",
                closure95.\u0024VB\u0024Local_ldBackOrder.FOLineSLSS,
                " Data Changed - Current Ship Date From; ",
                null,
                null,
                null
              };
              string[] strArray2 = strArray1;
              int index = 3;
              // ISSUE: reference to a compiler-generated field
              nullable11 = closure96.\u0024VB\u0024Local_ldOrderLine.OrderLineShipDt;
              string str2 = nullable11.HasValue ? Conversions.ToString(nullable11.GetValueOrDefault()) : (string) null;
              strArray2[index] = str2;
              strArray1[4] = " To: ";
              // ISSUE: reference to a compiler-generated field
              strArray1[5] = Conversions.ToString(closure95.\u0024VB\u0024Local_ldBackOrder.OrderLineShipDt);
              string logMessage = string.Concat(strArray1);
              lcLogWriter.logData(logMessage);
            }
            // ISSUE: reference to a compiler-generated field
            // ISSUE: reference to a compiler-generated field
            closure96.\u0024VB\u0024Local_ldOrderLine.OrderLineShipDt = (DateTime?) closure95.\u0024VB\u0024Local_ldBackOrder.OrderLineShipDt;
            // ISSUE: reference to a compiler-generated field
            // ISSUE: reference to a compiler-generated field
            closure96.\u0024VB\u0024Local_ldOrderLine.OrderLineShipped = (bool?) closure95.\u0024VB\u0024Local_ldBackOrder.OrderLineShipped;
            // ISSUE: reference to a compiler-generated field
            DateTime orderLineShippedDt1 = closure95.\u0024VB\u0024Local_ldBackOrder.OrderLineShippedDt;
            // ISSUE: reference to a compiler-generated field
            nullable11 = closure96.\u0024VB\u0024Local_ldOrderLine.OrderLineShippedDt;
            bool? nullable16;
            if (!nullable11.HasValue)
            {
              nullable16 = new bool?();
            }
            else
            {
              nullable8 = new bool?(DateTime.Compare(nullable11.GetValueOrDefault(), orderLineShippedDt1) == 0);
              nullable16 = nullable8;
            }
            nullable6 = nullable16;
            DateTime date2 = Conversions.ToDate("01/01/1901");
            // ISSUE: reference to a compiler-generated field
            DateTime? orderLineShippedDt2 = closure96.\u0024VB\u0024Local_ldOrderLine.OrderLineShippedDt;
            bool? nullable17;
            if (!orderLineShippedDt2.HasValue)
            {
              nullable17 = new bool?();
            }
            else
            {
              nullable10 = new bool?(DateTime.Compare(orderLineShippedDt2.GetValueOrDefault(), date2) == 0);
              nullable17 = nullable10;
            }
            nullable5 = nullable17;
            bool? nullable18;
            if (!nullable6.HasValue || !nullable6.GetValueOrDefault())
            {
              if (!nullable5.HasValue)
                nullable18 = new bool?();
              else if (!nullable5.GetValueOrDefault())
              {
                nullable18 = nullable6;
              }
              else
              {
                nullable3 = new bool?(true);
                nullable18 = nullable3;
              }
            }
            else
            {
              nullable9 = new bool?(true);
              nullable18 = nullable9;
            }
            nullable2 = nullable18;
            bool? nullable19;
            if (!nullable2.HasValue)
            {
              nullable19 = new bool?();
            }
            else
            {
              nullable7 = new bool?(!nullable2.GetValueOrDefault());
              nullable19 = nullable7;
            }
            nullable4 = nullable19;
            if (nullable4.GetValueOrDefault())
            {
              clsLogWriter lcLogWriter = this.lcLogWriter;
              // ISSUE: reference to a compiler-generated field
              string[] strArray1 = new string[6]
              {
                "Order ",
                closure95.\u0024VB\u0024Local_ldBackOrder.FOLineSLSS,
                " Data Changed - Shipped Date From; ",
                null,
                null,
                null
              };
              string[] strArray2 = strArray1;
              int index = 3;
              // ISSUE: reference to a compiler-generated field
              nullable1 = closure96.\u0024VB\u0024Local_ldOrderLine.OrderLineShippedDt;
              string str2 = nullable1.HasValue ? Conversions.ToString(nullable1.GetValueOrDefault()) : (string) null;
              strArray2[index] = str2;
              strArray1[4] = " To: ";
              // ISSUE: reference to a compiler-generated field
              strArray1[5] = Conversions.ToString(closure95.\u0024VB\u0024Local_ldBackOrder.OrderLineShippedDt);
              string logMessage = string.Concat(strArray1);
              lcLogWriter.logData(logMessage);
            }
            // ISSUE: reference to a compiler-generated field
            // ISSUE: reference to a compiler-generated field
            closure96.\u0024VB\u0024Local_ldOrderLine.OrderLineShippedDt = (DateTime?) closure95.\u0024VB\u0024Local_ldBackOrder.OrderLineShippedDt;
            // ISSUE: reference to a compiler-generated field
            DateTime orderLineTargetDt1 = closure95.\u0024VB\u0024Local_ldBackOrder.OrderLineTargetDt;
            // ISSUE: reference to a compiler-generated field
            nullable11 = closure96.\u0024VB\u0024Local_ldOrderLine.OrderLineTargetDt;
            bool? nullable20;
            if (!nullable11.HasValue)
            {
              nullable20 = new bool?();
            }
            else
            {
              nullable8 = new bool?(DateTime.Compare(nullable11.GetValueOrDefault(), orderLineTargetDt1) == 0);
              nullable20 = nullable8;
            }
            nullable6 = nullable20;
            DateTime date3 = Conversions.ToDate("01/01/1901");
            // ISSUE: reference to a compiler-generated field
            DateTime? orderLineTargetDt2 = closure96.\u0024VB\u0024Local_ldOrderLine.OrderLineTargetDt;
            bool? nullable21;
            if (!orderLineTargetDt2.HasValue)
            {
              nullable21 = new bool?();
            }
            else
            {
              nullable10 = new bool?(DateTime.Compare(orderLineTargetDt2.GetValueOrDefault(), date3) == 0);
              nullable21 = nullable10;
            }
            nullable5 = nullable21;
            bool? nullable22;
            if (!nullable6.HasValue || !nullable6.GetValueOrDefault())
            {
              if (!nullable5.HasValue)
                nullable22 = new bool?();
              else if (!nullable5.GetValueOrDefault())
              {
                nullable22 = nullable6;
              }
              else
              {
                nullable3 = new bool?(true);
                nullable22 = nullable3;
              }
            }
            else
            {
              nullable9 = new bool?(true);
              nullable22 = nullable9;
            }
            nullable2 = nullable22;
            bool? nullable23;
            if (!nullable2.HasValue)
            {
              nullable23 = new bool?();
            }
            else
            {
              nullable7 = new bool?(!nullable2.GetValueOrDefault());
              nullable23 = nullable7;
            }
            nullable4 = nullable23;
            if (nullable4.GetValueOrDefault())
            {
              clsLogWriter lcLogWriter = this.lcLogWriter;
              // ISSUE: reference to a compiler-generated field
              string[] strArray1 = new string[6]
              {
                "Order ",
                closure95.\u0024VB\u0024Local_ldBackOrder.FOLineSLSS,
                " Data Changed - MES/Org Target Date From; ",
                null,
                null,
                null
              };
              string[] strArray2 = strArray1;
              int index = 3;
              // ISSUE: reference to a compiler-generated field
              nullable1 = closure96.\u0024VB\u0024Local_ldOrderLine.OrderLineTargetDt;
              string str2 = nullable1.HasValue ? Conversions.ToString(nullable1.GetValueOrDefault()) : (string) null;
              strArray2[index] = str2;
              strArray1[4] = " To: ";
              // ISSUE: reference to a compiler-generated field
              strArray1[5] = Conversions.ToString(closure95.\u0024VB\u0024Local_ldBackOrder.OrderLineTargetDt);
              string logMessage = string.Concat(strArray1);
              lcLogWriter.logData(logMessage);
            }
            // ISSUE: reference to a compiler-generated field
            // ISSUE: reference to a compiler-generated field
            closure96.\u0024VB\u0024Local_ldOrderLine.OrderLineTargetDt = (DateTime?) closure95.\u0024VB\u0024Local_ldBackOrder.OrderLineTargetDt;
            // ISSUE: reference to a compiler-generated field
            DateTime orderLineOrgAssyStDt = closure95.\u0024VB\u0024Local_ldBackOrder.OrderLineOrgAssyStDt;
            // ISSUE: reference to a compiler-generated field
            nullable11 = closure96.\u0024VB\u0024Local_ldOrderLine.OrderLineAssyStartDt;
            bool? nullable24;
            if (!nullable11.HasValue)
            {
              nullable24 = new bool?();
            }
            else
            {
              nullable8 = new bool?(DateTime.Compare(nullable11.GetValueOrDefault(), orderLineOrgAssyStDt) == 0);
              nullable24 = nullable8;
            }
            nullable6 = nullable24;
            DateTime date4 = Conversions.ToDate("01/01/1901");
            // ISSUE: reference to a compiler-generated field
            DateTime? orderLineAssyStartDt = closure96.\u0024VB\u0024Local_ldOrderLine.OrderLineAssyStartDt;
            bool? nullable25;
            if (!orderLineAssyStartDt.HasValue)
            {
              nullable25 = new bool?();
            }
            else
            {
              nullable10 = new bool?(DateTime.Compare(orderLineAssyStartDt.GetValueOrDefault(), date4) == 0);
              nullable25 = nullable10;
            }
            nullable5 = nullable25;
            bool? nullable26;
            if (!nullable6.HasValue || !nullable6.GetValueOrDefault())
            {
              if (!nullable5.HasValue)
                nullable26 = new bool?();
              else if (!nullable5.GetValueOrDefault())
              {
                nullable26 = nullable6;
              }
              else
              {
                nullable3 = new bool?(true);
                nullable26 = nullable3;
              }
            }
            else
            {
              nullable9 = new bool?(true);
              nullable26 = nullable9;
            }
            nullable2 = nullable26;
            bool? nullable27;
            if (!nullable2.HasValue)
            {
              nullable27 = new bool?();
            }
            else
            {
              nullable7 = new bool?(!nullable2.GetValueOrDefault());
              nullable27 = nullable7;
            }
            nullable4 = nullable27;
            if (nullable4.GetValueOrDefault())
            {
              clsLogWriter lcLogWriter = this.lcLogWriter;
              // ISSUE: reference to a compiler-generated field
              string[] strArray1 = new string[6]
              {
                "Order ",
                closure95.\u0024VB\u0024Local_ldBackOrder.FOLineSLSS,
                " Data Changed - Orig Assembly Start Date From; ",
                null,
                null,
                null
              };
              string[] strArray2 = strArray1;
              int index = 3;
              // ISSUE: reference to a compiler-generated field
              nullable1 = closure96.\u0024VB\u0024Local_ldOrderLine.OrderLineAssyStartDt;
              string str2 = nullable1.HasValue ? Conversions.ToString(nullable1.GetValueOrDefault()) : (string) null;
              strArray2[index] = str2;
              strArray1[4] = " To: ";
              // ISSUE: reference to a compiler-generated field
              strArray1[5] = Conversions.ToString(closure95.\u0024VB\u0024Local_ldBackOrder.OrderLineOrgAssyStDt);
              string logMessage = string.Concat(strArray1);
              lcLogWriter.logData(logMessage);
            }
            // ISSUE: reference to a compiler-generated field
            // ISSUE: reference to a compiler-generated field
            closure96.\u0024VB\u0024Local_ldOrderLine.OrderLineAssyStartDt = (DateTime?) closure95.\u0024VB\u0024Local_ldBackOrder.OrderLineOrgAssyStDt;
            se0085CtEntities1.SaveChanges();
            // ISSUE: reference to a compiler-generated field
            if (closure95.\u0024VB\u0024Local_ldBackOrder.OrdSectsCnt > 0)
            {
              ParameterExpression parameterExpression2;
              // ISSUE: reference to a compiler-generated field
              if (((IQueryable<OrdSection>) Queryable.Select<OrdSection, OrdSection>(Queryable.Where<OrdSection>((IQueryable<M0>) se0085CtEntities1.OrdSections, (Expression<Func<M0, bool>>) Expression.Lambda<Func<OrdSection, bool>>((Expression) Expression.Equal(s.OrderLine.OrderLineId, closure96.\u0024VB\u0024Local_ldOrderLine.OrderLineId, true, (MethodInfo) null), new ParameterExpression[1]
              {
                parameterExpression2
              })), (Expression<Func<M0, M1>>) (s => s))).Count<OrdSection>() == 0)
              {
                int num2 = 1;
                // ISSUE: reference to a compiler-generated field
                int ordSectsCnt = closure95.\u0024VB\u0024Local_ldBackOrder.OrdSectsCnt;
                // ISSUE: reference to a compiler-generated field
                closure95.\u0024VB\u0024Local_ldCounter01 = num2;
                // ISSUE: reference to a compiler-generated field
                while (closure95.\u0024VB\u0024Local_ldCounter01 <= ordSectsCnt)
                {
                  ParameterExpression parameterExpression3;
                  // ISSUE: reference to a compiler-generated field
                  // ISSUE: method reference
                  // ISSUE: field reference
                  IQueryable<OrdSection> source4 = (IQueryable<OrdSection>) Queryable.Select<OrdSection, OrdSection>(Queryable.Where<OrdSection>((IQueryable<M0>) se0085CtEntities1.OrdSections, (Expression<Func<M0, bool>>) Expression.Lambda<Func<OrdSection, bool>>((Expression) Expression.And((Expression) Expression.Equal(s.OrderLine.OrderLineId, closure96.\u0024VB\u0024Local_ldOrderLine.OrderLineId, true, (MethodInfo) null), (Expression) Expression.Equal((Expression) Expression.Property((Expression) parameterExpression3, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (OrdSection.get_OrdSectsNum))), (Expression) Expression.Field((Expression) Expression.Constant((object) closure95, typeof (clsBackorders._Closure\u0024__95)), FieldInfo.GetFieldFromHandle(__fieldref (clsBackorders._Closure\u0024__95.\u0024VB\u0024Local_ldCounter01))), true, (MethodInfo) null)), new ParameterExpression[1]
                  {
                    parameterExpression3
                  })), (Expression<Func<M0, M1>>) (s => s));
                  if (source4 != null && source4.Count<OrdSection>() == 0)
                  {
                    // ISSUE: reference to a compiler-generated field
                    // ISSUE: reference to a compiler-generated field
                    closure96.\u0024VB\u0024Local_ldOrderLine.OrdSections.Add(new OrdSection()
                    {
                      OrdSectsNum = closure95.\u0024VB\u0024Local_ldCounter01
                    });
                    se0085CtEntities1.SaveChanges();
                  }
                  // ISSUE: reference to a compiler-generated field
                  checked { ++closure95.\u0024VB\u0024Local_ldCounter01; }
                }
              }
            }
            ParameterExpression parameterExpression4;
            // ISSUE: method reference
            // ISSUE: reference to a compiler-generated field
            IQueryable<VB\u0024AnonymousType_44<Associate, AssocAssignType>> source5 = Queryable.Select(Queryable.Where((IQueryable<M0>) Queryable.Join((IQueryable<M0>) Queryable.Join((IQueryable<M0>) se0085CtEntities1.AssocLookups, (IEnumerable<M1>) se0085CtEntities1.AssocAssignTypes, (Expression<Func<M0, M2>>) (o => o.AssocAssignType.AssocAssignTypeId), (Expression<Func<M1, M2>>) (t => t.AssocAssignTypeId), (Expression<Func<M0, M1, M3>>) ((o, t) => new{ o = o, t = t })), (IEnumerable<M1>) se0085CtEntities1.Associates, (Expression<Func<M0, M2>>) (data => data.o.Associate.AssocId), (Expression<Func<M1, M2>>) (a => a.AssocId), (Expression<Func<M0, M1, M3>>) ((data, a) => new
            {
              o = data.o,
              t = data.t,
              a = a
            })), (Expression<Func<M0, bool>>) Expression.Lambda<Func<VB\u0024AnonymousType_43<AssocLookup, AssocAssignType, Associate>, bool>>((Expression) Expression.And(Expression.Call((Expression) null, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (Operators.CompareString)), \u0024VB\u0024It.o.AssocLookupField, closure95.\u0024VB\u0024Local_ldBackOrder.OrderLineOE.AssocLaborName, false) == 0, (Expression) Expression.Equal(\u0024VB\u0024It.t.AssocAssignTypeValue, 1, true, (MethodInfo) null)), new ParameterExpression[1]
            {
              parameterExpression4
            })), (Expression<Func<M0, M1>>) (data => new{ a = data.a, t = data.t }));
            if (source5 != null && source5.Count() > 0)
            {
              // ISSUE: object of a compiler-generated type is created
              // ISSUE: variable of a compiler-generated type
              clsBackorders._Closure\u0024__95._Closure\u0024__96._Closure\u0024__97 closure97 = new clsBackorders._Closure\u0024__95._Closure\u0024__96._Closure\u0024__97();
              // ISSUE: reference to a compiler-generated field
              closure97.\u0024VB\u0024Local_ldOEAssoc = new Associate();
              // ISSUE: reference to a compiler-generated field
              closure97.\u0024VB\u0024Local_ldOEAssignType = new AssocAssignType();
              // ISSUE: reference to a compiler-generated field
              closure97.\u0024VB\u0024Local_ldOEAssoc = source5.First().a;
              // ISSUE: reference to a compiler-generated field
              closure97.\u0024VB\u0024Local_ldOEAssignType = source5.First().t;
              ParameterExpression parameterExpression2;
              // ISSUE: reference to a compiler-generated field
              // ISSUE: method reference
              // ISSUE: method reference
              // ISSUE: field reference
              // ISSUE: method reference
              // ISSUE: method reference
              // ISSUE: method reference
              // ISSUE: field reference
              // ISSUE: method reference
              if (((IQueryable<OrdLineAssocAssigned>) Queryable.Select<OrdLineAssocAssigned, OrdLineAssocAssigned>(Queryable.Where<OrdLineAssocAssigned>((IQueryable<M0>) se0085CtEntities1.OrdLineAssocAssigneds, (Expression<Func<M0, bool>>) Expression.Lambda<Func<OrdLineAssocAssigned, bool>>((Expression) Expression.And((Expression) Expression.And((Expression) Expression.Equal(q.Associate.AssocId, closure97.\u0024VB\u0024Local_ldOEAssoc.AssocId, true, (MethodInfo) null), (Expression) Expression.Equal((Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (OrdLineAssocAssigned.get_AssocAssignType))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (AssocAssignType.get_AssocAssignTypeId))), (Expression) Expression.Property((Expression) Expression.Field((Expression) Expression.Constant((object) closure97, typeof (clsBackorders._Closure\u0024__95._Closure\u0024__96._Closure\u0024__97)), FieldInfo.GetFieldFromHandle(__fieldref (clsBackorders._Closure\u0024__95._Closure\u0024__96._Closure\u0024__97.\u0024VB\u0024Local_ldOEAssignType))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (AssocAssignType.get_AssocAssignTypeId))), true, (MethodInfo) null)), (Expression) Expression.Equal((Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (OrdLineAssocAssigned.get_OrderLine))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (OrderLine.get_OrderLineId))), (Expression) Expression.Property((Expression) Expression.Field((Expression) Expression.Constant((object) closure96, typeof (clsBackorders._Closure\u0024__95._Closure\u0024__96)), FieldInfo.GetFieldFromHandle(__fieldref (clsBackorders._Closure\u0024__95._Closure\u0024__96.\u0024VB\u0024Local_ldOrderLine))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (OrderLine.get_OrderLineId))), true, (MethodInfo) null)), new ParameterExpression[1]
              {
                parameterExpression2
              })), (Expression<Func<M0, M1>>) (q => q))).Count<OrdLineAssocAssigned>() == 0)
              {
                // ISSUE: reference to a compiler-generated field
                // ISSUE: reference to a compiler-generated field
                // ISSUE: reference to a compiler-generated field
                se0085CtEntities1.OrdLineAssocAssigneds.Add(new OrdLineAssocAssigned()
                {
                  Associate = closure97.\u0024VB\u0024Local_ldOEAssoc,
                  AssocAssignType = closure97.\u0024VB\u0024Local_ldOEAssignType,
                  OrderLine = closure96.\u0024VB\u0024Local_ldOrderLine
                });
                se0085CtEntities1.SaveChanges();
              }
              // ISSUE: reference to a compiler-generated field
              closure97.\u0024VB\u0024Local_ldOEAssoc = (Associate) null;
              // ISSUE: reference to a compiler-generated field
              closure97.\u0024VB\u0024Local_ldOEAssignType = (AssocAssignType) null;
            }
            ParameterExpression parameterExpression5;
            // ISSUE: method reference
            // ISSUE: reference to a compiler-generated field
            IQueryable<VB\u0024AnonymousType_44<Associate, AssocAssignType>> source6 = Queryable.Select(Queryable.Where((IQueryable<M0>) Queryable.Join((IQueryable<M0>) Queryable.Join((IQueryable<M0>) se0085CtEntities1.AssocLookups, (IEnumerable<M1>) se0085CtEntities1.AssocAssignTypes, (Expression<Func<M0, M2>>) (o => o.AssocAssignType.AssocAssignTypeId), (Expression<Func<M1, M2>>) (t => t.AssocAssignTypeId), (Expression<Func<M0, M1, M3>>) ((o, t) => new{ o = o, t = t })), (IEnumerable<M1>) se0085CtEntities1.Associates, (Expression<Func<M0, M2>>) (data => data.o.Associate.AssocId), (Expression<Func<M1, M2>>) (a => a.AssocId), (Expression<Func<M0, M1, M3>>) ((data, a) => new
            {
              o = data.o,
              t = data.t,
              a = a
            })), (Expression<Func<M0, bool>>) Expression.Lambda<Func<VB\u0024AnonymousType_43<AssocLookup, AssocAssignType, Associate>, bool>>((Expression) Expression.And(Expression.Call((Expression) null, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (Operators.CompareString)), \u0024VB\u0024It.o.AssocLookupField, closure95.\u0024VB\u0024Local_ldBackOrder.OrderLineME.AssocLaborName, false) == 0, (Expression) Expression.Equal(\u0024VB\u0024It.t.AssocAssignTypeValue, 2, true, (MethodInfo) null)), new ParameterExpression[1]
            {
              parameterExpression5
            })), (Expression<Func<M0, M1>>) (data => new{ a = data.a, t = data.t }));
            if (source6 != null && source6.Count() > 0)
            {
              // ISSUE: object of a compiler-generated type is created
              // ISSUE: variable of a compiler-generated type
              clsBackorders._Closure\u0024__95._Closure\u0024__96._Closure\u0024__98 closure98 = new clsBackorders._Closure\u0024__95._Closure\u0024__96._Closure\u0024__98();
              // ISSUE: reference to a compiler-generated field
              closure98.\u0024VB\u0024Local_ldMEAssoc = new Associate();
              // ISSUE: reference to a compiler-generated field
              closure98.\u0024VB\u0024Local_ldMEAssignType = new AssocAssignType();
              // ISSUE: reference to a compiler-generated field
              closure98.\u0024VB\u0024Local_ldMEAssoc = source6.First().a;
              // ISSUE: reference to a compiler-generated field
              closure98.\u0024VB\u0024Local_ldMEAssignType = source6.First().t;
              ParameterExpression parameterExpression2;
              // ISSUE: reference to a compiler-generated field
              // ISSUE: method reference
              // ISSUE: method reference
              // ISSUE: field reference
              // ISSUE: method reference
              // ISSUE: method reference
              // ISSUE: method reference
              // ISSUE: field reference
              // ISSUE: method reference
              if (((IQueryable<OrdLineAssocAssigned>) Queryable.Select<OrdLineAssocAssigned, OrdLineAssocAssigned>(Queryable.Where<OrdLineAssocAssigned>((IQueryable<M0>) se0085CtEntities1.OrdLineAssocAssigneds, (Expression<Func<M0, bool>>) Expression.Lambda<Func<OrdLineAssocAssigned, bool>>((Expression) Expression.And((Expression) Expression.And((Expression) Expression.Equal(q.Associate.AssocId, closure98.\u0024VB\u0024Local_ldMEAssoc.AssocId, true, (MethodInfo) null), (Expression) Expression.Equal((Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (OrdLineAssocAssigned.get_AssocAssignType))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (AssocAssignType.get_AssocAssignTypeId))), (Expression) Expression.Property((Expression) Expression.Field((Expression) Expression.Constant((object) closure98, typeof (clsBackorders._Closure\u0024__95._Closure\u0024__96._Closure\u0024__98)), FieldInfo.GetFieldFromHandle(__fieldref (clsBackorders._Closure\u0024__95._Closure\u0024__96._Closure\u0024__98.\u0024VB\u0024Local_ldMEAssignType))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (AssocAssignType.get_AssocAssignTypeId))), true, (MethodInfo) null)), (Expression) Expression.Equal((Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (OrdLineAssocAssigned.get_OrderLine))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (OrderLine.get_OrderLineId))), (Expression) Expression.Property((Expression) Expression.Field((Expression) Expression.Constant((object) closure96, typeof (clsBackorders._Closure\u0024__95._Closure\u0024__96)), FieldInfo.GetFieldFromHandle(__fieldref (clsBackorders._Closure\u0024__95._Closure\u0024__96.\u0024VB\u0024Local_ldOrderLine))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (OrderLine.get_OrderLineId))), true, (MethodInfo) null)), new ParameterExpression[1]
              {
                parameterExpression2
              })), (Expression<Func<M0, M1>>) (q => q))).Count<OrdLineAssocAssigned>() == 0)
              {
                // ISSUE: reference to a compiler-generated field
                // ISSUE: reference to a compiler-generated field
                // ISSUE: reference to a compiler-generated field
                se0085CtEntities1.OrdLineAssocAssigneds.Add(new OrdLineAssocAssigned()
                {
                  Associate = closure98.\u0024VB\u0024Local_ldMEAssoc,
                  AssocAssignType = closure98.\u0024VB\u0024Local_ldMEAssignType,
                  OrderLine = closure96.\u0024VB\u0024Local_ldOrderLine
                });
                se0085CtEntities1.SaveChanges();
              }
              // ISSUE: reference to a compiler-generated field
              closure98.\u0024VB\u0024Local_ldMEAssoc = (Associate) null;
              // ISSUE: reference to a compiler-generated field
              closure98.\u0024VB\u0024Local_ldMEAssignType = (AssocAssignType) null;
            }
            ParameterExpression parameterExpression6;
            // ISSUE: method reference
            // ISSUE: reference to a compiler-generated field
            IQueryable<VB\u0024AnonymousType_44<Associate, AssocAssignType>> source7 = Queryable.Select(Queryable.Where((IQueryable<M0>) Queryable.Join((IQueryable<M0>) Queryable.Join((IQueryable<M0>) se0085CtEntities1.AssocLookups, (IEnumerable<M1>) se0085CtEntities1.AssocAssignTypes, (Expression<Func<M0, M2>>) (o => o.AssocAssignType.AssocAssignTypeId), (Expression<Func<M1, M2>>) (t => t.AssocAssignTypeId), (Expression<Func<M0, M1, M3>>) ((o, t) => new{ o = o, t = t })), (IEnumerable<M1>) se0085CtEntities1.Associates, (Expression<Func<M0, M2>>) (data => data.o.Associate.AssocId), (Expression<Func<M1, M2>>) (a => a.AssocId), (Expression<Func<M0, M1, M3>>) ((data, a) => new
            {
              o = data.o,
              t = data.t,
              a = a
            })), (Expression<Func<M0, bool>>) Expression.Lambda<Func<VB\u0024AnonymousType_43<AssocLookup, AssocAssignType, Associate>, bool>>((Expression) Expression.And(Expression.Call((Expression) null, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (Operators.CompareString)), \u0024VB\u0024It.o.AssocLookupField, closure95.\u0024VB\u0024Local_ldBackOrder.OrderLineAE.AssocLaborName, false) == 0, (Expression) Expression.Equal(\u0024VB\u0024It.t.AssocAssignTypeValue, 3, true, (MethodInfo) null)), new ParameterExpression[1]
            {
              parameterExpression6
            })), (Expression<Func<M0, M1>>) (data => new{ a = data.a, t = data.t }));
            if (source7 != null && source7.Count() > 0)
            {
              // ISSUE: object of a compiler-generated type is created
              // ISSUE: variable of a compiler-generated type
              clsBackorders._Closure\u0024__95._Closure\u0024__96._Closure\u0024__99 closure99 = new clsBackorders._Closure\u0024__95._Closure\u0024__96._Closure\u0024__99();
              // ISSUE: reference to a compiler-generated field
              closure99.\u0024VB\u0024Local_ldAEAssoc = new Associate();
              // ISSUE: reference to a compiler-generated field
              closure99.\u0024VB\u0024Local_ldAEAssignType = new AssocAssignType();
              // ISSUE: reference to a compiler-generated field
              closure99.\u0024VB\u0024Local_ldAEAssoc = source7.First().a;
              // ISSUE: reference to a compiler-generated field
              closure99.\u0024VB\u0024Local_ldAEAssignType = source7.First().t;
              ParameterExpression parameterExpression2;
              // ISSUE: reference to a compiler-generated field
              // ISSUE: method reference
              // ISSUE: method reference
              // ISSUE: field reference
              // ISSUE: method reference
              // ISSUE: method reference
              // ISSUE: method reference
              // ISSUE: field reference
              // ISSUE: method reference
              if (((IQueryable<OrdLineAssocAssigned>) Queryable.Select<OrdLineAssocAssigned, OrdLineAssocAssigned>(Queryable.Where<OrdLineAssocAssigned>((IQueryable<M0>) se0085CtEntities1.OrdLineAssocAssigneds, (Expression<Func<M0, bool>>) Expression.Lambda<Func<OrdLineAssocAssigned, bool>>((Expression) Expression.And((Expression) Expression.And((Expression) Expression.Equal(q.Associate.AssocId, closure99.\u0024VB\u0024Local_ldAEAssoc.AssocId, true, (MethodInfo) null), (Expression) Expression.Equal((Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (OrdLineAssocAssigned.get_AssocAssignType))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (AssocAssignType.get_AssocAssignTypeId))), (Expression) Expression.Property((Expression) Expression.Field((Expression) Expression.Constant((object) closure99, typeof (clsBackorders._Closure\u0024__95._Closure\u0024__96._Closure\u0024__99)), FieldInfo.GetFieldFromHandle(__fieldref (clsBackorders._Closure\u0024__95._Closure\u0024__96._Closure\u0024__99.\u0024VB\u0024Local_ldAEAssignType))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (AssocAssignType.get_AssocAssignTypeId))), true, (MethodInfo) null)), (Expression) Expression.Equal((Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (OrdLineAssocAssigned.get_OrderLine))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (OrderLine.get_OrderLineId))), (Expression) Expression.Property((Expression) Expression.Field((Expression) Expression.Constant((object) closure96, typeof (clsBackorders._Closure\u0024__95._Closure\u0024__96)), FieldInfo.GetFieldFromHandle(__fieldref (clsBackorders._Closure\u0024__95._Closure\u0024__96.\u0024VB\u0024Local_ldOrderLine))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (OrderLine.get_OrderLineId))), true, (MethodInfo) null)), new ParameterExpression[1]
              {
                parameterExpression2
              })), (Expression<Func<M0, M1>>) (q => q))).Count<OrdLineAssocAssigned>() == 0)
              {
                // ISSUE: reference to a compiler-generated field
                // ISSUE: reference to a compiler-generated field
                // ISSUE: reference to a compiler-generated field
                se0085CtEntities1.OrdLineAssocAssigneds.Add(new OrdLineAssocAssigned()
                {
                  Associate = closure99.\u0024VB\u0024Local_ldAEAssoc,
                  AssocAssignType = closure99.\u0024VB\u0024Local_ldAEAssignType,
                  OrderLine = closure96.\u0024VB\u0024Local_ldOrderLine
                });
                se0085CtEntities1.SaveChanges();
              }
              // ISSUE: reference to a compiler-generated field
              closure99.\u0024VB\u0024Local_ldAEAssoc = (Associate) null;
              // ISSUE: reference to a compiler-generated field
              closure99.\u0024VB\u0024Local_ldAEAssignType = (AssocAssignType) null;
            }
            ParameterExpression parameterExpression7;
            // ISSUE: method reference
            // ISSUE: reference to a compiler-generated field
            IQueryable<VB\u0024AnonymousType_44<Associate, AssocAssignType>> source8 = Queryable.Select(Queryable.Where((IQueryable<M0>) Queryable.Join((IQueryable<M0>) Queryable.Join((IQueryable<M0>) se0085CtEntities1.AssocLookups, (IEnumerable<M1>) se0085CtEntities1.AssocAssignTypes, (Expression<Func<M0, M2>>) (o => o.AssocAssignType.AssocAssignTypeId), (Expression<Func<M1, M2>>) (t => t.AssocAssignTypeId), (Expression<Func<M0, M1, M3>>) ((o, t) => new{ o = o, t = t })), (IEnumerable<M1>) se0085CtEntities1.Associates, (Expression<Func<M0, M2>>) (data => data.o.Associate.AssocId), (Expression<Func<M1, M2>>) (a => a.AssocId), (Expression<Func<M0, M1, M3>>) ((data, a) => new
            {
              o = data.o,
              t = data.t,
              a = a
            })), (Expression<Func<M0, bool>>) Expression.Lambda<Func<VB\u0024AnonymousType_43<AssocLookup, AssocAssignType, Associate>, bool>>((Expression) Expression.And(Expression.Call((Expression) null, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (Operators.CompareString)), \u0024VB\u0024It.o.AssocLookupField, closure95.\u0024VB\u0024Local_ldBackOrder.OrderLineDM.AssocLaborName, false) == 0, (Expression) Expression.Equal(\u0024VB\u0024It.t.AssocAssignTypeValue, 4, true, (MethodInfo) null)), new ParameterExpression[1]
            {
              parameterExpression7
            })), (Expression<Func<M0, M1>>) (data => new{ a = data.a, t = data.t }));
            if (source8 != null && source8.Count() > 0)
            {
              // ISSUE: object of a compiler-generated type is created
              // ISSUE: variable of a compiler-generated type
              clsBackorders._Closure\u0024__95._Closure\u0024__96._Closure\u0024__100 closure100 = new clsBackorders._Closure\u0024__95._Closure\u0024__96._Closure\u0024__100();
              // ISSUE: reference to a compiler-generated field
              closure100.\u0024VB\u0024Local_ldDMAssoc = new Associate();
              // ISSUE: reference to a compiler-generated field
              closure100.\u0024VB\u0024Local_ldDMAssignType = new AssocAssignType();
              // ISSUE: reference to a compiler-generated field
              closure100.\u0024VB\u0024Local_ldDMAssoc = source8.First().a;
              // ISSUE: reference to a compiler-generated field
              closure100.\u0024VB\u0024Local_ldDMAssignType = source8.First().t;
              ParameterExpression parameterExpression2;
              // ISSUE: reference to a compiler-generated field
              // ISSUE: method reference
              // ISSUE: method reference
              // ISSUE: field reference
              // ISSUE: method reference
              // ISSUE: method reference
              // ISSUE: method reference
              // ISSUE: field reference
              // ISSUE: method reference
              if (((IQueryable<OrdLineAssocAssigned>) Queryable.Select<OrdLineAssocAssigned, OrdLineAssocAssigned>(Queryable.Where<OrdLineAssocAssigned>((IQueryable<M0>) se0085CtEntities1.OrdLineAssocAssigneds, (Expression<Func<M0, bool>>) Expression.Lambda<Func<OrdLineAssocAssigned, bool>>((Expression) Expression.And((Expression) Expression.And((Expression) Expression.Equal(q.Associate.AssocId, closure100.\u0024VB\u0024Local_ldDMAssoc.AssocId, true, (MethodInfo) null), (Expression) Expression.Equal((Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (OrdLineAssocAssigned.get_AssocAssignType))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (AssocAssignType.get_AssocAssignTypeId))), (Expression) Expression.Property((Expression) Expression.Field((Expression) Expression.Constant((object) closure100, typeof (clsBackorders._Closure\u0024__95._Closure\u0024__96._Closure\u0024__100)), FieldInfo.GetFieldFromHandle(__fieldref (clsBackorders._Closure\u0024__95._Closure\u0024__96._Closure\u0024__100.\u0024VB\u0024Local_ldDMAssignType))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (AssocAssignType.get_AssocAssignTypeId))), true, (MethodInfo) null)), (Expression) Expression.Equal((Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (OrdLineAssocAssigned.get_OrderLine))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (OrderLine.get_OrderLineId))), (Expression) Expression.Property((Expression) Expression.Field((Expression) Expression.Constant((object) closure96, typeof (clsBackorders._Closure\u0024__95._Closure\u0024__96)), FieldInfo.GetFieldFromHandle(__fieldref (clsBackorders._Closure\u0024__95._Closure\u0024__96.\u0024VB\u0024Local_ldOrderLine))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (OrderLine.get_OrderLineId))), true, (MethodInfo) null)), new ParameterExpression[1]
              {
                parameterExpression2
              })), (Expression<Func<M0, M1>>) (q => q))).Count<OrdLineAssocAssigned>() == 0)
              {
                // ISSUE: reference to a compiler-generated field
                // ISSUE: reference to a compiler-generated field
                // ISSUE: reference to a compiler-generated field
                se0085CtEntities1.OrdLineAssocAssigneds.Add(new OrdLineAssocAssigned()
                {
                  Associate = closure100.\u0024VB\u0024Local_ldDMAssoc,
                  AssocAssignType = closure100.\u0024VB\u0024Local_ldDMAssignType,
                  OrderLine = closure96.\u0024VB\u0024Local_ldOrderLine
                });
                se0085CtEntities1.SaveChanges();
              }
              // ISSUE: reference to a compiler-generated field
              closure100.\u0024VB\u0024Local_ldDMAssoc = (Associate) null;
              // ISSUE: reference to a compiler-generated field
              closure100.\u0024VB\u0024Local_ldDMAssignType = (AssocAssignType) null;
            }
            ParameterExpression parameterExpression8;
            // ISSUE: method reference
            // ISSUE: reference to a compiler-generated field
            IQueryable<VB\u0024AnonymousType_44<Associate, AssocAssignType>> source9 = Queryable.Select(Queryable.Where((IQueryable<M0>) Queryable.Join((IQueryable<M0>) Queryable.Join((IQueryable<M0>) se0085CtEntities1.AssocLookups, (IEnumerable<M1>) se0085CtEntities1.AssocAssignTypes, (Expression<Func<M0, M2>>) (o => o.AssocAssignType.AssocAssignTypeId), (Expression<Func<M1, M2>>) (t => t.AssocAssignTypeId), (Expression<Func<M0, M1, M3>>) ((o, t) => new{ o = o, t = t })), (IEnumerable<M1>) se0085CtEntities1.Associates, (Expression<Func<M0, M2>>) (data => data.o.Associate.AssocId), (Expression<Func<M1, M2>>) (a => a.AssocId), (Expression<Func<M0, M1, M3>>) ((data, a) => new
            {
              o = data.o,
              t = data.t,
              a = a
            })), (Expression<Func<M0, bool>>) Expression.Lambda<Func<VB\u0024AnonymousType_43<AssocLookup, AssocAssignType, Associate>, bool>>((Expression) Expression.And(Expression.Call((Expression) null, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (Operators.CompareString)), \u0024VB\u0024It.o.AssocLookupField, closure95.\u0024VB\u0024Local_ldBackOrder.OrderLineCSR.AssocLaborName, false) == 0, (Expression) Expression.Equal(\u0024VB\u0024It.t.AssocAssignTypeValue, 5, true, (MethodInfo) null)), new ParameterExpression[1]
            {
              parameterExpression8
            })), (Expression<Func<M0, M1>>) (data => new{ a = data.a, t = data.t }));
            if (source9 != null && source9.Count() > 0)
            {
              // ISSUE: object of a compiler-generated type is created
              // ISSUE: variable of a compiler-generated type
              clsBackorders._Closure\u0024__95._Closure\u0024__96._Closure\u0024__101 closure101 = new clsBackorders._Closure\u0024__95._Closure\u0024__96._Closure\u0024__101();
              // ISSUE: reference to a compiler-generated field
              closure101.\u0024VB\u0024Local_ldOSAssoc = new Associate();
              // ISSUE: reference to a compiler-generated field
              closure101.\u0024VB\u0024Local_ldOSAssignType = new AssocAssignType();
              // ISSUE: reference to a compiler-generated field
              closure101.\u0024VB\u0024Local_ldOSAssoc = source9.First().a;
              // ISSUE: reference to a compiler-generated field
              closure101.\u0024VB\u0024Local_ldOSAssignType = source9.First().t;
              ParameterExpression parameterExpression2;
              // ISSUE: reference to a compiler-generated field
              // ISSUE: method reference
              // ISSUE: method reference
              // ISSUE: field reference
              // ISSUE: method reference
              // ISSUE: method reference
              // ISSUE: method reference
              // ISSUE: field reference
              // ISSUE: method reference
              if (((IQueryable<OrdLineAssocAssigned>) Queryable.Select<OrdLineAssocAssigned, OrdLineAssocAssigned>(Queryable.Where<OrdLineAssocAssigned>((IQueryable<M0>) se0085CtEntities1.OrdLineAssocAssigneds, (Expression<Func<M0, bool>>) Expression.Lambda<Func<OrdLineAssocAssigned, bool>>((Expression) Expression.And((Expression) Expression.And((Expression) Expression.Equal(q.Associate.AssocId, closure101.\u0024VB\u0024Local_ldOSAssoc.AssocId, true, (MethodInfo) null), (Expression) Expression.Equal((Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (OrdLineAssocAssigned.get_AssocAssignType))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (AssocAssignType.get_AssocAssignTypeId))), (Expression) Expression.Property((Expression) Expression.Field((Expression) Expression.Constant((object) closure101, typeof (clsBackorders._Closure\u0024__95._Closure\u0024__96._Closure\u0024__101)), FieldInfo.GetFieldFromHandle(__fieldref (clsBackorders._Closure\u0024__95._Closure\u0024__96._Closure\u0024__101.\u0024VB\u0024Local_ldOSAssignType))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (AssocAssignType.get_AssocAssignTypeId))), true, (MethodInfo) null)), (Expression) Expression.Equal((Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (OrdLineAssocAssigned.get_OrderLine))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (OrderLine.get_OrderLineId))), (Expression) Expression.Property((Expression) Expression.Field((Expression) Expression.Constant((object) closure96, typeof (clsBackorders._Closure\u0024__95._Closure\u0024__96)), FieldInfo.GetFieldFromHandle(__fieldref (clsBackorders._Closure\u0024__95._Closure\u0024__96.\u0024VB\u0024Local_ldOrderLine))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (OrderLine.get_OrderLineId))), true, (MethodInfo) null)), new ParameterExpression[1]
              {
                parameterExpression2
              })), (Expression<Func<M0, M1>>) (q => q))).Count<OrdLineAssocAssigned>() == 0)
              {
                // ISSUE: reference to a compiler-generated field
                // ISSUE: reference to a compiler-generated field
                // ISSUE: reference to a compiler-generated field
                se0085CtEntities1.OrdLineAssocAssigneds.Add(new OrdLineAssocAssigned()
                {
                  Associate = closure101.\u0024VB\u0024Local_ldOSAssoc,
                  AssocAssignType = closure101.\u0024VB\u0024Local_ldOSAssignType,
                  OrderLine = closure96.\u0024VB\u0024Local_ldOrderLine
                });
                se0085CtEntities1.SaveChanges();
              }
              // ISSUE: reference to a compiler-generated field
              closure101.\u0024VB\u0024Local_ldOSAssoc = (Associate) null;
              // ISSUE: reference to a compiler-generated field
              closure101.\u0024VB\u0024Local_ldOSAssignType = (AssocAssignType) null;
            }
          }
          else
          {
            // ISSUE: reference to a compiler-generated field
            int num2 = (int) Interaction.MsgBox((object) ("Multiple Order numbers found, aborting MES import for Order; " + closure95.\u0024VB\u0024Local_ldBackOrder.OrderFO), MsgBoxStyle.Information, (object) "ONE QMS MES Import Error - E0001");
            return;
          }
          ParameterExpression parameterExpression9;
          // ISSUE: reference to a compiler-generated field
          IQueryable<OrderLinesExt> source10 = (IQueryable<OrderLinesExt>) Queryable.Select<OrderLinesExt, OrderLinesExt>(Queryable.Where<OrderLinesExt>((IQueryable<M0>) se0085CtEntities1.OrderLinesExts, (Expression<Func<M0, bool>>) Expression.Lambda<Func<OrderLinesExt, bool>>((Expression) Expression.Equal(x.OrderLine.OrderLineId, closure96.\u0024VB\u0024Local_ldOrderLine.OrderLineId, true, (MethodInfo) null), new ParameterExpression[1]
          {
            parameterExpression9
          })), (Expression<Func<M0, M1>>) (x => x));
          if (source10.Count<OrderLinesExt>() == 0)
          {
            // ISSUE: reference to a compiler-generated field
            // ISSUE: reference to a compiler-generated field
            // ISSUE: reference to a compiler-generated field
            // ISSUE: reference to a compiler-generated field
            // ISSUE: reference to a compiler-generated field
            // ISSUE: reference to a compiler-generated field
            // ISSUE: reference to a compiler-generated field
            // ISSUE: reference to a compiler-generated field
            // ISSUE: reference to a compiler-generated field
            // ISSUE: reference to a compiler-generated field
            // ISSUE: reference to a compiler-generated field
            // ISSUE: reference to a compiler-generated field
            // ISSUE: reference to a compiler-generated field
            // ISSUE: reference to a compiler-generated field
            // ISSUE: reference to a compiler-generated field
            // ISSUE: reference to a compiler-generated field
            // ISSUE: reference to a compiler-generated field
            // ISSUE: reference to a compiler-generated field
            // ISSUE: reference to a compiler-generated field
            // ISSUE: reference to a compiler-generated field
            // ISSUE: reference to a compiler-generated field
            // ISSUE: reference to a compiler-generated field
            // ISSUE: reference to a compiler-generated field
            // ISSUE: reference to a compiler-generated field
            // ISSUE: reference to a compiler-generated field
            // ISSUE: reference to a compiler-generated field
            // ISSUE: reference to a compiler-generated field
            // ISSUE: reference to a compiler-generated field
            // ISSUE: reference to a compiler-generated field
            // ISSUE: reference to a compiler-generated field
            // ISSUE: reference to a compiler-generated field
            // ISSUE: reference to a compiler-generated field
            // ISSUE: reference to a compiler-generated field
            // ISSUE: reference to a compiler-generated field
            // ISSUE: reference to a compiler-generated field
            // ISSUE: reference to a compiler-generated field
            // ISSUE: reference to a compiler-generated field
            // ISSUE: reference to a compiler-generated field
            // ISSUE: reference to a compiler-generated field
            // ISSUE: reference to a compiler-generated field
            // ISSUE: reference to a compiler-generated field
            // ISSUE: reference to a compiler-generated field
            // ISSUE: reference to a compiler-generated field
            // ISSUE: reference to a compiler-generated field
            closure96.\u0024VB\u0024Local_ldOrderLine.OrderLinesExts.Add(new OrderLinesExt()
            {
              OrderLineSER = closure95.\u0024VB\u0024Local_ldBackOrder.OrderLineSER,
              OrderLineBook = (Decimal?) closure95.\u0024VB\u0024Local_ldBackOrder.OrderLineBook,
              OrderLineNet = (Decimal?) closure95.\u0024VB\u0024Local_ldBackOrder.OrderLineNet,
              OrderLineOrgTargetDt = (DateTime?) closure95.\u0024VB\u0024Local_ldBackOrder.OrderLineOrgTargetDt,
              OrderLineCurTargetDt = (DateTime?) closure95.\u0024VB\u0024Local_ldBackOrder.OrderLineCurTargetDt,
              OrderLineOrgShipDt = (DateTime?) closure95.\u0024VB\u0024Local_ldBackOrder.OrderLineOrgShipDt,
              OrderLineOrgAssyStDt = (DateTime?) closure95.\u0024VB\u0024Local_ldBackOrder.OrderLineOrgAssyStDt,
              OrderLineCurAssyStDt = (DateTime?) closure95.\u0024VB\u0024Local_ldBackOrder.OrderLineCurAssyStDt,
              OrderLineActAssyStDt = (DateTime?) closure95.\u0024VB\u0024Local_ldBackOrder.OrderLineActAssyStDt,
              OrderLineOrgEngrRelDt = (DateTime?) closure95.\u0024VB\u0024Local_ldBackOrder.OrderLineOrgEngrRelDt,
              OrderLineCurEngrRelDt = (DateTime?) closure95.\u0024VB\u0024Local_ldBackOrder.OrderLineCurEngrRelDt,
              OrderLineActEngrRelDt = (DateTime?) closure95.\u0024VB\u0024Local_ldBackOrder.OrderLineActEngrRelDt,
              OrderLineNB4Dt = (DateTime?) closure95.\u0024VB\u0024Local_ldBackOrder.OrderLineNB4Dt,
              OrderLineEngrGrp = closure95.\u0024VB\u0024Local_ldBackOrder.OrderLineEngrGrp,
              OrderLineMechClpx = closure95.\u0024VB\u0024Local_ldBackOrder.OrderLineMechClpx,
              OrderLineElecClpx = closure95.\u0024VB\u0024Local_ldBackOrder.OrderLineElecClpx,
              OrderLineEngComposite = (long?) 0L,
              OrderLinePeltCode = closure95.\u0024VB\u0024Local_ldBackOrder.OrderLinePeltCode,
              OrderLineDesc1 = closure95.\u0024VB\u0024Local_ldBackOrder.OrderLineDesc1,
              OrderStatus = (long?) 0L,
              OrderLineOrgCustRelDt = (DateTime?) closure95.\u0024VB\u0024Local_ldBackOrder.OrderLineOrgCustRelDt,
              OrderLineCurCustRelDt = (DateTime?) closure95.\u0024VB\u0024Local_ldBackOrder.OrderLineCurCustRelDt,
              OrderLineActCustRelDt = (DateTime?) closure95.\u0024VB\u0024Local_ldBackOrder.OrderLineActCustRelDt,
              OrderLineOrgMechDDDt = (DateTime?) closure95.\u0024VB\u0024Local_ldBackOrder.OrderLineOrgMechDDDt,
              OrderLineCurMechDDDt = (DateTime?) closure95.\u0024VB\u0024Local_ldBackOrder.OrderLineCurMechDDDt,
              OrderLineActMechDDDt = (DateTime?) closure95.\u0024VB\u0024Local_ldBackOrder.OrderLineActMechDDDt,
              OrderLineOrgAECompDt = (DateTime?) closure95.\u0024VB\u0024Local_ldBackOrder.OrderLineOrgAECompDt,
              OrderLineCurAECompDt = (DateTime?) closure95.\u0024VB\u0024Local_ldBackOrder.OrderLineCurAECompDt,
              OrderLineActAECompDt = (DateTime?) closure95.\u0024VB\u0024Local_ldBackOrder.OrderLineActAECompDt,
              OrderLineOrgEECompDt = (DateTime?) closure95.\u0024VB\u0024Local_ldBackOrder.OrderLineOrgEECompDt,
              OrderLineCurEECompDt = (DateTime?) closure95.\u0024VB\u0024Local_ldBackOrder.OrderLineCurEECompDt,
              OrderLineActEECompDt = (DateTime?) closure95.\u0024VB\u0024Local_ldBackOrder.OrderLineActEECompDt,
              OrderLineOrgAppElecDt = (DateTime?) closure95.\u0024VB\u0024Local_ldBackOrder.OrderLineOrgAppElecDt,
              OrderLineCurAppElecDt = (DateTime?) closure95.\u0024VB\u0024Local_ldBackOrder.OrderLineCurAppElecDt,
              OrderLineActAppElecDt = (DateTime?) closure95.\u0024VB\u0024Local_ldBackOrder.OrderLineActAppElecDt,
              OrderLineOrgAppSentDt = (DateTime?) closure95.\u0024VB\u0024Local_ldBackOrder.OrderLineOrgAppSentDt,
              OrderLineCurAppSentDt = (DateTime?) closure95.\u0024VB\u0024Local_ldBackOrder.OrderLineCurAppSentDt,
              OrderLineActAppSentDt = (DateTime?) closure95.\u0024VB\u0024Local_ldBackOrder.OrderLineActAppSentDt,
              OrderLineCplxA = closure95.\u0024VB\u0024Local_ldBackOrder.OrderLineCplxA,
              OrderLineCplxB = closure95.\u0024VB\u0024Local_ldBackOrder.OrderLineCplxB,
              OrderLineCplxC = closure95.\u0024VB\u0024Local_ldBackOrder.OrderLineCplxC,
              OrderLineAEHrs = (int?) closure95.\u0024VB\u0024Local_ldBackOrder.OrderLineAEHrs,
              OrderLineMDHrs = (int?) closure95.\u0024VB\u0024Local_ldBackOrder.OrderLineMDHrs,
              OrderLineEDHrs = (int?) closure95.\u0024VB\u0024Local_ldBackOrder.OrderLineEDHrs,
              OrderLineCOTPP = closure95.\u0024VB\u0024Local_ldBackOrder.OrderLineCOTPP
            });
            se0085CtEntities1.SaveChanges();
          }
          else if (source10.Count<OrderLinesExt>() == 1)
          {
            OrderLinesExt orderLinesExt = source10.First<OrderLinesExt>();
            // ISSUE: reference to a compiler-generated field
            orderLinesExt.OrderLineSER = closure95.\u0024VB\u0024Local_ldBackOrder.OrderLineSER;
            // ISSUE: reference to a compiler-generated field
            orderLinesExt.OrderLineBook = (Decimal?) closure95.\u0024VB\u0024Local_ldBackOrder.OrderLineBook;
            // ISSUE: reference to a compiler-generated field
            orderLinesExt.OrderLineNet = (Decimal?) closure95.\u0024VB\u0024Local_ldBackOrder.OrderLineNet;
            // ISSUE: reference to a compiler-generated field
            DateTime orderLineOrgTargetDt1 = closure95.\u0024VB\u0024Local_ldBackOrder.OrderLineOrgTargetDt;
            nullable11 = orderLinesExt.OrderLineOrgTargetDt;
            bool? nullable12;
            if (!nullable11.HasValue)
            {
              nullable12 = new bool?();
            }
            else
            {
              nullable8 = new bool?(DateTime.Compare(nullable11.GetValueOrDefault(), orderLineOrgTargetDt1) == 0);
              nullable12 = nullable8;
            }
            nullable6 = nullable12;
            DateTime date1 = Conversions.ToDate("01/01/1901");
            DateTime? orderLineOrgTargetDt2 = orderLinesExt.OrderLineOrgTargetDt;
            bool? nullable13;
            if (!orderLineOrgTargetDt2.HasValue)
            {
              nullable13 = new bool?();
            }
            else
            {
              nullable10 = new bool?(DateTime.Compare(orderLineOrgTargetDt2.GetValueOrDefault(), date1) == 0);
              nullable13 = nullable10;
            }
            nullable5 = nullable13;
            bool? nullable14;
            if (!nullable6.HasValue || !nullable6.GetValueOrDefault())
            {
              if (!nullable5.HasValue)
                nullable14 = new bool?();
              else if (!nullable5.GetValueOrDefault())
              {
                nullable14 = nullable6;
              }
              else
              {
                nullable3 = new bool?(true);
                nullable14 = nullable3;
              }
            }
            else
            {
              nullable9 = new bool?(true);
              nullable14 = nullable9;
            }
            nullable2 = nullable14;
            bool? nullable15;
            if (!nullable2.HasValue)
            {
              nullable15 = new bool?();
            }
            else
            {
              nullable7 = new bool?(!nullable2.GetValueOrDefault());
              nullable15 = nullable7;
            }
            nullable4 = nullable15;
            if (nullable4.GetValueOrDefault())
            {
              clsLogWriter lcLogWriter = this.lcLogWriter;
              // ISSUE: reference to a compiler-generated field
              string[] strArray1 = new string[6]
              {
                "Order ",
                closure95.\u0024VB\u0024Local_ldBackOrder.FOLineSLSS,
                " Data Changed - Orig Target Date From; ",
                null,
                null,
                null
              };
              string[] strArray2 = strArray1;
              int index = 3;
              nullable1 = orderLinesExt.OrderLineOrgTargetDt;
              string str2 = nullable1.HasValue ? Conversions.ToString(nullable1.GetValueOrDefault()) : (string) null;
              strArray2[index] = str2;
              strArray1[4] = " To: ";
              // ISSUE: reference to a compiler-generated field
              strArray1[5] = Conversions.ToString(closure95.\u0024VB\u0024Local_ldBackOrder.OrderLineOrgTargetDt);
              string logMessage = string.Concat(strArray1);
              lcLogWriter.logData(logMessage);
            }
            // ISSUE: reference to a compiler-generated field
            orderLinesExt.OrderLineOrgTargetDt = (DateTime?) closure95.\u0024VB\u0024Local_ldBackOrder.OrderLineOrgTargetDt;
            // ISSUE: reference to a compiler-generated field
            DateTime orderLineCurTargetDt1 = closure95.\u0024VB\u0024Local_ldBackOrder.OrderLineCurTargetDt;
            nullable11 = orderLinesExt.OrderLineCurTargetDt;
            bool? nullable16;
            if (!nullable11.HasValue)
            {
              nullable16 = new bool?();
            }
            else
            {
              nullable8 = new bool?(DateTime.Compare(nullable11.GetValueOrDefault(), orderLineCurTargetDt1) == 0);
              nullable16 = nullable8;
            }
            nullable6 = nullable16;
            DateTime date2 = Conversions.ToDate("01/01/1901");
            DateTime? orderLineCurTargetDt2 = orderLinesExt.OrderLineCurTargetDt;
            bool? nullable17;
            if (!orderLineCurTargetDt2.HasValue)
            {
              nullable17 = new bool?();
            }
            else
            {
              nullable10 = new bool?(DateTime.Compare(orderLineCurTargetDt2.GetValueOrDefault(), date2) == 0);
              nullable17 = nullable10;
            }
            nullable5 = nullable17;
            bool? nullable18;
            if (!nullable6.HasValue || !nullable6.GetValueOrDefault())
            {
              if (!nullable5.HasValue)
                nullable18 = new bool?();
              else if (!nullable5.GetValueOrDefault())
              {
                nullable18 = nullable6;
              }
              else
              {
                nullable3 = new bool?(true);
                nullable18 = nullable3;
              }
            }
            else
            {
              nullable9 = new bool?(true);
              nullable18 = nullable9;
            }
            nullable2 = nullable18;
            bool? nullable19;
            if (!nullable2.HasValue)
            {
              nullable19 = new bool?();
            }
            else
            {
              nullable7 = new bool?(!nullable2.GetValueOrDefault());
              nullable19 = nullable7;
            }
            nullable4 = nullable19;
            if (nullable4.GetValueOrDefault())
            {
              clsLogWriter lcLogWriter = this.lcLogWriter;
              // ISSUE: reference to a compiler-generated field
              string[] strArray1 = new string[6]
              {
                "Order ",
                closure95.\u0024VB\u0024Local_ldBackOrder.FOLineSLSS,
                " Data Changed - Current Target Date From; ",
                null,
                null,
                null
              };
              string[] strArray2 = strArray1;
              int index = 3;
              nullable1 = orderLinesExt.OrderLineCurTargetDt;
              string str2 = nullable1.HasValue ? Conversions.ToString(nullable1.GetValueOrDefault()) : (string) null;
              strArray2[index] = str2;
              strArray1[4] = " To: ";
              // ISSUE: reference to a compiler-generated field
              strArray1[5] = Conversions.ToString(closure95.\u0024VB\u0024Local_ldBackOrder.OrderLineCurTargetDt);
              string logMessage = string.Concat(strArray1);
              lcLogWriter.logData(logMessage);
              // ISSUE: reference to a compiler-generated field
              // ISSUE: reference to a compiler-generated field
              // ISSUE: reference to a compiler-generated field
              // ISSUE: reference to a compiler-generated field
              if (DateTime.Compare(closure95.\u0024VB\u0024Local_ldBackOrder.OrderLineCurTargetDt, DateTime.Today) > 0 & DateTime.Compare(closure95.\u0024VB\u0024Local_ldBackOrder.OrderLineCurTargetDt, Conversions.ToDate("01/01/2020")) < 0 & (closure95.\u0024VB\u0024Local_ldBackOrder.AssemblyLineId == 1 | closure95.\u0024VB\u0024Local_ldBackOrder.AssemblyLineId == 2))
              {
                // ISSUE: reference to a compiler-generated field
                str1 = closure95.\u0024VB\u0024Local_ldBackOrder.FOLineSLSS;
              }
            }
            // ISSUE: reference to a compiler-generated field
            orderLinesExt.OrderLineCurTargetDt = (DateTime?) closure95.\u0024VB\u0024Local_ldBackOrder.OrderLineCurTargetDt;
            // ISSUE: reference to a compiler-generated field
            DateTime orderLineOrgShipDt1 = closure95.\u0024VB\u0024Local_ldBackOrder.OrderLineOrgShipDt;
            nullable11 = orderLinesExt.OrderLineOrgShipDt;
            bool? nullable20;
            if (!nullable11.HasValue)
            {
              nullable20 = new bool?();
            }
            else
            {
              nullable8 = new bool?(DateTime.Compare(nullable11.GetValueOrDefault(), orderLineOrgShipDt1) == 0);
              nullable20 = nullable8;
            }
            nullable6 = nullable20;
            DateTime date3 = Conversions.ToDate("01/01/1901");
            DateTime? orderLineOrgShipDt2 = orderLinesExt.OrderLineOrgShipDt;
            bool? nullable21;
            if (!orderLineOrgShipDt2.HasValue)
            {
              nullable21 = new bool?();
            }
            else
            {
              nullable10 = new bool?(DateTime.Compare(orderLineOrgShipDt2.GetValueOrDefault(), date3) == 0);
              nullable21 = nullable10;
            }
            nullable5 = nullable21;
            bool? nullable22;
            if (!nullable6.HasValue || !nullable6.GetValueOrDefault())
            {
              if (!nullable5.HasValue)
                nullable22 = new bool?();
              else if (!nullable5.GetValueOrDefault())
              {
                nullable22 = nullable6;
              }
              else
              {
                nullable3 = new bool?(true);
                nullable22 = nullable3;
              }
            }
            else
            {
              nullable9 = new bool?(true);
              nullable22 = nullable9;
            }
            nullable2 = nullable22;
            bool? nullable23;
            if (!nullable2.HasValue)
            {
              nullable23 = new bool?();
            }
            else
            {
              nullable7 = new bool?(!nullable2.GetValueOrDefault());
              nullable23 = nullable7;
            }
            nullable4 = nullable23;
            if (nullable4.GetValueOrDefault())
            {
              clsLogWriter lcLogWriter = this.lcLogWriter;
              // ISSUE: reference to a compiler-generated field
              string[] strArray1 = new string[6]
              {
                "Order ",
                closure95.\u0024VB\u0024Local_ldBackOrder.FOLineSLSS,
                " Data Changed - Orig Ship Date From; ",
                null,
                null,
                null
              };
              string[] strArray2 = strArray1;
              int index = 3;
              nullable1 = orderLinesExt.OrderLineOrgShipDt;
              string str2 = nullable1.HasValue ? Conversions.ToString(nullable1.GetValueOrDefault()) : (string) null;
              strArray2[index] = str2;
              strArray1[4] = " To: ";
              // ISSUE: reference to a compiler-generated field
              strArray1[5] = Conversions.ToString(closure95.\u0024VB\u0024Local_ldBackOrder.OrderLineOrgShipDt);
              string logMessage = string.Concat(strArray1);
              lcLogWriter.logData(logMessage);
            }
            // ISSUE: reference to a compiler-generated field
            orderLinesExt.OrderLineOrgShipDt = (DateTime?) closure95.\u0024VB\u0024Local_ldBackOrder.OrderLineOrgShipDt;
            // ISSUE: reference to a compiler-generated field
            DateTime orderLineOrgAssyStDt1 = closure95.\u0024VB\u0024Local_ldBackOrder.OrderLineOrgAssyStDt;
            nullable11 = orderLinesExt.OrderLineOrgAssyStDt;
            bool? nullable24;
            if (!nullable11.HasValue)
            {
              nullable24 = new bool?();
            }
            else
            {
              nullable8 = new bool?(DateTime.Compare(nullable11.GetValueOrDefault(), orderLineOrgAssyStDt1) == 0);
              nullable24 = nullable8;
            }
            nullable6 = nullable24;
            DateTime date4 = Conversions.ToDate("01/01/1901");
            DateTime? orderLineOrgAssyStDt2 = orderLinesExt.OrderLineOrgAssyStDt;
            bool? nullable25;
            if (!orderLineOrgAssyStDt2.HasValue)
            {
              nullable25 = new bool?();
            }
            else
            {
              nullable10 = new bool?(DateTime.Compare(orderLineOrgAssyStDt2.GetValueOrDefault(), date4) == 0);
              nullable25 = nullable10;
            }
            nullable5 = nullable25;
            bool? nullable26;
            if (!nullable6.HasValue || !nullable6.GetValueOrDefault())
            {
              if (!nullable5.HasValue)
                nullable26 = new bool?();
              else if (!nullable5.GetValueOrDefault())
              {
                nullable26 = nullable6;
              }
              else
              {
                nullable3 = new bool?(true);
                nullable26 = nullable3;
              }
            }
            else
            {
              nullable9 = new bool?(true);
              nullable26 = nullable9;
            }
            nullable2 = nullable26;
            bool? nullable27;
            if (!nullable2.HasValue)
            {
              nullable27 = new bool?();
            }
            else
            {
              nullable7 = new bool?(!nullable2.GetValueOrDefault());
              nullable27 = nullable7;
            }
            nullable4 = nullable27;
            if (nullable4.GetValueOrDefault())
            {
              clsLogWriter lcLogWriter = this.lcLogWriter;
              // ISSUE: reference to a compiler-generated field
              string[] strArray1 = new string[6]
              {
                "Order ",
                closure95.\u0024VB\u0024Local_ldBackOrder.FOLineSLSS,
                " Data Changed - Orig Assembly Start Date From; ",
                null,
                null,
                null
              };
              string[] strArray2 = strArray1;
              int index = 3;
              nullable1 = orderLinesExt.OrderLineOrgAssyStDt;
              string str2 = nullable1.HasValue ? Conversions.ToString(nullable1.GetValueOrDefault()) : (string) null;
              strArray2[index] = str2;
              strArray1[4] = " To: ";
              // ISSUE: reference to a compiler-generated field
              strArray1[5] = Conversions.ToString(closure95.\u0024VB\u0024Local_ldBackOrder.OrderLineOrgAssyStDt);
              string logMessage = string.Concat(strArray1);
              lcLogWriter.logData(logMessage);
            }
            // ISSUE: reference to a compiler-generated field
            orderLinesExt.OrderLineOrgAssyStDt = (DateTime?) closure95.\u0024VB\u0024Local_ldBackOrder.OrderLineOrgAssyStDt;
            // ISSUE: reference to a compiler-generated field
            DateTime orderLineCurAssyStDt1 = closure95.\u0024VB\u0024Local_ldBackOrder.OrderLineCurAssyStDt;
            nullable11 = orderLinesExt.OrderLineCurAssyStDt;
            bool? nullable28;
            if (!nullable11.HasValue)
            {
              nullable28 = new bool?();
            }
            else
            {
              nullable8 = new bool?(DateTime.Compare(nullable11.GetValueOrDefault(), orderLineCurAssyStDt1) == 0);
              nullable28 = nullable8;
            }
            nullable6 = nullable28;
            DateTime date5 = Conversions.ToDate("01/01/1901");
            DateTime? orderLineCurAssyStDt2 = orderLinesExt.OrderLineCurAssyStDt;
            bool? nullable29;
            if (!orderLineCurAssyStDt2.HasValue)
            {
              nullable29 = new bool?();
            }
            else
            {
              nullable10 = new bool?(DateTime.Compare(orderLineCurAssyStDt2.GetValueOrDefault(), date5) == 0);
              nullable29 = nullable10;
            }
            nullable5 = nullable29;
            bool? nullable30;
            if (!nullable6.HasValue || !nullable6.GetValueOrDefault())
            {
              if (!nullable5.HasValue)
                nullable30 = new bool?();
              else if (!nullable5.GetValueOrDefault())
              {
                nullable30 = nullable6;
              }
              else
              {
                nullable3 = new bool?(true);
                nullable30 = nullable3;
              }
            }
            else
            {
              nullable9 = new bool?(true);
              nullable30 = nullable9;
            }
            nullable2 = nullable30;
            bool? nullable31;
            if (!nullable2.HasValue)
            {
              nullable31 = new bool?();
            }
            else
            {
              nullable7 = new bool?(!nullable2.GetValueOrDefault());
              nullable31 = nullable7;
            }
            nullable4 = nullable31;
            if (nullable4.GetValueOrDefault())
            {
              clsLogWriter lcLogWriter = this.lcLogWriter;
              // ISSUE: reference to a compiler-generated field
              string[] strArray1 = new string[6]
              {
                "Order ",
                closure95.\u0024VB\u0024Local_ldBackOrder.FOLineSLSS,
                " Data Changed - Current Assembly Start Date From; ",
                null,
                null,
                null
              };
              string[] strArray2 = strArray1;
              int index = 3;
              nullable1 = orderLinesExt.OrderLineCurAssyStDt;
              string str2 = nullable1.HasValue ? Conversions.ToString(nullable1.GetValueOrDefault()) : (string) null;
              strArray2[index] = str2;
              strArray1[4] = " To: ";
              // ISSUE: reference to a compiler-generated field
              strArray1[5] = Conversions.ToString(closure95.\u0024VB\u0024Local_ldBackOrder.OrderLineCurAssyStDt);
              string logMessage = string.Concat(strArray1);
              lcLogWriter.logData(logMessage);
            }
            // ISSUE: reference to a compiler-generated field
            orderLinesExt.OrderLineCurAssyStDt = (DateTime?) closure95.\u0024VB\u0024Local_ldBackOrder.OrderLineCurAssyStDt;
            DateTime dateTime = Convert.ToDateTime("01-01-1901");
            // ISSUE: reference to a compiler-generated field
            // ISSUE: reference to a compiler-generated field
            // ISSUE: reference to a compiler-generated field
            if (Operators.CompareString(closure95.\u0024VB\u0024Local_ldBackOrder.AssemblyLineAbbrv, "SWBD", false) == 0 | Operators.CompareString(closure95.\u0024VB\u0024Local_ldBackOrder.AssemblyLineAbbrv, "LVDO", false) == 0 && DateTime.Compare(closure95.\u0024VB\u0024Local_ldBackOrder.OrderLineActEngrRelDt, Conversions.ToDate("01/01/1901")) > 0)
            {
              // ISSUE: reference to a compiler-generated field
              // ISSUE: reference to a compiler-generated field
              if ((closure95.\u0024VB\u0024Local_ldBackOrder.OrderLineActAssyStDt - closure95.\u0024VB\u0024Local_ldBackOrder.OrderLineActEngrRelDt).TotalDays > 1.0)
              {
                // ISSUE: reference to a compiler-generated field
                // ISSUE: reference to a compiler-generated field
                // ISSUE: reference to a compiler-generated field
                this.lcLogWriter.logData("Order " + closure95.\u0024VB\u0024Local_ldBackOrder.FOLineSLSS + " Data Error - Actual Engr Release and Actual Assembly Start Date don't match, Engr Rel; " + Conversions.ToString(closure95.\u0024VB\u0024Local_ldBackOrder.OrderLineActEngrRelDt) + " Assy Start; " + Conversions.ToString(closure95.\u0024VB\u0024Local_ldBackOrder.OrderLineActAssyStDt));
              }
              // ISSUE: reference to a compiler-generated field
              // ISSUE: reference to a compiler-generated field
              if (DateTime.Compare(closure95.\u0024VB\u0024Local_ldBackOrder.OrderLineActAssyStDt, dateTime) == 0 && (DateTime.Now - closure95.\u0024VB\u0024Local_ldBackOrder.OrderLineActEngrRelDt).TotalDays > 1.0)
              {
                // ISSUE: reference to a compiler-generated field
                // ISSUE: reference to a compiler-generated field
                // ISSUE: reference to a compiler-generated field
                this.lcLogWriter.logData("Order " + closure95.\u0024VB\u0024Local_ldBackOrder.FOLineSLSS + " Order Processing Error - Actual Engr Release more than 1 day and Actual Assembly Start Date = 01/01/1901, Engr Rel; " + Conversions.ToString(closure95.\u0024VB\u0024Local_ldBackOrder.OrderLineActEngrRelDt) + " Assy Start; " + Conversions.ToString(closure95.\u0024VB\u0024Local_ldBackOrder.OrderLineActAssyStDt));
              }
            }
            // ISSUE: reference to a compiler-generated field
            DateTime lineOrgEngrRelDt1 = closure95.\u0024VB\u0024Local_ldBackOrder.OrderLineOrgEngrRelDt;
            nullable11 = orderLinesExt.OrderLineOrgEngrRelDt;
            bool? nullable32;
            if (!nullable11.HasValue)
            {
              nullable32 = new bool?();
            }
            else
            {
              nullable8 = new bool?(DateTime.Compare(nullable11.GetValueOrDefault(), lineOrgEngrRelDt1) == 0);
              nullable32 = nullable8;
            }
            nullable6 = nullable32;
            DateTime date6 = Conversions.ToDate("01/01/1901");
            DateTime? lineOrgEngrRelDt2 = orderLinesExt.OrderLineOrgEngrRelDt;
            bool? nullable33;
            if (!lineOrgEngrRelDt2.HasValue)
            {
              nullable33 = new bool?();
            }
            else
            {
              nullable10 = new bool?(DateTime.Compare(lineOrgEngrRelDt2.GetValueOrDefault(), date6) == 0);
              nullable33 = nullable10;
            }
            nullable5 = nullable33;
            bool? nullable34;
            if (!nullable6.HasValue || !nullable6.GetValueOrDefault())
            {
              if (!nullable5.HasValue)
                nullable34 = new bool?();
              else if (!nullable5.GetValueOrDefault())
              {
                nullable34 = nullable6;
              }
              else
              {
                nullable3 = new bool?(true);
                nullable34 = nullable3;
              }
            }
            else
            {
              nullable9 = new bool?(true);
              nullable34 = nullable9;
            }
            nullable2 = nullable34;
            bool? nullable35;
            if (!nullable2.HasValue)
            {
              nullable35 = new bool?();
            }
            else
            {
              nullable7 = new bool?(!nullable2.GetValueOrDefault());
              nullable35 = nullable7;
            }
            nullable4 = nullable35;
            if (nullable4.GetValueOrDefault())
            {
              clsLogWriter lcLogWriter = this.lcLogWriter;
              // ISSUE: reference to a compiler-generated field
              string[] strArray1 = new string[6]
              {
                "Order ",
                closure95.\u0024VB\u0024Local_ldBackOrder.FOLineSLSS,
                " Data Changed - Orig Engr Rel Date From; ",
                null,
                null,
                null
              };
              string[] strArray2 = strArray1;
              int index = 3;
              nullable1 = orderLinesExt.OrderLineOrgEngrRelDt;
              string str2 = nullable1.HasValue ? Conversions.ToString(nullable1.GetValueOrDefault()) : (string) null;
              strArray2[index] = str2;
              strArray1[4] = " To: ";
              // ISSUE: reference to a compiler-generated field
              strArray1[5] = Conversions.ToString(closure95.\u0024VB\u0024Local_ldBackOrder.OrderLineOrgEngrRelDt);
              string logMessage = string.Concat(strArray1);
              lcLogWriter.logData(logMessage);
            }
            // ISSUE: reference to a compiler-generated field
            orderLinesExt.OrderLineOrgEngrRelDt = (DateTime?) closure95.\u0024VB\u0024Local_ldBackOrder.OrderLineOrgEngrRelDt;
            // ISSUE: reference to a compiler-generated field
            DateTime lineCurEngrRelDt1 = closure95.\u0024VB\u0024Local_ldBackOrder.OrderLineCurEngrRelDt;
            nullable11 = orderLinesExt.OrderLineCurEngrRelDt;
            bool? nullable36;
            if (!nullable11.HasValue)
            {
              nullable36 = new bool?();
            }
            else
            {
              nullable8 = new bool?(DateTime.Compare(nullable11.GetValueOrDefault(), lineCurEngrRelDt1) == 0);
              nullable36 = nullable8;
            }
            nullable6 = nullable36;
            DateTime date7 = Conversions.ToDate("01/01/1901");
            DateTime? lineCurEngrRelDt2 = orderLinesExt.OrderLineCurEngrRelDt;
            bool? nullable37;
            if (!lineCurEngrRelDt2.HasValue)
            {
              nullable37 = new bool?();
            }
            else
            {
              nullable10 = new bool?(DateTime.Compare(lineCurEngrRelDt2.GetValueOrDefault(), date7) == 0);
              nullable37 = nullable10;
            }
            nullable5 = nullable37;
            bool? nullable38;
            if (!nullable6.HasValue || !nullable6.GetValueOrDefault())
            {
              if (!nullable5.HasValue)
                nullable38 = new bool?();
              else if (!nullable5.GetValueOrDefault())
              {
                nullable38 = nullable6;
              }
              else
              {
                nullable3 = new bool?(true);
                nullable38 = nullable3;
              }
            }
            else
            {
              nullable9 = new bool?(true);
              nullable38 = nullable9;
            }
            nullable2 = nullable38;
            bool? nullable39;
            if (!nullable2.HasValue)
            {
              nullable39 = new bool?();
            }
            else
            {
              nullable7 = new bool?(!nullable2.GetValueOrDefault());
              nullable39 = nullable7;
            }
            nullable4 = nullable39;
            if (nullable4.GetValueOrDefault())
            {
              clsLogWriter lcLogWriter = this.lcLogWriter;
              // ISSUE: reference to a compiler-generated field
              string[] strArray1 = new string[6]
              {
                "Order ",
                closure95.\u0024VB\u0024Local_ldBackOrder.FOLineSLSS,
                " Data Changed - Current Engr Rel Date From; ",
                null,
                null,
                null
              };
              string[] strArray2 = strArray1;
              int index = 3;
              nullable1 = orderLinesExt.OrderLineCurEngrRelDt;
              string str2 = nullable1.HasValue ? Conversions.ToString(nullable1.GetValueOrDefault()) : (string) null;
              strArray2[index] = str2;
              strArray1[4] = " To: ";
              // ISSUE: reference to a compiler-generated field
              strArray1[5] = Conversions.ToString(closure95.\u0024VB\u0024Local_ldBackOrder.OrderLineCurEngrRelDt);
              string logMessage = string.Concat(strArray1);
              lcLogWriter.logData(logMessage);
            }
            // ISSUE: reference to a compiler-generated field
            orderLinesExt.OrderLineCurEngrRelDt = (DateTime?) closure95.\u0024VB\u0024Local_ldBackOrder.OrderLineCurEngrRelDt;
            // ISSUE: reference to a compiler-generated field
            DateTime lineActEngrRelDt1 = closure95.\u0024VB\u0024Local_ldBackOrder.OrderLineActEngrRelDt;
            nullable11 = orderLinesExt.OrderLineActEngrRelDt;
            bool? nullable40;
            if (!nullable11.HasValue)
            {
              nullable40 = new bool?();
            }
            else
            {
              nullable8 = new bool?(DateTime.Compare(nullable11.GetValueOrDefault(), lineActEngrRelDt1) == 0);
              nullable40 = nullable8;
            }
            nullable6 = nullable40;
            DateTime date8 = Conversions.ToDate("01/01/1901");
            DateTime? lineActEngrRelDt2 = orderLinesExt.OrderLineActEngrRelDt;
            bool? nullable41;
            if (!lineActEngrRelDt2.HasValue)
            {
              nullable41 = new bool?();
            }
            else
            {
              nullable10 = new bool?(DateTime.Compare(lineActEngrRelDt2.GetValueOrDefault(), date8) == 0);
              nullable41 = nullable10;
            }
            nullable5 = nullable41;
            bool? nullable42;
            if (!nullable6.HasValue || !nullable6.GetValueOrDefault())
            {
              if (!nullable5.HasValue)
                nullable42 = new bool?();
              else if (!nullable5.GetValueOrDefault())
              {
                nullable42 = nullable6;
              }
              else
              {
                nullable3 = new bool?(true);
                nullable42 = nullable3;
              }
            }
            else
            {
              nullable9 = new bool?(true);
              nullable42 = nullable9;
            }
            nullable2 = nullable42;
            bool? nullable43;
            if (!nullable2.HasValue)
            {
              nullable43 = new bool?();
            }
            else
            {
              nullable7 = new bool?(!nullable2.GetValueOrDefault());
              nullable43 = nullable7;
            }
            nullable4 = nullable43;
            if (nullable4.GetValueOrDefault())
            {
              clsLogWriter lcLogWriter = this.lcLogWriter;
              // ISSUE: reference to a compiler-generated field
              string[] strArray1 = new string[6]
              {
                "Order ",
                closure95.\u0024VB\u0024Local_ldBackOrder.FOLineSLSS,
                " Data Changed - Actual Engr Rel Date From; ",
                null,
                null,
                null
              };
              string[] strArray2 = strArray1;
              int index = 3;
              nullable1 = orderLinesExt.OrderLineActEngrRelDt;
              string str2 = nullable1.HasValue ? Conversions.ToString(nullable1.GetValueOrDefault()) : (string) null;
              strArray2[index] = str2;
              strArray1[4] = " To: ";
              // ISSUE: reference to a compiler-generated field
              strArray1[5] = Conversions.ToString(closure95.\u0024VB\u0024Local_ldBackOrder.OrderLineActEngrRelDt);
              string logMessage = string.Concat(strArray1);
              lcLogWriter.logData(logMessage);
            }
            // ISSUE: reference to a compiler-generated field
            orderLinesExt.OrderLineActEngrRelDt = (DateTime?) closure95.\u0024VB\u0024Local_ldBackOrder.OrderLineActEngrRelDt;
            // ISSUE: reference to a compiler-generated field
            DateTime orderLineNb4Dt1 = closure95.\u0024VB\u0024Local_ldBackOrder.OrderLineNB4Dt;
            nullable11 = orderLinesExt.OrderLineNB4Dt;
            bool? nullable44;
            if (!nullable11.HasValue)
            {
              nullable44 = new bool?();
            }
            else
            {
              nullable8 = new bool?(DateTime.Compare(nullable11.GetValueOrDefault(), orderLineNb4Dt1) == 0);
              nullable44 = nullable8;
            }
            nullable6 = nullable44;
            DateTime date9 = Conversions.ToDate("01/01/1901");
            DateTime? orderLineNb4Dt2 = orderLinesExt.OrderLineNB4Dt;
            bool? nullable45;
            if (!orderLineNb4Dt2.HasValue)
            {
              nullable45 = new bool?();
            }
            else
            {
              nullable10 = new bool?(DateTime.Compare(orderLineNb4Dt2.GetValueOrDefault(), date9) == 0);
              nullable45 = nullable10;
            }
            nullable5 = nullable45;
            bool? nullable46;
            if (!nullable6.HasValue || !nullable6.GetValueOrDefault())
            {
              if (!nullable5.HasValue)
                nullable46 = new bool?();
              else if (!nullable5.GetValueOrDefault())
              {
                nullable46 = nullable6;
              }
              else
              {
                nullable3 = new bool?(true);
                nullable46 = nullable3;
              }
            }
            else
            {
              nullable9 = new bool?(true);
              nullable46 = nullable9;
            }
            nullable2 = nullable46;
            bool? nullable47;
            if (!nullable2.HasValue)
            {
              nullable47 = new bool?();
            }
            else
            {
              nullable7 = new bool?(!nullable2.GetValueOrDefault());
              nullable47 = nullable7;
            }
            nullable4 = nullable47;
            if (nullable4.GetValueOrDefault())
            {
              clsLogWriter lcLogWriter = this.lcLogWriter;
              // ISSUE: reference to a compiler-generated field
              string[] strArray1 = new string[6]
              {
                "Order ",
                closure95.\u0024VB\u0024Local_ldBackOrder.FOLineSLSS,
                " Data Changed - NB4 Date From; ",
                null,
                null,
                null
              };
              string[] strArray2 = strArray1;
              int index = 3;
              nullable1 = orderLinesExt.OrderLineNB4Dt;
              string str2 = nullable1.HasValue ? Conversions.ToString(nullable1.GetValueOrDefault()) : (string) null;
              strArray2[index] = str2;
              strArray1[4] = " To: ";
              // ISSUE: reference to a compiler-generated field
              strArray1[5] = Conversions.ToString(closure95.\u0024VB\u0024Local_ldBackOrder.OrderLineNB4Dt);
              string logMessage = string.Concat(strArray1);
              lcLogWriter.logData(logMessage);
            }
            // ISSUE: reference to a compiler-generated field
            orderLinesExt.OrderLineNB4Dt = (DateTime?) closure95.\u0024VB\u0024Local_ldBackOrder.OrderLineNB4Dt;
            // ISSUE: reference to a compiler-generated field
            orderLinesExt.OrderLineEngrGrp = closure95.\u0024VB\u0024Local_ldBackOrder.OrderLineEngrGrp;
            // ISSUE: reference to a compiler-generated field
            orderLinesExt.OrderLineMechClpx = closure95.\u0024VB\u0024Local_ldBackOrder.OrderLineMechClpx;
            // ISSUE: reference to a compiler-generated field
            orderLinesExt.OrderLineElecClpx = closure95.\u0024VB\u0024Local_ldBackOrder.OrderLineElecClpx;
            orderLinesExt.OrderLineEngComposite = (long?) 0L;
            // ISSUE: reference to a compiler-generated field
            orderLinesExt.OrderLinePeltCode = closure95.\u0024VB\u0024Local_ldBackOrder.OrderLinePeltCode;
            // ISSUE: reference to a compiler-generated field
            orderLinesExt.OrderLineDesc1 = closure95.\u0024VB\u0024Local_ldBackOrder.OrderLineDesc1;
            // ISSUE: reference to a compiler-generated field
            DateTime lineOrgCustRelDt1 = closure95.\u0024VB\u0024Local_ldBackOrder.OrderLineOrgCustRelDt;
            nullable11 = orderLinesExt.OrderLineOrgCustRelDt;
            bool? nullable48;
            if (!nullable11.HasValue)
            {
              nullable48 = new bool?();
            }
            else
            {
              nullable8 = new bool?(DateTime.Compare(nullable11.GetValueOrDefault(), lineOrgCustRelDt1) == 0);
              nullable48 = nullable8;
            }
            nullable6 = nullable48;
            DateTime date10 = Conversions.ToDate("01/01/1901");
            DateTime? lineOrgCustRelDt2 = orderLinesExt.OrderLineOrgCustRelDt;
            bool? nullable49;
            if (!lineOrgCustRelDt2.HasValue)
            {
              nullable49 = new bool?();
            }
            else
            {
              nullable10 = new bool?(DateTime.Compare(lineOrgCustRelDt2.GetValueOrDefault(), date10) == 0);
              nullable49 = nullable10;
            }
            nullable5 = nullable49;
            bool? nullable50;
            if (!nullable6.HasValue || !nullable6.GetValueOrDefault())
            {
              if (!nullable5.HasValue)
                nullable50 = new bool?();
              else if (!nullable5.GetValueOrDefault())
              {
                nullable50 = nullable6;
              }
              else
              {
                nullable3 = new bool?(true);
                nullable50 = nullable3;
              }
            }
            else
            {
              nullable9 = new bool?(true);
              nullable50 = nullable9;
            }
            nullable2 = nullable50;
            bool? nullable51;
            if (!nullable2.HasValue)
            {
              nullable51 = new bool?();
            }
            else
            {
              nullable7 = new bool?(!nullable2.GetValueOrDefault());
              nullable51 = nullable7;
            }
            nullable4 = nullable51;
            if (nullable4.GetValueOrDefault())
            {
              clsLogWriter lcLogWriter = this.lcLogWriter;
              // ISSUE: reference to a compiler-generated field
              string[] strArray1 = new string[6]
              {
                "Order ",
                closure95.\u0024VB\u0024Local_ldBackOrder.FOLineSLSS,
                " Data Changed - Orig Cust Rel Date From; ",
                null,
                null,
                null
              };
              string[] strArray2 = strArray1;
              int index = 3;
              nullable1 = orderLinesExt.OrderLineOrgCustRelDt;
              string str2 = nullable1.HasValue ? Conversions.ToString(nullable1.GetValueOrDefault()) : (string) null;
              strArray2[index] = str2;
              strArray1[4] = " To: ";
              // ISSUE: reference to a compiler-generated field
              strArray1[5] = Conversions.ToString(closure95.\u0024VB\u0024Local_ldBackOrder.OrderLineOrgCustRelDt);
              string logMessage = string.Concat(strArray1);
              lcLogWriter.logData(logMessage);
            }
            // ISSUE: reference to a compiler-generated field
            orderLinesExt.OrderLineOrgCustRelDt = (DateTime?) closure95.\u0024VB\u0024Local_ldBackOrder.OrderLineOrgCustRelDt;
            // ISSUE: reference to a compiler-generated field
            DateTime lineCurCustRelDt1 = closure95.\u0024VB\u0024Local_ldBackOrder.OrderLineCurCustRelDt;
            nullable11 = orderLinesExt.OrderLineCurCustRelDt;
            bool? nullable52;
            if (!nullable11.HasValue)
            {
              nullable52 = new bool?();
            }
            else
            {
              nullable8 = new bool?(DateTime.Compare(nullable11.GetValueOrDefault(), lineCurCustRelDt1) == 0);
              nullable52 = nullable8;
            }
            nullable6 = nullable52;
            DateTime date11 = Conversions.ToDate("01/01/1901");
            DateTime? lineCurCustRelDt2 = orderLinesExt.OrderLineCurCustRelDt;
            bool? nullable53;
            if (!lineCurCustRelDt2.HasValue)
            {
              nullable53 = new bool?();
            }
            else
            {
              nullable10 = new bool?(DateTime.Compare(lineCurCustRelDt2.GetValueOrDefault(), date11) == 0);
              nullable53 = nullable10;
            }
            nullable5 = nullable53;
            bool? nullable54;
            if (!nullable6.HasValue || !nullable6.GetValueOrDefault())
            {
              if (!nullable5.HasValue)
                nullable54 = new bool?();
              else if (!nullable5.GetValueOrDefault())
              {
                nullable54 = nullable6;
              }
              else
              {
                nullable3 = new bool?(true);
                nullable54 = nullable3;
              }
            }
            else
            {
              nullable9 = new bool?(true);
              nullable54 = nullable9;
            }
            nullable2 = nullable54;
            bool? nullable55;
            if (!nullable2.HasValue)
            {
              nullable55 = new bool?();
            }
            else
            {
              nullable7 = new bool?(!nullable2.GetValueOrDefault());
              nullable55 = nullable7;
            }
            nullable4 = nullable55;
            if (nullable4.GetValueOrDefault())
            {
              clsLogWriter lcLogWriter = this.lcLogWriter;
              // ISSUE: reference to a compiler-generated field
              string[] strArray1 = new string[6]
              {
                "Order ",
                closure95.\u0024VB\u0024Local_ldBackOrder.FOLineSLSS,
                " Data Changed - Current Cust Rel Date From; ",
                null,
                null,
                null
              };
              string[] strArray2 = strArray1;
              int index = 3;
              nullable1 = orderLinesExt.OrderLineCurCustRelDt;
              string str2 = nullable1.HasValue ? Conversions.ToString(nullable1.GetValueOrDefault()) : (string) null;
              strArray2[index] = str2;
              strArray1[4] = " To: ";
              // ISSUE: reference to a compiler-generated field
              strArray1[5] = Conversions.ToString(closure95.\u0024VB\u0024Local_ldBackOrder.OrderLineCurCustRelDt);
              string logMessage = string.Concat(strArray1);
              lcLogWriter.logData(logMessage);
            }
            // ISSUE: reference to a compiler-generated field
            orderLinesExt.OrderLineCurCustRelDt = (DateTime?) closure95.\u0024VB\u0024Local_ldBackOrder.OrderLineCurCustRelDt;
            // ISSUE: reference to a compiler-generated field
            DateTime lineActCustRelDt1 = closure95.\u0024VB\u0024Local_ldBackOrder.OrderLineActCustRelDt;
            nullable11 = orderLinesExt.OrderLineActCustRelDt;
            bool? nullable56;
            if (!nullable11.HasValue)
            {
              nullable56 = new bool?();
            }
            else
            {
              nullable8 = new bool?(DateTime.Compare(nullable11.GetValueOrDefault(), lineActCustRelDt1) == 0);
              nullable56 = nullable8;
            }
            nullable6 = nullable56;
            DateTime date12 = Conversions.ToDate("01/01/1901");
            DateTime? lineActCustRelDt2 = orderLinesExt.OrderLineActCustRelDt;
            bool? nullable57;
            if (!lineActCustRelDt2.HasValue)
            {
              nullable57 = new bool?();
            }
            else
            {
              nullable10 = new bool?(DateTime.Compare(lineActCustRelDt2.GetValueOrDefault(), date12) == 0);
              nullable57 = nullable10;
            }
            nullable5 = nullable57;
            bool? nullable58;
            if (!nullable6.HasValue || !nullable6.GetValueOrDefault())
            {
              if (!nullable5.HasValue)
                nullable58 = new bool?();
              else if (!nullable5.GetValueOrDefault())
              {
                nullable58 = nullable6;
              }
              else
              {
                nullable3 = new bool?(true);
                nullable58 = nullable3;
              }
            }
            else
            {
              nullable9 = new bool?(true);
              nullable58 = nullable9;
            }
            nullable2 = nullable58;
            bool? nullable59;
            if (!nullable2.HasValue)
            {
              nullable59 = new bool?();
            }
            else
            {
              nullable7 = new bool?(!nullable2.GetValueOrDefault());
              nullable59 = nullable7;
            }
            nullable4 = nullable59;
            if (nullable4.GetValueOrDefault())
            {
              clsLogWriter lcLogWriter = this.lcLogWriter;
              // ISSUE: reference to a compiler-generated field
              string[] strArray1 = new string[6]
              {
                "Order ",
                closure95.\u0024VB\u0024Local_ldBackOrder.FOLineSLSS,
                " Data Changed - Actual Cust Rel Date From; ",
                null,
                null,
                null
              };
              string[] strArray2 = strArray1;
              int index = 3;
              nullable1 = orderLinesExt.OrderLineActCustRelDt;
              string str2 = nullable1.HasValue ? Conversions.ToString(nullable1.GetValueOrDefault()) : (string) null;
              strArray2[index] = str2;
              strArray1[4] = " To: ";
              // ISSUE: reference to a compiler-generated field
              strArray1[5] = Conversions.ToString(closure95.\u0024VB\u0024Local_ldBackOrder.OrderLineActCustRelDt);
              string logMessage = string.Concat(strArray1);
              lcLogWriter.logData(logMessage);
            }
            // ISSUE: reference to a compiler-generated field
            orderLinesExt.OrderLineActCustRelDt = (DateTime?) closure95.\u0024VB\u0024Local_ldBackOrder.OrderLineActCustRelDt;
            // ISSUE: reference to a compiler-generated field
            DateTime orderLineOrgMechDdDt1 = closure95.\u0024VB\u0024Local_ldBackOrder.OrderLineOrgMechDDDt;
            nullable11 = orderLinesExt.OrderLineOrgMechDDDt;
            bool? nullable60;
            if (!nullable11.HasValue)
            {
              nullable60 = new bool?();
            }
            else
            {
              nullable8 = new bool?(DateTime.Compare(nullable11.GetValueOrDefault(), orderLineOrgMechDdDt1) == 0);
              nullable60 = nullable8;
            }
            nullable6 = nullable60;
            DateTime date13 = Conversions.ToDate("01/01/1901");
            DateTime? orderLineOrgMechDdDt2 = orderLinesExt.OrderLineOrgMechDDDt;
            bool? nullable61;
            if (!orderLineOrgMechDdDt2.HasValue)
            {
              nullable61 = new bool?();
            }
            else
            {
              nullable10 = new bool?(DateTime.Compare(orderLineOrgMechDdDt2.GetValueOrDefault(), date13) == 0);
              nullable61 = nullable10;
            }
            nullable5 = nullable61;
            bool? nullable62;
            if (!nullable6.HasValue || !nullable6.GetValueOrDefault())
            {
              if (!nullable5.HasValue)
                nullable62 = new bool?();
              else if (!nullable5.GetValueOrDefault())
              {
                nullable62 = nullable6;
              }
              else
              {
                nullable3 = new bool?(true);
                nullable62 = nullable3;
              }
            }
            else
            {
              nullable9 = new bool?(true);
              nullable62 = nullable9;
            }
            nullable2 = nullable62;
            bool? nullable63;
            if (!nullable2.HasValue)
            {
              nullable63 = new bool?();
            }
            else
            {
              nullable7 = new bool?(!nullable2.GetValueOrDefault());
              nullable63 = nullable7;
            }
            nullable4 = nullable63;
            if (nullable4.GetValueOrDefault())
            {
              clsLogWriter lcLogWriter = this.lcLogWriter;
              // ISSUE: reference to a compiler-generated field
              string[] strArray1 = new string[6]
              {
                "Order ",
                closure95.\u0024VB\u0024Local_ldBackOrder.FOLineSLSS,
                " Data Changed - Orig Mech DD Date From; ",
                null,
                null,
                null
              };
              string[] strArray2 = strArray1;
              int index = 3;
              nullable1 = orderLinesExt.OrderLineOrgMechDDDt;
              string str2 = nullable1.HasValue ? Conversions.ToString(nullable1.GetValueOrDefault()) : (string) null;
              strArray2[index] = str2;
              strArray1[4] = " To: ";
              // ISSUE: reference to a compiler-generated field
              strArray1[5] = Conversions.ToString(closure95.\u0024VB\u0024Local_ldBackOrder.OrderLineOrgMechDDDt);
              string logMessage = string.Concat(strArray1);
              lcLogWriter.logData(logMessage);
            }
            // ISSUE: reference to a compiler-generated field
            orderLinesExt.OrderLineOrgMechDDDt = (DateTime?) closure95.\u0024VB\u0024Local_ldBackOrder.OrderLineOrgMechDDDt;
            // ISSUE: reference to a compiler-generated field
            DateTime orderLineCurMechDdDt1 = closure95.\u0024VB\u0024Local_ldBackOrder.OrderLineCurMechDDDt;
            nullable11 = orderLinesExt.OrderLineCurMechDDDt;
            bool? nullable64;
            if (!nullable11.HasValue)
            {
              nullable64 = new bool?();
            }
            else
            {
              nullable8 = new bool?(DateTime.Compare(nullable11.GetValueOrDefault(), orderLineCurMechDdDt1) == 0);
              nullable64 = nullable8;
            }
            nullable6 = nullable64;
            DateTime date14 = Conversions.ToDate("01/01/1901");
            DateTime? orderLineCurMechDdDt2 = orderLinesExt.OrderLineCurMechDDDt;
            bool? nullable65;
            if (!orderLineCurMechDdDt2.HasValue)
            {
              nullable65 = new bool?();
            }
            else
            {
              nullable10 = new bool?(DateTime.Compare(orderLineCurMechDdDt2.GetValueOrDefault(), date14) == 0);
              nullable65 = nullable10;
            }
            nullable5 = nullable65;
            bool? nullable66;
            if (!nullable6.HasValue || !nullable6.GetValueOrDefault())
            {
              if (!nullable5.HasValue)
                nullable66 = new bool?();
              else if (!nullable5.GetValueOrDefault())
              {
                nullable66 = nullable6;
              }
              else
              {
                nullable3 = new bool?(true);
                nullable66 = nullable3;
              }
            }
            else
            {
              nullable9 = new bool?(true);
              nullable66 = nullable9;
            }
            nullable2 = nullable66;
            bool? nullable67;
            if (!nullable2.HasValue)
            {
              nullable67 = new bool?();
            }
            else
            {
              nullable7 = new bool?(!nullable2.GetValueOrDefault());
              nullable67 = nullable7;
            }
            nullable4 = nullable67;
            if (nullable4.GetValueOrDefault())
            {
              clsLogWriter lcLogWriter = this.lcLogWriter;
              // ISSUE: reference to a compiler-generated field
              string[] strArray1 = new string[6]
              {
                "Order ",
                closure95.\u0024VB\u0024Local_ldBackOrder.FOLineSLSS,
                " Data Changed - Current Mech DD Date From; ",
                null,
                null,
                null
              };
              string[] strArray2 = strArray1;
              int index = 3;
              nullable1 = orderLinesExt.OrderLineCurMechDDDt;
              string str2 = nullable1.HasValue ? Conversions.ToString(nullable1.GetValueOrDefault()) : (string) null;
              strArray2[index] = str2;
              strArray1[4] = " To: ";
              // ISSUE: reference to a compiler-generated field
              strArray1[5] = Conversions.ToString(closure95.\u0024VB\u0024Local_ldBackOrder.OrderLineCurMechDDDt);
              string logMessage = string.Concat(strArray1);
              lcLogWriter.logData(logMessage);
            }
            // ISSUE: reference to a compiler-generated field
            orderLinesExt.OrderLineCurMechDDDt = (DateTime?) closure95.\u0024VB\u0024Local_ldBackOrder.OrderLineCurMechDDDt;
            // ISSUE: reference to a compiler-generated field
            DateTime orderLineActMechDdDt1 = closure95.\u0024VB\u0024Local_ldBackOrder.OrderLineActMechDDDt;
            nullable11 = orderLinesExt.OrderLineActMechDDDt;
            bool? nullable68;
            if (!nullable11.HasValue)
            {
              nullable68 = new bool?();
            }
            else
            {
              nullable8 = new bool?(DateTime.Compare(nullable11.GetValueOrDefault(), orderLineActMechDdDt1) == 0);
              nullable68 = nullable8;
            }
            nullable6 = nullable68;
            DateTime date15 = Conversions.ToDate("01/01/1901");
            DateTime? orderLineActMechDdDt2 = orderLinesExt.OrderLineActMechDDDt;
            bool? nullable69;
            if (!orderLineActMechDdDt2.HasValue)
            {
              nullable69 = new bool?();
            }
            else
            {
              nullable10 = new bool?(DateTime.Compare(orderLineActMechDdDt2.GetValueOrDefault(), date15) == 0);
              nullable69 = nullable10;
            }
            nullable5 = nullable69;
            bool? nullable70;
            if (!nullable6.HasValue || !nullable6.GetValueOrDefault())
            {
              if (!nullable5.HasValue)
                nullable70 = new bool?();
              else if (!nullable5.GetValueOrDefault())
              {
                nullable70 = nullable6;
              }
              else
              {
                nullable3 = new bool?(true);
                nullable70 = nullable3;
              }
            }
            else
            {
              nullable9 = new bool?(true);
              nullable70 = nullable9;
            }
            nullable2 = nullable70;
            bool? nullable71;
            if (!nullable2.HasValue)
            {
              nullable71 = new bool?();
            }
            else
            {
              nullable7 = new bool?(!nullable2.GetValueOrDefault());
              nullable71 = nullable7;
            }
            nullable4 = nullable71;
            if (nullable4.GetValueOrDefault())
            {
              clsLogWriter lcLogWriter = this.lcLogWriter;
              // ISSUE: reference to a compiler-generated field
              string[] strArray1 = new string[6]
              {
                "Order ",
                closure95.\u0024VB\u0024Local_ldBackOrder.FOLineSLSS,
                " Data Changed - Actual Mech DD Date From; ",
                null,
                null,
                null
              };
              string[] strArray2 = strArray1;
              int index = 3;
              nullable1 = orderLinesExt.OrderLineActMechDDDt;
              string str2 = nullable1.HasValue ? Conversions.ToString(nullable1.GetValueOrDefault()) : (string) null;
              strArray2[index] = str2;
              strArray1[4] = " To: ";
              // ISSUE: reference to a compiler-generated field
              strArray1[5] = Conversions.ToString(closure95.\u0024VB\u0024Local_ldBackOrder.OrderLineActMechDDDt);
              string logMessage = string.Concat(strArray1);
              lcLogWriter.logData(logMessage);
            }
            // ISSUE: reference to a compiler-generated field
            orderLinesExt.OrderLineActMechDDDt = (DateTime?) closure95.\u0024VB\u0024Local_ldBackOrder.OrderLineActMechDDDt;
            // ISSUE: reference to a compiler-generated field
            DateTime orderLineOrgAeCompDt1 = closure95.\u0024VB\u0024Local_ldBackOrder.OrderLineOrgAECompDt;
            nullable11 = orderLinesExt.OrderLineOrgAECompDt;
            bool? nullable72;
            if (!nullable11.HasValue)
            {
              nullable72 = new bool?();
            }
            else
            {
              nullable8 = new bool?(DateTime.Compare(nullable11.GetValueOrDefault(), orderLineOrgAeCompDt1) == 0);
              nullable72 = nullable8;
            }
            nullable6 = nullable72;
            DateTime date16 = Conversions.ToDate("01/01/1901");
            DateTime? orderLineOrgAeCompDt2 = orderLinesExt.OrderLineOrgAECompDt;
            bool? nullable73;
            if (!orderLineOrgAeCompDt2.HasValue)
            {
              nullable73 = new bool?();
            }
            else
            {
              nullable10 = new bool?(DateTime.Compare(orderLineOrgAeCompDt2.GetValueOrDefault(), date16) == 0);
              nullable73 = nullable10;
            }
            nullable5 = nullable73;
            bool? nullable74;
            if (!nullable6.HasValue || !nullable6.GetValueOrDefault())
            {
              if (!nullable5.HasValue)
                nullable74 = new bool?();
              else if (!nullable5.GetValueOrDefault())
              {
                nullable74 = nullable6;
              }
              else
              {
                nullable3 = new bool?(true);
                nullable74 = nullable3;
              }
            }
            else
            {
              nullable9 = new bool?(true);
              nullable74 = nullable9;
            }
            nullable2 = nullable74;
            bool? nullable75;
            if (!nullable2.HasValue)
            {
              nullable75 = new bool?();
            }
            else
            {
              nullable7 = new bool?(!nullable2.GetValueOrDefault());
              nullable75 = nullable7;
            }
            nullable4 = nullable75;
            if (nullable4.GetValueOrDefault())
            {
              clsLogWriter lcLogWriter = this.lcLogWriter;
              // ISSUE: reference to a compiler-generated field
              string[] strArray1 = new string[6]
              {
                "Order ",
                closure95.\u0024VB\u0024Local_ldBackOrder.FOLineSLSS,
                " Data Changed - Orig AE Comp Date From; ",
                null,
                null,
                null
              };
              string[] strArray2 = strArray1;
              int index = 3;
              nullable1 = orderLinesExt.OrderLineOrgAECompDt;
              string str2 = nullable1.HasValue ? Conversions.ToString(nullable1.GetValueOrDefault()) : (string) null;
              strArray2[index] = str2;
              strArray1[4] = " To: ";
              // ISSUE: reference to a compiler-generated field
              strArray1[5] = Conversions.ToString(closure95.\u0024VB\u0024Local_ldBackOrder.OrderLineOrgAECompDt);
              string logMessage = string.Concat(strArray1);
              lcLogWriter.logData(logMessage);
            }
            // ISSUE: reference to a compiler-generated field
            orderLinesExt.OrderLineOrgAECompDt = (DateTime?) closure95.\u0024VB\u0024Local_ldBackOrder.OrderLineOrgAECompDt;
            // ISSUE: reference to a compiler-generated field
            DateTime orderLineCurAeCompDt1 = closure95.\u0024VB\u0024Local_ldBackOrder.OrderLineCurAECompDt;
            nullable11 = orderLinesExt.OrderLineCurAECompDt;
            bool? nullable76;
            if (!nullable11.HasValue)
            {
              nullable76 = new bool?();
            }
            else
            {
              nullable8 = new bool?(DateTime.Compare(nullable11.GetValueOrDefault(), orderLineCurAeCompDt1) == 0);
              nullable76 = nullable8;
            }
            nullable6 = nullable76;
            DateTime date17 = Conversions.ToDate("01/01/1901");
            DateTime? orderLineCurAeCompDt2 = orderLinesExt.OrderLineCurAECompDt;
            bool? nullable77;
            if (!orderLineCurAeCompDt2.HasValue)
            {
              nullable77 = new bool?();
            }
            else
            {
              nullable10 = new bool?(DateTime.Compare(orderLineCurAeCompDt2.GetValueOrDefault(), date17) == 0);
              nullable77 = nullable10;
            }
            nullable5 = nullable77;
            bool? nullable78;
            if (!nullable6.HasValue || !nullable6.GetValueOrDefault())
            {
              if (!nullable5.HasValue)
                nullable78 = new bool?();
              else if (!nullable5.GetValueOrDefault())
              {
                nullable78 = nullable6;
              }
              else
              {
                nullable3 = new bool?(true);
                nullable78 = nullable3;
              }
            }
            else
            {
              nullable9 = new bool?(true);
              nullable78 = nullable9;
            }
            nullable2 = nullable78;
            bool? nullable79;
            if (!nullable2.HasValue)
            {
              nullable79 = new bool?();
            }
            else
            {
              nullable7 = new bool?(!nullable2.GetValueOrDefault());
              nullable79 = nullable7;
            }
            nullable4 = nullable79;
            if (nullable4.GetValueOrDefault())
            {
              clsLogWriter lcLogWriter = this.lcLogWriter;
              // ISSUE: reference to a compiler-generated field
              string[] strArray1 = new string[6]
              {
                "Order ",
                closure95.\u0024VB\u0024Local_ldBackOrder.FOLineSLSS,
                " Data Changed - Current AE Comp Date From; ",
                null,
                null,
                null
              };
              string[] strArray2 = strArray1;
              int index = 3;
              nullable1 = orderLinesExt.OrderLineCurAECompDt;
              string str2 = nullable1.HasValue ? Conversions.ToString(nullable1.GetValueOrDefault()) : (string) null;
              strArray2[index] = str2;
              strArray1[4] = " To: ";
              // ISSUE: reference to a compiler-generated field
              strArray1[5] = Conversions.ToString(closure95.\u0024VB\u0024Local_ldBackOrder.OrderLineCurAECompDt);
              string logMessage = string.Concat(strArray1);
              lcLogWriter.logData(logMessage);
            }
            // ISSUE: reference to a compiler-generated field
            orderLinesExt.OrderLineCurAECompDt = (DateTime?) closure95.\u0024VB\u0024Local_ldBackOrder.OrderLineCurAECompDt;
            // ISSUE: reference to a compiler-generated field
            DateTime orderLineActAeCompDt1 = closure95.\u0024VB\u0024Local_ldBackOrder.OrderLineActAECompDt;
            nullable11 = orderLinesExt.OrderLineActAECompDt;
            bool? nullable80;
            if (!nullable11.HasValue)
            {
              nullable80 = new bool?();
            }
            else
            {
              nullable8 = new bool?(DateTime.Compare(nullable11.GetValueOrDefault(), orderLineActAeCompDt1) == 0);
              nullable80 = nullable8;
            }
            nullable6 = nullable80;
            DateTime date18 = Conversions.ToDate("01/01/1901");
            DateTime? orderLineActAeCompDt2 = orderLinesExt.OrderLineActAECompDt;
            bool? nullable81;
            if (!orderLineActAeCompDt2.HasValue)
            {
              nullable81 = new bool?();
            }
            else
            {
              nullable10 = new bool?(DateTime.Compare(orderLineActAeCompDt2.GetValueOrDefault(), date18) == 0);
              nullable81 = nullable10;
            }
            nullable5 = nullable81;
            bool? nullable82;
            if (!nullable6.HasValue || !nullable6.GetValueOrDefault())
            {
              if (!nullable5.HasValue)
                nullable82 = new bool?();
              else if (!nullable5.GetValueOrDefault())
              {
                nullable82 = nullable6;
              }
              else
              {
                nullable3 = new bool?(true);
                nullable82 = nullable3;
              }
            }
            else
            {
              nullable9 = new bool?(true);
              nullable82 = nullable9;
            }
            nullable2 = nullable82;
            bool? nullable83;
            if (!nullable2.HasValue)
            {
              nullable83 = new bool?();
            }
            else
            {
              nullable7 = new bool?(!nullable2.GetValueOrDefault());
              nullable83 = nullable7;
            }
            nullable4 = nullable83;
            if (nullable4.GetValueOrDefault())
            {
              clsLogWriter lcLogWriter = this.lcLogWriter;
              // ISSUE: reference to a compiler-generated field
              string[] strArray1 = new string[6]
              {
                "Order ",
                closure95.\u0024VB\u0024Local_ldBackOrder.FOLineSLSS,
                " Data Changed - Actual AE Comp Date From; ",
                null,
                null,
                null
              };
              string[] strArray2 = strArray1;
              int index = 3;
              nullable1 = orderLinesExt.OrderLineActAECompDt;
              string str2 = nullable1.HasValue ? Conversions.ToString(nullable1.GetValueOrDefault()) : (string) null;
              strArray2[index] = str2;
              strArray1[4] = " To: ";
              // ISSUE: reference to a compiler-generated field
              strArray1[5] = Conversions.ToString(closure95.\u0024VB\u0024Local_ldBackOrder.OrderLineActAECompDt);
              string logMessage = string.Concat(strArray1);
              lcLogWriter.logData(logMessage);
            }
            // ISSUE: reference to a compiler-generated field
            orderLinesExt.OrderLineActAECompDt = (DateTime?) closure95.\u0024VB\u0024Local_ldBackOrder.OrderLineActAECompDt;
            // ISSUE: reference to a compiler-generated field
            DateTime orderLineOrgEeCompDt1 = closure95.\u0024VB\u0024Local_ldBackOrder.OrderLineOrgEECompDt;
            nullable11 = orderLinesExt.OrderLineOrgEECompDt;
            bool? nullable84;
            if (!nullable11.HasValue)
            {
              nullable84 = new bool?();
            }
            else
            {
              nullable8 = new bool?(DateTime.Compare(nullable11.GetValueOrDefault(), orderLineOrgEeCompDt1) == 0);
              nullable84 = nullable8;
            }
            nullable6 = nullable84;
            DateTime date19 = Conversions.ToDate("01/01/1901");
            DateTime? orderLineOrgEeCompDt2 = orderLinesExt.OrderLineOrgEECompDt;
            bool? nullable85;
            if (!orderLineOrgEeCompDt2.HasValue)
            {
              nullable85 = new bool?();
            }
            else
            {
              nullable10 = new bool?(DateTime.Compare(orderLineOrgEeCompDt2.GetValueOrDefault(), date19) == 0);
              nullable85 = nullable10;
            }
            nullable5 = nullable85;
            bool? nullable86;
            if (!nullable6.HasValue || !nullable6.GetValueOrDefault())
            {
              if (!nullable5.HasValue)
                nullable86 = new bool?();
              else if (!nullable5.GetValueOrDefault())
              {
                nullable86 = nullable6;
              }
              else
              {
                nullable3 = new bool?(true);
                nullable86 = nullable3;
              }
            }
            else
            {
              nullable9 = new bool?(true);
              nullable86 = nullable9;
            }
            nullable2 = nullable86;
            bool? nullable87;
            if (!nullable2.HasValue)
            {
              nullable87 = new bool?();
            }
            else
            {
              nullable7 = new bool?(!nullable2.GetValueOrDefault());
              nullable87 = nullable7;
            }
            nullable4 = nullable87;
            if (nullable4.GetValueOrDefault())
            {
              clsLogWriter lcLogWriter = this.lcLogWriter;
              // ISSUE: reference to a compiler-generated field
              string[] strArray1 = new string[6]
              {
                "Order ",
                closure95.\u0024VB\u0024Local_ldBackOrder.FOLineSLSS,
                " Data Changed - Orig EE Comp Date From; ",
                null,
                null,
                null
              };
              string[] strArray2 = strArray1;
              int index = 3;
              nullable1 = orderLinesExt.OrderLineOrgEECompDt;
              string str2 = nullable1.HasValue ? Conversions.ToString(nullable1.GetValueOrDefault()) : (string) null;
              strArray2[index] = str2;
              strArray1[4] = " To: ";
              // ISSUE: reference to a compiler-generated field
              strArray1[5] = Conversions.ToString(closure95.\u0024VB\u0024Local_ldBackOrder.OrderLineOrgEECompDt);
              string logMessage = string.Concat(strArray1);
              lcLogWriter.logData(logMessage);
            }
            // ISSUE: reference to a compiler-generated field
            orderLinesExt.OrderLineOrgEECompDt = (DateTime?) closure95.\u0024VB\u0024Local_ldBackOrder.OrderLineOrgEECompDt;
            // ISSUE: reference to a compiler-generated field
            DateTime orderLineCurEeCompDt1 = closure95.\u0024VB\u0024Local_ldBackOrder.OrderLineCurEECompDt;
            nullable11 = orderLinesExt.OrderLineCurEECompDt;
            bool? nullable88;
            if (!nullable11.HasValue)
            {
              nullable88 = new bool?();
            }
            else
            {
              nullable8 = new bool?(DateTime.Compare(nullable11.GetValueOrDefault(), orderLineCurEeCompDt1) == 0);
              nullable88 = nullable8;
            }
            nullable6 = nullable88;
            DateTime date20 = Conversions.ToDate("01/01/1901");
            DateTime? orderLineCurEeCompDt2 = orderLinesExt.OrderLineCurEECompDt;
            bool? nullable89;
            if (!orderLineCurEeCompDt2.HasValue)
            {
              nullable89 = new bool?();
            }
            else
            {
              nullable10 = new bool?(DateTime.Compare(orderLineCurEeCompDt2.GetValueOrDefault(), date20) == 0);
              nullable89 = nullable10;
            }
            nullable5 = nullable89;
            bool? nullable90;
            if (!nullable6.HasValue || !nullable6.GetValueOrDefault())
            {
              if (!nullable5.HasValue)
                nullable90 = new bool?();
              else if (!nullable5.GetValueOrDefault())
              {
                nullable90 = nullable6;
              }
              else
              {
                nullable3 = new bool?(true);
                nullable90 = nullable3;
              }
            }
            else
            {
              nullable9 = new bool?(true);
              nullable90 = nullable9;
            }
            nullable2 = nullable90;
            bool? nullable91;
            if (!nullable2.HasValue)
            {
              nullable91 = new bool?();
            }
            else
            {
              nullable7 = new bool?(!nullable2.GetValueOrDefault());
              nullable91 = nullable7;
            }
            nullable4 = nullable91;
            if (nullable4.GetValueOrDefault())
            {
              clsLogWriter lcLogWriter = this.lcLogWriter;
              // ISSUE: reference to a compiler-generated field
              string[] strArray1 = new string[6]
              {
                "Order ",
                closure95.\u0024VB\u0024Local_ldBackOrder.FOLineSLSS,
                " Data Changed - Current EE Comp Date From; ",
                null,
                null,
                null
              };
              string[] strArray2 = strArray1;
              int index = 3;
              nullable1 = orderLinesExt.OrderLineCurEECompDt;
              string str2 = nullable1.HasValue ? Conversions.ToString(nullable1.GetValueOrDefault()) : (string) null;
              strArray2[index] = str2;
              strArray1[4] = " To: ";
              // ISSUE: reference to a compiler-generated field
              strArray1[5] = Conversions.ToString(closure95.\u0024VB\u0024Local_ldBackOrder.OrderLineCurEECompDt);
              string logMessage = string.Concat(strArray1);
              lcLogWriter.logData(logMessage);
            }
            // ISSUE: reference to a compiler-generated field
            orderLinesExt.OrderLineCurEECompDt = (DateTime?) closure95.\u0024VB\u0024Local_ldBackOrder.OrderLineCurEECompDt;
            // ISSUE: reference to a compiler-generated field
            DateTime orderLineActEeCompDt1 = closure95.\u0024VB\u0024Local_ldBackOrder.OrderLineActEECompDt;
            nullable11 = orderLinesExt.OrderLineActEECompDt;
            bool? nullable92;
            if (!nullable11.HasValue)
            {
              nullable92 = new bool?();
            }
            else
            {
              nullable8 = new bool?(DateTime.Compare(nullable11.GetValueOrDefault(), orderLineActEeCompDt1) == 0);
              nullable92 = nullable8;
            }
            nullable6 = nullable92;
            DateTime date21 = Conversions.ToDate("01/01/1901");
            DateTime? orderLineActEeCompDt2 = orderLinesExt.OrderLineActEECompDt;
            bool? nullable93;
            if (!orderLineActEeCompDt2.HasValue)
            {
              nullable93 = new bool?();
            }
            else
            {
              nullable10 = new bool?(DateTime.Compare(orderLineActEeCompDt2.GetValueOrDefault(), date21) == 0);
              nullable93 = nullable10;
            }
            nullable5 = nullable93;
            bool? nullable94;
            if (!nullable6.HasValue || !nullable6.GetValueOrDefault())
            {
              if (!nullable5.HasValue)
                nullable94 = new bool?();
              else if (!nullable5.GetValueOrDefault())
              {
                nullable94 = nullable6;
              }
              else
              {
                nullable3 = new bool?(true);
                nullable94 = nullable3;
              }
            }
            else
            {
              nullable9 = new bool?(true);
              nullable94 = nullable9;
            }
            nullable2 = nullable94;
            bool? nullable95;
            if (!nullable2.HasValue)
            {
              nullable95 = new bool?();
            }
            else
            {
              nullable7 = new bool?(!nullable2.GetValueOrDefault());
              nullable95 = nullable7;
            }
            nullable4 = nullable95;
            if (nullable4.GetValueOrDefault())
            {
              clsLogWriter lcLogWriter = this.lcLogWriter;
              // ISSUE: reference to a compiler-generated field
              string[] strArray1 = new string[6]
              {
                "Order ",
                closure95.\u0024VB\u0024Local_ldBackOrder.FOLineSLSS,
                " Data Changed - Actual EE Comp Date From; ",
                null,
                null,
                null
              };
              string[] strArray2 = strArray1;
              int index = 3;
              nullable1 = orderLinesExt.OrderLineActEECompDt;
              string str2 = nullable1.HasValue ? Conversions.ToString(nullable1.GetValueOrDefault()) : (string) null;
              strArray2[index] = str2;
              strArray1[4] = " To: ";
              // ISSUE: reference to a compiler-generated field
              strArray1[5] = Conversions.ToString(closure95.\u0024VB\u0024Local_ldBackOrder.OrderLineActEECompDt);
              string logMessage = string.Concat(strArray1);
              lcLogWriter.logData(logMessage);
            }
            // ISSUE: reference to a compiler-generated field
            orderLinesExt.OrderLineActEECompDt = (DateTime?) closure95.\u0024VB\u0024Local_ldBackOrder.OrderLineActEECompDt;
            // ISSUE: reference to a compiler-generated field
            DateTime lineOrgAppElecDt1 = closure95.\u0024VB\u0024Local_ldBackOrder.OrderLineOrgAppElecDt;
            nullable11 = orderLinesExt.OrderLineOrgAppElecDt;
            bool? nullable96;
            if (!nullable11.HasValue)
            {
              nullable96 = new bool?();
            }
            else
            {
              nullable8 = new bool?(DateTime.Compare(nullable11.GetValueOrDefault(), lineOrgAppElecDt1) == 0);
              nullable96 = nullable8;
            }
            nullable6 = nullable96;
            DateTime date22 = Conversions.ToDate("01/01/1901");
            DateTime? lineOrgAppElecDt2 = orderLinesExt.OrderLineOrgAppElecDt;
            bool? nullable97;
            if (!lineOrgAppElecDt2.HasValue)
            {
              nullable97 = new bool?();
            }
            else
            {
              nullable10 = new bool?(DateTime.Compare(lineOrgAppElecDt2.GetValueOrDefault(), date22) == 0);
              nullable97 = nullable10;
            }
            nullable5 = nullable97;
            bool? nullable98;
            if (!nullable6.HasValue || !nullable6.GetValueOrDefault())
            {
              if (!nullable5.HasValue)
                nullable98 = new bool?();
              else if (!nullable5.GetValueOrDefault())
              {
                nullable98 = nullable6;
              }
              else
              {
                nullable3 = new bool?(true);
                nullable98 = nullable3;
              }
            }
            else
            {
              nullable9 = new bool?(true);
              nullable98 = nullable9;
            }
            nullable2 = nullable98;
            bool? nullable99;
            if (!nullable2.HasValue)
            {
              nullable99 = new bool?();
            }
            else
            {
              nullable7 = new bool?(!nullable2.GetValueOrDefault());
              nullable99 = nullable7;
            }
            nullable4 = nullable99;
            if (nullable4.GetValueOrDefault())
            {
              clsLogWriter lcLogWriter = this.lcLogWriter;
              // ISSUE: reference to a compiler-generated field
              string[] strArray1 = new string[6]
              {
                "Order ",
                closure95.\u0024VB\u0024Local_ldBackOrder.FOLineSLSS,
                " Data Changed - Orig App Elec Date From; ",
                null,
                null,
                null
              };
              string[] strArray2 = strArray1;
              int index = 3;
              nullable1 = orderLinesExt.OrderLineOrgAppElecDt;
              string str2 = nullable1.HasValue ? Conversions.ToString(nullable1.GetValueOrDefault()) : (string) null;
              strArray2[index] = str2;
              strArray1[4] = " To: ";
              // ISSUE: reference to a compiler-generated field
              strArray1[5] = Conversions.ToString(closure95.\u0024VB\u0024Local_ldBackOrder.OrderLineOrgAppElecDt);
              string logMessage = string.Concat(strArray1);
              lcLogWriter.logData(logMessage);
            }
            // ISSUE: reference to a compiler-generated field
            orderLinesExt.OrderLineOrgAppElecDt = (DateTime?) closure95.\u0024VB\u0024Local_ldBackOrder.OrderLineOrgAppElecDt;
            // ISSUE: reference to a compiler-generated field
            DateTime lineCurAppElecDt1 = closure95.\u0024VB\u0024Local_ldBackOrder.OrderLineCurAppElecDt;
            nullable11 = orderLinesExt.OrderLineCurAppElecDt;
            bool? nullable100;
            if (!nullable11.HasValue)
            {
              nullable100 = new bool?();
            }
            else
            {
              nullable8 = new bool?(DateTime.Compare(nullable11.GetValueOrDefault(), lineCurAppElecDt1) == 0);
              nullable100 = nullable8;
            }
            nullable6 = nullable100;
            DateTime date23 = Conversions.ToDate("01/01/1901");
            DateTime? lineCurAppElecDt2 = orderLinesExt.OrderLineCurAppElecDt;
            bool? nullable101;
            if (!lineCurAppElecDt2.HasValue)
            {
              nullable101 = new bool?();
            }
            else
            {
              nullable10 = new bool?(DateTime.Compare(lineCurAppElecDt2.GetValueOrDefault(), date23) == 0);
              nullable101 = nullable10;
            }
            nullable5 = nullable101;
            bool? nullable102;
            if (!nullable6.HasValue || !nullable6.GetValueOrDefault())
            {
              if (!nullable5.HasValue)
                nullable102 = new bool?();
              else if (!nullable5.GetValueOrDefault())
              {
                nullable102 = nullable6;
              }
              else
              {
                nullable3 = new bool?(true);
                nullable102 = nullable3;
              }
            }
            else
            {
              nullable9 = new bool?(true);
              nullable102 = nullable9;
            }
            nullable2 = nullable102;
            bool? nullable103;
            if (!nullable2.HasValue)
            {
              nullable103 = new bool?();
            }
            else
            {
              nullable7 = new bool?(!nullable2.GetValueOrDefault());
              nullable103 = nullable7;
            }
            nullable4 = nullable103;
            if (nullable4.GetValueOrDefault())
            {
              clsLogWriter lcLogWriter = this.lcLogWriter;
              // ISSUE: reference to a compiler-generated field
              string[] strArray1 = new string[6]
              {
                "Order ",
                closure95.\u0024VB\u0024Local_ldBackOrder.FOLineSLSS,
                " Data Changed - Current App Elec Date From; ",
                null,
                null,
                null
              };
              string[] strArray2 = strArray1;
              int index = 3;
              nullable1 = orderLinesExt.OrderLineCurAppElecDt;
              string str2 = nullable1.HasValue ? Conversions.ToString(nullable1.GetValueOrDefault()) : (string) null;
              strArray2[index] = str2;
              strArray1[4] = " To: ";
              // ISSUE: reference to a compiler-generated field
              strArray1[5] = Conversions.ToString(closure95.\u0024VB\u0024Local_ldBackOrder.OrderLineCurAppElecDt);
              string logMessage = string.Concat(strArray1);
              lcLogWriter.logData(logMessage);
            }
            // ISSUE: reference to a compiler-generated field
            orderLinesExt.OrderLineCurAppElecDt = (DateTime?) closure95.\u0024VB\u0024Local_ldBackOrder.OrderLineCurAppElecDt;
            // ISSUE: reference to a compiler-generated field
            DateTime lineActAppElecDt1 = closure95.\u0024VB\u0024Local_ldBackOrder.OrderLineActAppElecDt;
            nullable11 = orderLinesExt.OrderLineActAppElecDt;
            bool? nullable104;
            if (!nullable11.HasValue)
            {
              nullable104 = new bool?();
            }
            else
            {
              nullable8 = new bool?(DateTime.Compare(nullable11.GetValueOrDefault(), lineActAppElecDt1) == 0);
              nullable104 = nullable8;
            }
            nullable6 = nullable104;
            DateTime date24 = Conversions.ToDate("01/01/1901");
            DateTime? lineActAppElecDt2 = orderLinesExt.OrderLineActAppElecDt;
            bool? nullable105;
            if (!lineActAppElecDt2.HasValue)
            {
              nullable105 = new bool?();
            }
            else
            {
              nullable10 = new bool?(DateTime.Compare(lineActAppElecDt2.GetValueOrDefault(), date24) == 0);
              nullable105 = nullable10;
            }
            nullable5 = nullable105;
            bool? nullable106;
            if (!nullable6.HasValue || !nullable6.GetValueOrDefault())
            {
              if (!nullable5.HasValue)
                nullable106 = new bool?();
              else if (!nullable5.GetValueOrDefault())
              {
                nullable106 = nullable6;
              }
              else
              {
                nullable3 = new bool?(true);
                nullable106 = nullable3;
              }
            }
            else
            {
              nullable9 = new bool?(true);
              nullable106 = nullable9;
            }
            nullable2 = nullable106;
            bool? nullable107;
            if (!nullable2.HasValue)
            {
              nullable107 = new bool?();
            }
            else
            {
              nullable7 = new bool?(!nullable2.GetValueOrDefault());
              nullable107 = nullable7;
            }
            nullable4 = nullable107;
            if (nullable4.GetValueOrDefault())
            {
              clsLogWriter lcLogWriter = this.lcLogWriter;
              // ISSUE: reference to a compiler-generated field
              string[] strArray1 = new string[6]
              {
                "Order ",
                closure95.\u0024VB\u0024Local_ldBackOrder.FOLineSLSS,
                " Data Changed - Actual App Elec Date From; ",
                null,
                null,
                null
              };
              string[] strArray2 = strArray1;
              int index = 3;
              nullable1 = orderLinesExt.OrderLineActAppElecDt;
              string str2 = nullable1.HasValue ? Conversions.ToString(nullable1.GetValueOrDefault()) : (string) null;
              strArray2[index] = str2;
              strArray1[4] = " To: ";
              // ISSUE: reference to a compiler-generated field
              strArray1[5] = Conversions.ToString(closure95.\u0024VB\u0024Local_ldBackOrder.OrderLineActAppElecDt);
              string logMessage = string.Concat(strArray1);
              lcLogWriter.logData(logMessage);
            }
            // ISSUE: reference to a compiler-generated field
            orderLinesExt.OrderLineActAppElecDt = (DateTime?) closure95.\u0024VB\u0024Local_ldBackOrder.OrderLineActAppElecDt;
            // ISSUE: reference to a compiler-generated field
            DateTime lineOrgAppSentDt1 = closure95.\u0024VB\u0024Local_ldBackOrder.OrderLineOrgAppSentDt;
            nullable11 = orderLinesExt.OrderLineOrgAppSentDt;
            bool? nullable108;
            if (!nullable11.HasValue)
            {
              nullable108 = new bool?();
            }
            else
            {
              nullable8 = new bool?(DateTime.Compare(nullable11.GetValueOrDefault(), lineOrgAppSentDt1) == 0);
              nullable108 = nullable8;
            }
            nullable6 = nullable108;
            DateTime date25 = Conversions.ToDate("01/01/1901");
            DateTime? lineOrgAppSentDt2 = orderLinesExt.OrderLineOrgAppSentDt;
            bool? nullable109;
            if (!lineOrgAppSentDt2.HasValue)
            {
              nullable109 = new bool?();
            }
            else
            {
              nullable10 = new bool?(DateTime.Compare(lineOrgAppSentDt2.GetValueOrDefault(), date25) == 0);
              nullable109 = nullable10;
            }
            nullable5 = nullable109;
            bool? nullable110;
            if (!nullable6.HasValue || !nullable6.GetValueOrDefault())
            {
              if (!nullable5.HasValue)
                nullable110 = new bool?();
              else if (!nullable5.GetValueOrDefault())
              {
                nullable110 = nullable6;
              }
              else
              {
                nullable3 = new bool?(true);
                nullable110 = nullable3;
              }
            }
            else
            {
              nullable9 = new bool?(true);
              nullable110 = nullable9;
            }
            nullable2 = nullable110;
            bool? nullable111;
            if (!nullable2.HasValue)
            {
              nullable111 = new bool?();
            }
            else
            {
              nullable7 = new bool?(!nullable2.GetValueOrDefault());
              nullable111 = nullable7;
            }
            nullable4 = nullable111;
            if (nullable4.GetValueOrDefault())
            {
              clsLogWriter lcLogWriter = this.lcLogWriter;
              // ISSUE: reference to a compiler-generated field
              string[] strArray1 = new string[6]
              {
                "Order ",
                closure95.\u0024VB\u0024Local_ldBackOrder.FOLineSLSS,
                " Data Changed - Orig App Sent Date From; ",
                null,
                null,
                null
              };
              string[] strArray2 = strArray1;
              int index = 3;
              nullable1 = orderLinesExt.OrderLineOrgAppSentDt;
              string str2 = nullable1.HasValue ? Conversions.ToString(nullable1.GetValueOrDefault()) : (string) null;
              strArray2[index] = str2;
              strArray1[4] = " To: ";
              // ISSUE: reference to a compiler-generated field
              strArray1[5] = Conversions.ToString(closure95.\u0024VB\u0024Local_ldBackOrder.OrderLineOrgAppSentDt);
              string logMessage = string.Concat(strArray1);
              lcLogWriter.logData(logMessage);
            }
            // ISSUE: reference to a compiler-generated field
            orderLinesExt.OrderLineOrgAppSentDt = (DateTime?) closure95.\u0024VB\u0024Local_ldBackOrder.OrderLineOrgAppSentDt;
            // ISSUE: reference to a compiler-generated field
            DateTime lineCurAppSentDt1 = closure95.\u0024VB\u0024Local_ldBackOrder.OrderLineCurAppSentDt;
            nullable11 = orderLinesExt.OrderLineCurAppSentDt;
            bool? nullable112;
            if (!nullable11.HasValue)
            {
              nullable112 = new bool?();
            }
            else
            {
              nullable8 = new bool?(DateTime.Compare(nullable11.GetValueOrDefault(), lineCurAppSentDt1) == 0);
              nullable112 = nullable8;
            }
            nullable6 = nullable112;
            DateTime date26 = Conversions.ToDate("01/01/1901");
            DateTime? lineCurAppSentDt2 = orderLinesExt.OrderLineCurAppSentDt;
            bool? nullable113;
            if (!lineCurAppSentDt2.HasValue)
            {
              nullable113 = new bool?();
            }
            else
            {
              nullable10 = new bool?(DateTime.Compare(lineCurAppSentDt2.GetValueOrDefault(), date26) == 0);
              nullable113 = nullable10;
            }
            nullable5 = nullable113;
            bool? nullable114;
            if (!nullable6.HasValue || !nullable6.GetValueOrDefault())
            {
              if (!nullable5.HasValue)
                nullable114 = new bool?();
              else if (!nullable5.GetValueOrDefault())
              {
                nullable114 = nullable6;
              }
              else
              {
                nullable3 = new bool?(true);
                nullable114 = nullable3;
              }
            }
            else
            {
              nullable9 = new bool?(true);
              nullable114 = nullable9;
            }
            nullable2 = nullable114;
            bool? nullable115;
            if (!nullable2.HasValue)
            {
              nullable115 = new bool?();
            }
            else
            {
              nullable7 = new bool?(!nullable2.GetValueOrDefault());
              nullable115 = nullable7;
            }
            nullable4 = nullable115;
            if (nullable4.GetValueOrDefault())
            {
              clsLogWriter lcLogWriter = this.lcLogWriter;
              // ISSUE: reference to a compiler-generated field
              string[] strArray1 = new string[6]
              {
                "Order ",
                closure95.\u0024VB\u0024Local_ldBackOrder.FOLineSLSS,
                " Data Changed - Current App Sent Date From; ",
                null,
                null,
                null
              };
              string[] strArray2 = strArray1;
              int index = 3;
              nullable1 = orderLinesExt.OrderLineCurAppSentDt;
              string str2 = nullable1.HasValue ? Conversions.ToString(nullable1.GetValueOrDefault()) : (string) null;
              strArray2[index] = str2;
              strArray1[4] = " To: ";
              // ISSUE: reference to a compiler-generated field
              strArray1[5] = Conversions.ToString(closure95.\u0024VB\u0024Local_ldBackOrder.OrderLineCurAppSentDt);
              string logMessage = string.Concat(strArray1);
              lcLogWriter.logData(logMessage);
            }
            // ISSUE: reference to a compiler-generated field
            orderLinesExt.OrderLineCurAppSentDt = (DateTime?) closure95.\u0024VB\u0024Local_ldBackOrder.OrderLineCurAppSentDt;
            // ISSUE: reference to a compiler-generated field
            DateTime lineActAppSentDt1 = closure95.\u0024VB\u0024Local_ldBackOrder.OrderLineActAppSentDt;
            nullable11 = orderLinesExt.OrderLineActAppSentDt;
            bool? nullable116;
            if (!nullable11.HasValue)
            {
              nullable116 = new bool?();
            }
            else
            {
              nullable8 = new bool?(DateTime.Compare(nullable11.GetValueOrDefault(), lineActAppSentDt1) == 0);
              nullable116 = nullable8;
            }
            nullable6 = nullable116;
            DateTime date27 = Conversions.ToDate("01/01/1901");
            DateTime? lineActAppSentDt2 = orderLinesExt.OrderLineActAppSentDt;
            bool? nullable117;
            if (!lineActAppSentDt2.HasValue)
            {
              nullable117 = new bool?();
            }
            else
            {
              nullable10 = new bool?(DateTime.Compare(lineActAppSentDt2.GetValueOrDefault(), date27) == 0);
              nullable117 = nullable10;
            }
            nullable5 = nullable117;
            bool? nullable118;
            if (!nullable6.HasValue || !nullable6.GetValueOrDefault())
            {
              if (!nullable5.HasValue)
                nullable118 = new bool?();
              else if (!nullable5.GetValueOrDefault())
              {
                nullable118 = nullable6;
              }
              else
              {
                nullable3 = new bool?(true);
                nullable118 = nullable3;
              }
            }
            else
            {
              nullable9 = new bool?(true);
              nullable118 = nullable9;
            }
            nullable2 = nullable118;
            bool? nullable119;
            if (!nullable2.HasValue)
            {
              nullable119 = new bool?();
            }
            else
            {
              nullable7 = new bool?(!nullable2.GetValueOrDefault());
              nullable119 = nullable7;
            }
            nullable4 = nullable119;
            if (nullable4.GetValueOrDefault())
            {
              clsLogWriter lcLogWriter = this.lcLogWriter;
              // ISSUE: reference to a compiler-generated field
              string[] strArray1 = new string[6]
              {
                "Order ",
                closure95.\u0024VB\u0024Local_ldBackOrder.FOLineSLSS,
                " Data Changed - Actual App Sent Date From; ",
                null,
                null,
                null
              };
              string[] strArray2 = strArray1;
              int index = 3;
              nullable1 = orderLinesExt.OrderLineActAppSentDt;
              string str2 = nullable1.HasValue ? Conversions.ToString(nullable1.GetValueOrDefault()) : (string) null;
              strArray2[index] = str2;
              strArray1[4] = " To: ";
              // ISSUE: reference to a compiler-generated field
              strArray1[5] = Conversions.ToString(closure95.\u0024VB\u0024Local_ldBackOrder.OrderLineActAppSentDt);
              string logMessage = string.Concat(strArray1);
              lcLogWriter.logData(logMessage);
            }
            // ISSUE: reference to a compiler-generated field
            orderLinesExt.OrderLineActAppSentDt = (DateTime?) closure95.\u0024VB\u0024Local_ldBackOrder.OrderLineActAppSentDt;
            // ISSUE: reference to a compiler-generated field
            orderLinesExt.OrderLineCplxA = closure95.\u0024VB\u0024Local_ldBackOrder.OrderLineCplxA;
            // ISSUE: reference to a compiler-generated field
            orderLinesExt.OrderLineCplxB = closure95.\u0024VB\u0024Local_ldBackOrder.OrderLineCplxB;
            // ISSUE: reference to a compiler-generated field
            orderLinesExt.OrderLineCplxC = closure95.\u0024VB\u0024Local_ldBackOrder.OrderLineCplxC;
            // ISSUE: reference to a compiler-generated field
            orderLinesExt.OrderLineAEHrs = (int?) closure95.\u0024VB\u0024Local_ldBackOrder.OrderLineAEHrs;
            // ISSUE: reference to a compiler-generated field
            orderLinesExt.OrderLineMDHrs = (int?) closure95.\u0024VB\u0024Local_ldBackOrder.OrderLineMDHrs;
            // ISSUE: reference to a compiler-generated field
            orderLinesExt.OrderLineEDHrs = (int?) closure95.\u0024VB\u0024Local_ldBackOrder.OrderLineEDHrs;
            // ISSUE: reference to a compiler-generated field
            if (Operators.CompareString(orderLinesExt.OrderLineCOTPP, closure95.\u0024VB\u0024Local_ldBackOrder.OrderLineCOTPP, false) != 0)
            {
              // ISSUE: reference to a compiler-generated field
              // ISSUE: reference to a compiler-generated field
              this.lcLogWriter.logData("Order " + closure95.\u0024VB\u0024Local_ldBackOrder.FOLineSLSS + " CT01 Status Changed; " + orderLinesExt.OrderLineCOTPP + " To: " + closure95.\u0024VB\u0024Local_ldBackOrder.OrderLineCOTPP);
            }
            // ISSUE: reference to a compiler-generated field
            orderLinesExt.OrderLineCOTPP = closure95.\u0024VB\u0024Local_ldBackOrder.OrderLineCOTPP;
            se0085CtEntities1.SaveChanges();
          }
          else
          {
            // ISSUE: reference to a compiler-generated field
            int num2 = (int) Interaction.MsgBox((object) ("Multiple Order numbers found, aborting MES import for Order; " + closure95.\u0024VB\u0024Local_ldBackOrder.OrderFO), MsgBoxStyle.Information, (object) "ONE QMS MES Import Error - E0012");
            return;
          }
          if (str1.Length == 15)
          {
            // ISSUE: reference to a compiler-generated field
            this.lcLogWriter.logData("Updating Schedule for " + closure95.\u0024VB\u0024Local_ldBackOrder.FOLineSLSS);
            // ISSUE: reference to a compiler-generated field
            clsEngineMes.UpdateIfRouted(closure95.\u0024VB\u0024Local_ldBackOrder.FOLineSLSS);
          }
          // ISSUE: reference to a compiler-generated field
          closure95.\u0024VB\u0024Local_ldBackOrder = (scOrderImportInfo) null;
          se0085CtEntities1.Database.Connection.Close();
        }
        else
        {
          // ISSUE: reference to a compiler-generated field
          int num3 = (int) Interaction.MsgBox((object) ("Multiple AssemblyLine Ids found, aborting MES import for AssemblyLineId; " + Conversions.ToString(closure95.\u0024VB\u0024Local_ldBackOrder.AssemblyLine.LevelId)), MsgBoxStyle.Information, (object) "ONE QMS MES Import Error - E0001");
        }
      }
    }

    public ArrayList ImportBacklog(string ImportFile, scPlants SEPlants, List<scAssemblyLine> AssemblyLines)
    {
      StreamReader streamReader;
      ArrayList arrayList1;
      try
      {
        streamReader = File.OpenText(ImportFile);
      }
      catch (Exception ex)
      {
        ProjectData.SetProjectError(ex);
        int num = (int) Interaction.MsgBox((object) ("Error Opening Backlog file...\r\n" + ex.Message), MsgBoxStyle.Exclamation, (object) "File Open Error");
        arrayList1 = (ArrayList) null;
        ProjectData.ClearProjectError();
        goto label_198;
      }
      short[] numArray1 = new short[126];
      short[] numArray2 = new short[126];
      numArray1[0] = (short) 1;
      numArray2[0] = (short) 3;
      numArray1[1] = (short) 5;
      numArray2[1] = (short) 8;
      numArray1[2] = (short) 14;
      numArray2[2] = (short) 3;
      numArray1[3] = (short) 18;
      numArray2[3] = (short) 2;
      numArray1[4] = (short) 21;
      numArray2[4] = (short) 2;
      numArray1[5] = (short) 24;
      numArray2[5] = (short) 35;
      numArray1[6] = (short) 60;
      numArray2[6] = (short) 7;
      numArray1[7] = (short) 68;
      numArray2[7] = (short) 46;
      numArray1[8] = (short) 115;
      numArray2[8] = (short) 10;
      numArray1[9] = (short) 126;
      numArray2[9] = (short) 10;
      numArray1[10] = (short) 137;
      numArray2[10] = (short) 10;
      numArray1[11] = (short) 148;
      numArray2[11] = (short) 11;
      numArray1[12] = (short) 160;
      numArray2[12] = (short) 11;
      numArray1[13] = (short) 172;
      numArray2[13] = (short) 1;
      numArray1[14] = (short) 174;
      numArray2[14] = (short) 4;
      numArray1[15] = (short) 179;
      numArray2[15] = (short) 1;
      numArray1[16] = (short) 181;
      numArray2[16] = (short) 2;
      numArray1[17] = (short) 184;
      numArray2[17] = (short) 2;
      numArray1[18] = (short) 187;
      numArray2[18] = (short) 2;
      numArray1[19] = (short) 190;
      numArray2[19] = (short) 10;
      numArray1[20] = (short) 201;
      numArray2[20] = (short) 10;
      numArray1[21] = (short) 212;
      numArray2[21] = (short) 10;
      numArray1[22] = (short) 223;
      numArray2[22] = (short) 10;
      numArray1[23] = (short) 234;
      numArray2[23] = (short) 8;
      numArray1[24] = (short) 243;
      numArray2[24] = (short) 3;
      numArray1[25] = (short) 247;
      numArray2[25] = (short) 4;
      numArray1[26] = (short) 252;
      numArray2[26] = (short) 4;
      numArray1[27] = (short) 257;
      numArray2[27] = (short) 5;
      numArray1[28] = (short) 263;
      numArray2[28] = (short) 30;
      numArray1[29] = (short) 294;
      numArray2[29] = (short) 20;
      numArray1[30] = (short) 315;
      numArray2[30] = (short) 10;
      numArray1[31] = (short) 326;
      numArray2[31] = (short) 10;
      numArray1[32] = (short) 337;
      numArray2[32] = (short) 10;
      numArray1[33] = (short) 348;
      numArray2[33] = (short) 10;
      numArray1[34] = (short) 359;
      numArray2[34] = (short) 10;
      numArray1[35] = (short) 370;
      numArray2[35] = (short) 10;
      numArray1[36] = (short) 381;
      numArray2[36] = (short) 10;
      numArray1[37] = (short) 392;
      numArray2[37] = (short) 10;
      numArray1[38] = (short) 403;
      numArray2[38] = (short) 10;
      numArray1[39] = (short) 414;
      numArray2[39] = (short) 10;
      numArray1[40] = (short) 425;
      numArray2[40] = (short) 10;
      numArray1[41] = (short) 436;
      numArray2[41] = (short) 10;
      numArray1[42] = (short) 447;
      numArray2[42] = (short) 10;
      numArray1[43] = (short) 458;
      numArray2[43] = (short) 10;
      numArray1[44] = (short) 469;
      numArray2[44] = (short) 10;
      numArray1[45] = (short) 480;
      numArray2[45] = (short) 10;
      numArray1[46] = (short) 491;
      numArray2[46] = (short) 10;
      numArray1[47] = (short) 502;
      numArray2[47] = (short) 10;
      numArray1[48] = (short) 513;
      numArray2[48] = (short) 10;
      numArray1[49] = (short) 524;
      numArray2[49] = (short) 10;
      numArray1[50] = (short) 535;
      numArray2[50] = (short) 10;
      numArray1[51] = (short) 546;
      numArray2[51] = (short) 10;
      numArray1[52] = (short) 557;
      numArray2[52] = (short) 10;
      numArray1[53] = (short) 568;
      numArray2[53] = (short) 10;
      numArray1[54] = (short) 579;
      numArray2[54] = (short) 10;
      numArray1[55] = (short) 590;
      numArray2[55] = (short) 10;
      numArray1[56] = (short) 601;
      numArray2[56] = (short) 10;
      numArray1[57] = (short) 612;
      numArray2[57] = (short) 10;
      numArray1[58] = (short) 623;
      numArray2[58] = (short) 10;
      numArray1[59] = (short) 634;
      numArray2[59] = (short) 10;
      numArray1[60] = (short) 645;
      numArray2[60] = (short) 10;
      numArray1[61] = (short) 656;
      numArray2[61] = (short) 10;
      numArray1[62] = (short) 667;
      numArray2[62] = (short) 10;
      numArray1[63] = (short) 678;
      numArray2[63] = (short) 10;
      numArray1[64] = (short) 689;
      numArray2[64] = (short) 10;
      numArray1[65] = (short) 700;
      numArray2[65] = (short) 10;
      numArray1[66] = (short) 711;
      numArray2[66] = (short) 10;
      numArray1[67] = (short) 722;
      numArray2[67] = (short) 10;
      numArray1[68] = (short) 733;
      numArray2[68] = (short) 10;
      numArray1[69] = (short) 744;
      numArray2[69] = (short) 10;
      numArray1[70] = (short) 755;
      numArray2[70] = (short) 1;
      numArray1[71] = (short) 757;
      numArray2[71] = (short) 3;
      numArray1[72] = (short) 761;
      numArray2[72] = (short) 3;
      numArray1[73] = (short) 765;
      numArray2[73] = (short) 3;
      numArray1[74] = (short) 769;
      numArray2[74] = (short) 3;
      numArray1[75] = (short) 773;
      numArray2[75] = (short) 15;
      numArray1[76] = (short) 789;
      numArray2[76] = (short) 2;
      numArray1[77] = (short) 792;
      numArray2[77] = (short) 1;
      numArray1[78] = (short) 794;
      numArray2[78] = (short) 18;
      numArray1[79] = (short) 813;
      numArray2[79] = (short) 1;
      numArray1[80] = (short) 815;
      numArray2[80] = (short) 1;
      numArray1[81] = (short) 817;
      numArray2[81] = (short) 3;
      numArray1[82] = (short) 821;
      numArray2[82] = (short) 15;
      numArray1[83] = (short) 837;
      numArray2[83] = (short) 35;
      numArray1[84] = (short) 873;
      numArray2[84] = (short) 5;
      numArray1[85] = (short) 879;
      numArray2[85] = (short) 1;
      numArray1[86] = (short) 890;
      numArray2[86] = (short) 1;
      numArray1[87] = (short) 892;
      numArray2[87] = (short) 1;
      numArray1[88] = (short) 894;
      numArray2[88] = (short) 1;
      numArray1[89] = (short) 896;
      numArray2[89] = (short) 10;
      numArray1[90] = (short) 907;
      numArray2[90] = (short) 10;
      numArray1[91] = (short) 918;
      numArray2[91] = (short) 1;
      numArray1[92] = (short) 920;
      numArray2[92] = (short) 2;
      numArray1[93] = (short) 923;
      numArray2[93] = (short) 4;
      numArray1[94] = (short) 928;
      numArray2[94] = (short) 2;
      numArray1[95] = (short) 931;
      numArray2[95] = (short) 10;
      numArray1[96] = (short) 942;
      numArray2[96] = (short) 10;
      numArray1[97] = (short) 953;
      numArray2[97] = (short) 10;
      numArray1[98] = (short) 964;
      numArray2[98] = (short) 3;
      numArray1[99] = (short) 968;
      numArray2[99] = (short) 8;
      numArray1[100] = (short) 977;
      numArray2[100] = (short) 5;
      numArray1[101] = (short) 983;
      numArray2[101] = (short) 10;
      numArray1[102] = (short) 994;
      numArray2[102] = (short) 10;
      numArray1[103] = (short) 1005;
      numArray2[103] = (short) 10;
      numArray1[104] = (short) 1016;
      numArray2[104] = (short) 10;
      numArray1[105] = (short) 1027;
      numArray2[105] = (short) 10;
      numArray1[106] = (short) 1051;
      numArray2[106] = (short) 3;
      numArray1[107] = (short) 1055;
      numArray2[107] = (short) 3;
      numArray1[108] = (short) 1059;
      numArray2[108] = (short) 3;
      numArray1[109] = (short) 1063;
      numArray2[109] = (short) 3;
      numArray1[110] = (short) 1067;
      numArray2[110] = (short) 11;
      numArray1[111] = (short) 1079;
      numArray2[111] = (short) 20;
      numArray1[112] = (short) 1100;
      numArray2[112] = (short) 12;
      numArray1[113] = (short) 1113;
      numArray2[113] = (short) 10;
      numArray1[114] = (short) 1124;
      numArray2[114] = (short) 10;
      numArray1[115] = (short) 1135;
      numArray2[115] = (short) 10;
      numArray1[116] = (short) 1146;
      numArray2[116] = (short) 10;
      numArray1[117] = (short) 1157;
      numArray2[117] = (short) 10;
      numArray1[118] = (short) 1168;
      numArray2[118] = (short) 10;
      numArray1[119] = (short) 1179;
      numArray2[119] = (short) 10;
      numArray1[120] = (short) 1190;
      numArray2[120] = (short) 2;
      numArray1[121] = (short) 1193;
      numArray2[121] = (short) 10;
      scOrderImportInfo scOrderImportInfo = (scOrderImportInfo) null;
      ArrayList arrayList2 = new ArrayList();
      while (streamReader.Peek() >= 0)
      {
        Thread.CurrentThread.Join(0);
        string str1 = "";
        string Left = "";
        string str2 = streamReader.ReadLine();
        short num1 = 0;
        bool flag;
        do
        {
          int Start = (int) numArray1[(int) num1];
          int Length = (int) numArray2[(int) num1];
          int num2 = checked ((int) (short) unchecked ((int) numArray1[(int) num1] + (int) numArray2[(int) num1]) - 1);
          string str3 = Microsoft.VisualBasic.Strings.Mid(str2, Start, Length);
          switch (num1)
          {
            case 0:
              string str4 = str3;
              flag = false;
              if (SEPlants.PlantDesin.Contains(str4))
              {
                scOrderImportInfo = new scOrderImportInfo();
                flag = true;
                scOrderImportInfo.SEPlant = SEPlants;
              }
              if (flag)
                break;
              goto label_193;
            case 1:
              scOrderImportInfo.OrderFO = str3;
              break;
            case 2:
              scOrderImportInfo.OrderLineNum = str3;
              break;
            case 3:
              scOrderImportInfo.OrderLineSL = str3;
              break;
            case 4:
              scOrderImportInfo.OrderLineSS = str3;
              break;
            case 5:
              scOrderImportInfo.OrderJobName = str3;
              break;
            case 6:
              scOrderImportInfo.OrderLineQty = Conversions.ToInteger(str3);
              break;
            case 7:
              str1 = str3;
              scOrderImportInfo.OrderLineDesc1 = Microsoft.VisualBasic.Strings.Left(str3, 30);
              break;
            case 8:
              try
              {
                scOrderImportInfo.OrderLineOrgShipDt = Conversions.ToDate(str3);
                break;
              }
              catch (Exception ex)
              {
                ProjectData.SetProjectError(ex);
                scOrderImportInfo.OrderLineOrgShipDt = Conversions.ToDate("01/01/1901");
                ProjectData.ClearProjectError();
                break;
              }
            case 9:
              try
              {
                scOrderImportInfo.OrderLineShipDt = Conversions.ToDate(str3);
                break;
              }
              catch (Exception ex)
              {
                ProjectData.SetProjectError(ex);
                scOrderImportInfo.OrderLineShipDt = Conversions.ToDate("01/01/1901");
                ProjectData.ClearProjectError();
                break;
              }
            case 11:
              Decimal num3 = Decimal.Compare(Conversions.ToDecimal(str3), Decimal.Zero) <= 0 ? new Decimal() : Decimal.Divide(Conversions.ToDecimal(str3), new Decimal(10000L));
              scOrderImportInfo.OrderLineBook = num3;
              break;
            case 12:
              Decimal num4 = Decimal.Compare(Conversions.ToDecimal(str3), Decimal.Zero) <= 0 ? new Decimal() : Decimal.Divide(Conversions.ToDecimal(str3), new Decimal(10000L));
              scOrderImportInfo.OrderLineNet = num4;
              break;
            case 14:
              Left = str3;
              break;
            case 16:
              scOrderImportInfo.OrdSectsCnt = Conversions.ToInteger(str3);
              break;
            case 18:
              scOrderImportInfo.OrderLineCOTPP = str3;
              break;
            case 24:
              scOrderImportInfo.OrderLineCSR.AssocLaborName = str3;
              break;
            case 28:
              scOrderImportInfo.OrderPurchaser = str3;
              break;
            case 31:
              try
              {
                if (str3.Trim().Length == 10)
                {
                  scOrderImportInfo.OrderLineOrgAppElecDt = Conversions.ToDate(str3);
                  break;
                }
                scOrderImportInfo.OrderLineOrgAppElecDt = Conversions.ToDate("01/01/1901");
                break;
              }
              catch (Exception ex)
              {
                ProjectData.SetProjectError(ex);
                scOrderImportInfo.OrderLineOrgAppElecDt = Conversions.ToDate("01/01/1901");
                ProjectData.ClearProjectError();
                break;
              }
            case 32:
              try
              {
                if (str3.Trim().Length == 10)
                {
                  scOrderImportInfo.OrderLineCurAppElecDt = Conversions.ToDate(str3);
                  break;
                }
                scOrderImportInfo.OrderLineCurAppElecDt = Conversions.ToDate("01/01/1901");
                break;
              }
              catch (Exception ex)
              {
                ProjectData.SetProjectError(ex);
                scOrderImportInfo.OrderLineCurAppElecDt = Conversions.ToDate("01/01/1901");
                ProjectData.ClearProjectError();
                break;
              }
            case 33:
              try
              {
                if (str3.Trim().Length == 10)
                {
                  scOrderImportInfo.OrderLineActAppElecDt = Conversions.ToDate(str3);
                  break;
                }
                scOrderImportInfo.OrderLineActAppElecDt = Conversions.ToDate("01/01/1901");
                break;
              }
              catch (Exception ex)
              {
                ProjectData.SetProjectError(ex);
                scOrderImportInfo.OrderLineActAppElecDt = Conversions.ToDate("01/01/1901");
                ProjectData.ClearProjectError();
                break;
              }
            case 40:
              try
              {
                if (str3.Trim().Length == 10)
                {
                  scOrderImportInfo.OrderLineOrgCustRelDt = Conversions.ToDate(str3);
                  break;
                }
                scOrderImportInfo.OrderLineOrgCustRelDt = Conversions.ToDate("01/01/1901");
                break;
              }
              catch (Exception ex)
              {
                ProjectData.SetProjectError(ex);
                scOrderImportInfo.OrderLineOrgCustRelDt = Conversions.ToDate("01/01/1901");
                ProjectData.ClearProjectError();
                break;
              }
            case 41:
              try
              {
                if (str3.Trim().Length == 10)
                {
                  scOrderImportInfo.OrderLineCurCustRelDt = Conversions.ToDate(str3);
                  break;
                }
                scOrderImportInfo.OrderLineCurCustRelDt = Conversions.ToDate("01/01/1901");
                break;
              }
              catch (Exception ex)
              {
                ProjectData.SetProjectError(ex);
                scOrderImportInfo.OrderLineCurCustRelDt = Conversions.ToDate("01/01/1901");
                ProjectData.ClearProjectError();
                break;
              }
            case 42:
              try
              {
                if (str3.Trim().Length == 10)
                {
                  scOrderImportInfo.OrderLineActCustRelDt = Conversions.ToDate(str3);
                  break;
                }
                scOrderImportInfo.OrderLineActCustRelDt = Conversions.ToDate("01/01/1901");
                break;
              }
              catch (Exception ex)
              {
                ProjectData.SetProjectError(ex);
                scOrderImportInfo.OrderLineActCustRelDt = Conversions.ToDate("01/01/1901");
                ProjectData.ClearProjectError();
                break;
              }
            case 46:
              try
              {
                if (str3.Trim().Length == 10)
                {
                  scOrderImportInfo.OrderLineOrgMechDDDt = Conversions.ToDate(str3);
                  break;
                }
                scOrderImportInfo.OrderLineOrgMechDDDt = Conversions.ToDate("01/01/1901");
                break;
              }
              catch (Exception ex)
              {
                ProjectData.SetProjectError(ex);
                scOrderImportInfo.OrderLineOrgMechDDDt = Conversions.ToDate("01/01/1901");
                ProjectData.ClearProjectError();
                break;
              }
            case 47:
              try
              {
                if (str3.Trim().Length == 10)
                {
                  scOrderImportInfo.OrderLineCurMechDDDt = Conversions.ToDate(str3);
                  break;
                }
                scOrderImportInfo.OrderLineCurMechDDDt = Conversions.ToDate("01/01/1901");
                break;
              }
              catch (Exception ex)
              {
                ProjectData.SetProjectError(ex);
                scOrderImportInfo.OrderLineCurMechDDDt = Conversions.ToDate("01/01/1901");
                ProjectData.ClearProjectError();
                break;
              }
            case 48:
              try
              {
                if (str3.Trim().Length == 10)
                {
                  scOrderImportInfo.OrderLineActMechDDDt = Conversions.ToDate(str3);
                  break;
                }
                scOrderImportInfo.OrderLineActMechDDDt = Conversions.ToDate("01/01/1901");
                break;
              }
              catch (Exception ex)
              {
                ProjectData.SetProjectError(ex);
                scOrderImportInfo.OrderLineActMechDDDt = Conversions.ToDate("01/01/1901");
                ProjectData.ClearProjectError();
                break;
              }
            case 52:
              try
              {
                if (str3.Trim().Length == 10)
                {
                  scOrderImportInfo.OrderLineOrgEECompDt = Conversions.ToDate(str3);
                  break;
                }
                scOrderImportInfo.OrderLineOrgEECompDt = Conversions.ToDate("01/01/1901");
                break;
              }
              catch (Exception ex)
              {
                ProjectData.SetProjectError(ex);
                scOrderImportInfo.OrderLineOrgEECompDt = Conversions.ToDate("01/01/1901");
                ProjectData.ClearProjectError();
                break;
              }
            case 53:
              try
              {
                if (str3.Trim().Length == 10)
                {
                  scOrderImportInfo.OrderLineCurEECompDt = Conversions.ToDate(str3);
                  break;
                }
                scOrderImportInfo.OrderLineCurEECompDt = Conversions.ToDate("01/01/1901");
                break;
              }
              catch (Exception ex)
              {
                ProjectData.SetProjectError(ex);
                scOrderImportInfo.OrderLineCurEECompDt = Conversions.ToDate("01/01/1901");
                ProjectData.ClearProjectError();
                break;
              }
            case 54:
              try
              {
                if (str3.Trim().Length == 10)
                {
                  scOrderImportInfo.OrderLineActEECompDt = Conversions.ToDate(str3);
                  break;
                }
                scOrderImportInfo.OrderLineActEECompDt = Conversions.ToDate("01/01/1901");
                break;
              }
              catch (Exception ex)
              {
                ProjectData.SetProjectError(ex);
                scOrderImportInfo.OrderLineActEECompDt = Conversions.ToDate("01/01/1901");
                ProjectData.ClearProjectError();
                break;
              }
            case 55:
              try
              {
                if (str3.Trim().Length == 10)
                {
                  scOrderImportInfo.OrderLineOrgEngrRelDt = Conversions.ToDate(str3);
                  break;
                }
                scOrderImportInfo.OrderLineOrgEngrRelDt = Conversions.ToDate("01/01/1901");
                break;
              }
              catch (Exception ex)
              {
                ProjectData.SetProjectError(ex);
                scOrderImportInfo.OrderLineOrgEngrRelDt = Conversions.ToDate("01/01/1901");
                ProjectData.ClearProjectError();
                break;
              }
            case 56:
              try
              {
                if (str3.Trim().Length == 10)
                {
                  scOrderImportInfo.OrderLineCurEngrRelDt = Conversions.ToDate(str3);
                  break;
                }
                scOrderImportInfo.OrderLineCurEngrRelDt = Conversions.ToDate("01/01/1901");
                break;
              }
              catch (Exception ex)
              {
                ProjectData.SetProjectError(ex);
                scOrderImportInfo.OrderLineCurEngrRelDt = Conversions.ToDate("01/01/1901");
                ProjectData.ClearProjectError();
                break;
              }
            case 57:
              try
              {
                if (str3.Trim().Length == 10)
                {
                  scOrderImportInfo.OrderLineActEngrRelDt = Conversions.ToDate(str3);
                  break;
                }
                scOrderImportInfo.OrderLineActEngrRelDt = Conversions.ToDate("01/01/1901");
                break;
              }
              catch (Exception ex)
              {
                ProjectData.SetProjectError(ex);
                scOrderImportInfo.OrderLineActEngrRelDt = Conversions.ToDate("01/01/1901");
                ProjectData.ClearProjectError();
                break;
              }
            case 61:
              try
              {
                if (str3.Trim().Length == 10)
                {
                  scOrderImportInfo.OrderLineOrgAssyStDt = Conversions.ToDate(str3);
                  break;
                }
                scOrderImportInfo.OrderLineOrgAssyStDt = Conversions.ToDate("01/01/1901");
                break;
              }
              catch (Exception ex)
              {
                ProjectData.SetProjectError(ex);
                scOrderImportInfo.OrderLineOrgAssyStDt = Conversions.ToDate("01/01/1901");
                ProjectData.ClearProjectError();
                break;
              }
            case 62:
              try
              {
                if (str3.Trim().Length == 10)
                {
                  scOrderImportInfo.OrderLineCurAssyStDt = Conversions.ToDate(str3);
                  break;
                }
                scOrderImportInfo.OrderLineCurAssyStDt = Conversions.ToDate("01/01/1901");
                break;
              }
              catch (Exception ex)
              {
                ProjectData.SetProjectError(ex);
                scOrderImportInfo.OrderLineCurAssyStDt = Conversions.ToDate("01/01/1901");
                ProjectData.ClearProjectError();
                break;
              }
            case 63:
              try
              {
                if (str3.Trim().Length == 10)
                {
                  scOrderImportInfo.OrderLineActAssyStDt = Conversions.ToDate(str3);
                  break;
                }
                scOrderImportInfo.OrderLineActAssyStDt = Conversions.ToDate("01/01/1901");
                break;
              }
              catch (Exception ex)
              {
                ProjectData.SetProjectError(ex);
                scOrderImportInfo.OrderLineActAssyStDt = Conversions.ToDate("01/01/1901");
                ProjectData.ClearProjectError();
                break;
              }
            case 67:
              try
              {
                if (str3.Trim().Length == 10)
                {
                  scOrderImportInfo.OrderLineOrgAECompDt = Conversions.ToDate(str3);
                  break;
                }
                scOrderImportInfo.OrderLineOrgAECompDt = Conversions.ToDate("01/01/1901");
                break;
              }
              catch (Exception ex)
              {
                ProjectData.SetProjectError(ex);
                scOrderImportInfo.OrderLineOrgAECompDt = Conversions.ToDate("01/01/1901");
                ProjectData.ClearProjectError();
                break;
              }
            case 68:
              try
              {
                if (str3.Trim().Length == 10)
                {
                  scOrderImportInfo.OrderLineCurAECompDt = Conversions.ToDate(str3);
                  break;
                }
                scOrderImportInfo.OrderLineCurAECompDt = Conversions.ToDate("01/01/1901");
                break;
              }
              catch (Exception ex)
              {
                ProjectData.SetProjectError(ex);
                scOrderImportInfo.OrderLineCurAECompDt = Conversions.ToDate("01/01/1901");
                ProjectData.ClearProjectError();
                break;
              }
            case 69:
              try
              {
                if (str3.Trim().Length == 10)
                {
                  scOrderImportInfo.OrderLineActAECompDt = Conversions.ToDate(str3);
                  break;
                }
                scOrderImportInfo.OrderLineActAECompDt = Conversions.ToDate("01/01/1901");
                break;
              }
              catch (Exception ex)
              {
                ProjectData.SetProjectError(ex);
                scOrderImportInfo.OrderLineActAECompDt = Conversions.ToDate("01/01/1901");
                ProjectData.ClearProjectError();
                break;
              }
            case 71:
              scOrderImportInfo.OrderLineAE.AssocLaborName = str3;
              break;
            case 72:
              scOrderImportInfo.OrderLineOE.AssocLaborName = str3;
              break;
            case 73:
              scOrderImportInfo.OrderLineDM.AssocLaborName = str3;
              break;
            case 74:
              scOrderImportInfo.OrderLineME.AssocLaborName = str3;
              break;
            case 85:
              if (Operators.CompareString(str3, "Y", false) != 0)
                break;
              break;
            case 86:
              if (Operators.CompareString(str3, "Y", false) != 0)
                break;
              break;
            case 87:
              if (Operators.CompareString(str3, "Y", false) != 0)
                break;
              break;
            case 89:
              try
              {
                if (str3.Trim().Length == 10)
                {
                  scOrderImportInfo.OrderLineNB4Dt = Conversions.ToDate(str3);
                  break;
                }
                scOrderImportInfo.OrderLineNB4Dt = Conversions.ToDate("01/01/1901");
                break;
              }
              catch (Exception ex)
              {
                ProjectData.SetProjectError(ex);
                scOrderImportInfo.OrderLineNB4Dt = Conversions.ToDate("01/01/1901");
                ProjectData.ClearProjectError();
                break;
              }
            case 92:
              if (str3.Trim().Length >= 1)
                scOrderImportInfo.OrderLinePeltCode = str3.Substring(0, 1);
              else
                scOrderImportInfo.OrderLinePeltCode = " ";
              if (str3.Trim().Length >= 2)
              {
                if (Operators.CompareString(str3.Substring(1, 1), "1", false) == 0)
                {
                  scOrderImportInfo.OrderLineEngrGrp = "ICS";
                  scOrderImportInfo.OrderLineEngComposite = 72341268037894144L;
                  break;
                }
                if (Operators.CompareString(str3.Substring(1, 1), "3", false) == 0)
                {
                  scOrderImportInfo.OrderLineEngrGrp = "DCS";
                  scOrderImportInfo.OrderLineEngComposite = 72340168526266368L;
                  break;
                }
                if (Operators.CompareString(str3.Substring(1, 1), "5", false) == 0)
                {
                  scOrderImportInfo.OrderLineEngrGrp = "WWT";
                  scOrderImportInfo.OrderLineEngComposite = 72342367549521920L;
                  break;
                }
                scOrderImportInfo.OrderLineEngrGrp = "ENG";
                scOrderImportInfo.OrderLineEngComposite = 72339069014638592L;
                break;
              }
              scOrderImportInfo.OrderLineEngrGrp = "ENG";
              scOrderImportInfo.OrderLineEngComposite = 72339069014638592L;
              break;
            case 93:
              string str5;
              if (Operators.CompareString(Left, "1988", false) == 0 | Operators.CompareString(Left, "1989", false) == 0 | Operators.CompareString(Left, "1990", false) == 0 | Operators.CompareString(Left, "1991", false) == 0 | Operators.CompareString(Left, "6494", false) == 0 | Operators.CompareString(Left, "6495", false) == 0)
              {
                char[] charArray = str1.ToCharArray();
                if (Operators.CompareString(Conversions.ToString(charArray[9]), "A", false) >= 0 & Operators.CompareString(Conversions.ToString(charArray[9]), "Z", false) <= 0)
                {
                  str5 = "NW221C";
                  scOrderImportInfo.OrderJobName = scOrderImportInfo.OrderPurchaser;
                }
                else if (Operators.CompareString(Conversions.ToString(charArray[9]), "0", false) >= 0 & Operators.CompareString(Conversions.ToString(charArray[9]), "9", false) <= 0 | str1.Contains("CIRCUIT BREA"))
                {
                  str5 = "NW221B";
                  scOrderImportInfo.OrderJobName = scOrderImportInfo.OrderPurchaser;
                }
                else
                  str5 = str3;
              }
              else if (Operators.CompareString(Left, "2121", false) == 0 | Operators.CompareString(Left, "9688", false) == 0 | Operators.CompareString(Left, "9007", false) == 0)
              {
                str5 = "PARTS";
                scOrderImportInfo.OrderJobName = scOrderImportInfo.OrderPurchaser;
              }
              else if (Operators.CompareString(Left, "9466", false) == 0 | Operators.CompareString(Left, "9467", false) == 0 | Operators.CompareString(Left, "9468", false) == 0 | Operators.CompareString(Left, "9472", false) == 0 | Operators.CompareString(Left, "9534", false) == 0 | Operators.CompareString(Left, "9535", false) == 0 | Operators.CompareString(Left, "9536", false) == 0 | Operators.CompareString(Left, "9538", false) == 0 | Operators.CompareString(Left, "2ZUH", false) == 0 | Operators.CompareString(Left, "0ELW", false) == 0 | Operators.CompareString(Left, "0ELY", false) == 0 | Operators.CompareString(Left, "0WKF", false) == 0 | Operators.CompareString(Left, "0ZUH", false) == 0 | Operators.CompareString(Left, "1GC8", false) == 0 | Operators.CompareString(Left, "0ZUJ", false) == 0 | Operators.CompareString(Left, "0Z6W", false) == 0 | Operators.CompareString(Left, "0Z6Z", false) == 0 | Operators.CompareString(Left, "0ZUK", false) == 0)
              {
                if (scOrderImportInfo.OrdSectsCnt > 0)
                {
                  str5 = "SWBD";
                }
                else
                {
                  str5 = "PARTS";
                  scOrderImportInfo.OrderJobName = scOrderImportInfo.OrderPurchaser;
                }
              }
              else if (Operators.CompareString(Left, "9009", false) == 0 | Operators.CompareString(Left, "9010", false) == 0 | Operators.CompareString(Left, "9011", false) == 0 | Operators.CompareString(Left, "9012", false) == 0 | Operators.CompareString(Left, "9016", false) == 0 | Operators.CompareString(Left, "9017", false) == 0 | Operators.CompareString(Left, "9018", false) == 0 | Operators.CompareString(Left, "9019", false) == 0 | Operators.CompareString(Left, "9022", false) == 0 | Operators.CompareString(Left, "9026", false) == 0 | Operators.CompareString(Left, "9405", false) == 0 | Operators.CompareString(Left, "9408", false) == 0 | Operators.CompareString(Left, "9409", false) == 0 | Operators.CompareString(Left, "9491", false) == 0 | Operators.CompareString(Left, "9495", false) == 0 | Operators.CompareString(Left, "9496", false) == 0)
              {
                if (scOrderImportInfo.OrdSectsCnt > 0)
                {
                  str5 = "LVDO";
                }
                else
                {
                  str5 = "PARTS";
                  scOrderImportInfo.OrderJobName = scOrderImportInfo.OrderPurchaser;
                }
              }
              else
                str5 = str3;
              List<scAssemblyLine>.Enumerator enumerator;
              try
              {
                enumerator = AssemblyLines.GetEnumerator();
                while (enumerator.MoveNext())
                {
                  scLevels current = (scLevels) enumerator.Current;
                  if (current.LevelAbbrv.Contains(str5))
                  {
                    scOrderImportInfo.AssemblyLine = current;
                    break;
                  }
                }
                break;
              }
              finally
              {
                enumerator.Dispose();
              }
            case 94:
              if (Operators.CompareString(str3, "01", false) != 0)
                break;
              break;
            case 99:
              if (str3.Trim().Length >= 8)
              {
                scOrderImportInfo.OrderLineCplxA = str3.Substring(0, 2);
                scOrderImportInfo.OrderLineCplxB = str3.Substring(3, 2);
                scOrderImportInfo.OrderLineCplxC = str3.Substring(6, 2);
                scOrderImportInfo.OrderLineMechClpx = str3.Substring(6, 1);
                scOrderImportInfo.OrderLineElecClpx = str3.Substring(7, 1);
                break;
              }
              break;
            case 104:
              try
              {
                if (str3.Trim().Length == 10)
                  scOrderImportInfo.OrderLineOrgTargetDt = Conversions.ToDate(str3);
                else
                  scOrderImportInfo.OrderLineOrgTargetDt = Conversions.ToDate("01/01/1901");
                scOrderImportInfo.OrderLineTargetDt = str3.Trim().Length != 10 ? Conversions.ToDate("01/01/1901") : Conversions.ToDate(str3);
                break;
              }
              catch (Exception ex)
              {
                ProjectData.SetProjectError(ex);
                scOrderImportInfo.OrderLineOrgTargetDt = Conversions.ToDate("01/01/1901");
                scOrderImportInfo.OrderLineTargetDt = Conversions.ToDate("01/01/1901");
                ProjectData.ClearProjectError();
                break;
              }
            case 105:
              try
              {
                if (scOrderImportInfo.AssemblyLine.LevelAbbrv.Contains("NW221B") | scOrderImportInfo.AssemblyLine.LevelAbbrv.Contains("NW221C"))
                {
                  scOrderImportInfo.OrderLineTargetDt = scOrderImportInfo.OrderLineShipDt;
                  break;
                }
                if (str3.Trim().Length == 10)
                  scOrderImportInfo.OrderLineCurTargetDt = Conversions.ToDate(str3);
                else
                  scOrderImportInfo.OrderLineCurTargetDt = Conversions.ToDate("01/01/1901");
                break;
              }
              catch (Exception ex)
              {
                ProjectData.SetProjectError(ex);
                scOrderImportInfo.OrderLineCurTargetDt = Conversions.ToDate("01/01/1901");
                ProjectData.ClearProjectError();
                break;
              }
            case 106:
              try
              {
                scOrderImportInfo.OrderLineAEHrs = Convert.ToInt32(str3);
                break;
              }
              catch (Exception ex)
              {
                ProjectData.SetProjectError(ex);
                scOrderImportInfo.OrderLineAEHrs = 0;
                ProjectData.ClearProjectError();
                break;
              }
            case 107:
              try
              {
                scOrderImportInfo.OrderLineMDHrs = Convert.ToInt32(str3);
                break;
              }
              catch (Exception ex)
              {
                ProjectData.SetProjectError(ex);
                scOrderImportInfo.OrderLineMDHrs = 0;
                ProjectData.ClearProjectError();
                break;
              }
            case 108:
              try
              {
                scOrderImportInfo.OrderLineEDHrs = Convert.ToInt32(str3);
                break;
              }
              catch (Exception ex)
              {
                ProjectData.SetProjectError(ex);
                scOrderImportInfo.OrderLineEDHrs = 0;
                ProjectData.ClearProjectError();
                break;
              }
            case 110:
              scOrderImportInfo.OrderLineSER = str3;
              break;
            case 117:
              try
              {
                if (str3.Trim().Length == 10)
                {
                  scOrderImportInfo.OrderLineOrgAppSentDt = Conversions.ToDate(str3);
                  break;
                }
                scOrderImportInfo.OrderLineOrgAppSentDt = Conversions.ToDate("01/01/1901");
                break;
              }
              catch (Exception ex)
              {
                ProjectData.SetProjectError(ex);
                scOrderImportInfo.OrderLineOrgAppSentDt = Conversions.ToDate("01/01/1901");
                ProjectData.ClearProjectError();
                break;
              }
            case 118:
              try
              {
                if (str3.Trim().Length == 10)
                {
                  scOrderImportInfo.OrderLineCurAppSentDt = Conversions.ToDate(str3);
                  break;
                }
                scOrderImportInfo.OrderLineCurAppSentDt = Conversions.ToDate("01/01/1901");
                break;
              }
              catch (Exception ex)
              {
                ProjectData.SetProjectError(ex);
                scOrderImportInfo.OrderLineCurAppSentDt = Conversions.ToDate("01/01/1901");
                ProjectData.ClearProjectError();
                break;
              }
            case 119:
              try
              {
                if (str3.Trim().Length == 10)
                  scOrderImportInfo.OrderLineActAppSentDt = Conversions.ToDate(str3);
                else
                  scOrderImportInfo.OrderLineActAppSentDt = Conversions.ToDate("01/01/1901");
              }
              catch (Exception ex)
              {
                ProjectData.SetProjectError(ex);
                scOrderImportInfo.OrderLineActAppSentDt = Conversions.ToDate("01/01/1901");
                ProjectData.ClearProjectError();
              }
              break;
          }
          ++num1;
        }
        while ((int) num1 <= 120);
label_193:
        if (flag && scOrderImportInfo.SEPlant.PlantId > 0 & scOrderImportInfo.AssemblyLine.LevelId > 0)
          arrayList2.Add((object) scOrderImportInfo);
      }
      streamReader.Close();
      arrayList1 = arrayList2;
label_198:
      return arrayList1;
    }

    public ArrayList ImportBacklog085All(string ImportFile, scPlants SEPlants, List<scAssemblyLine> AssemblyLines)
    {
      StreamReader streamReader;
      ArrayList arrayList1;
      try
      {
        streamReader = File.OpenText(ImportFile);
      }
      catch (Exception ex)
      {
        ProjectData.SetProjectError(ex);
        int num = (int) Interaction.MsgBox((object) ("Error Opening Backlog file...\r\n" + ex.Message), MsgBoxStyle.Exclamation, (object) "File Open Error");
        arrayList1 = (ArrayList) null;
        ProjectData.ClearProjectError();
        goto label_125;
      }
      short[] numArray1 = new short[126];
      short[] numArray2 = new short[126];
      numArray1[0] = (short) 1;
      numArray2[0] = (short) 3;
      numArray1[1] = (short) 5;
      numArray2[1] = (short) 8;
      numArray1[2] = (short) 14;
      numArray2[2] = (short) 3;
      numArray1[3] = (short) 18;
      numArray2[3] = (short) 2;
      numArray1[4] = (short) 21;
      numArray2[4] = (short) 2;
      numArray1[5] = (short) 24;
      numArray2[5] = (short) 35;
      numArray1[6] = (short) 60;
      numArray2[6] = (short) 7;
      numArray1[7] = (short) 68;
      numArray2[7] = (short) 46;
      numArray1[8] = (short) 115;
      numArray2[8] = (short) 10;
      numArray1[9] = (short) 126;
      numArray2[9] = (short) 10;
      numArray1[10] = (short) 137;
      numArray2[10] = (short) 10;
      numArray1[11] = (short) 148;
      numArray2[11] = (short) 11;
      numArray1[12] = (short) 160;
      numArray2[12] = (short) 11;
      numArray1[13] = (short) 172;
      numArray2[13] = (short) 1;
      numArray1[14] = (short) 174;
      numArray2[14] = (short) 4;
      numArray1[15] = (short) 179;
      numArray2[15] = (short) 1;
      numArray1[16] = (short) 181;
      numArray2[16] = (short) 2;
      numArray1[17] = (short) 184;
      numArray2[17] = (short) 2;
      numArray1[18] = (short) 187;
      numArray2[18] = (short) 2;
      numArray1[19] = (short) 190;
      numArray2[19] = (short) 10;
      numArray1[20] = (short) 201;
      numArray2[20] = (short) 10;
      numArray1[21] = (short) 212;
      numArray2[21] = (short) 10;
      numArray1[22] = (short) 223;
      numArray2[22] = (short) 10;
      numArray1[23] = (short) 234;
      numArray2[23] = (short) 8;
      numArray1[24] = (short) 243;
      numArray2[24] = (short) 3;
      numArray1[25] = (short) 247;
      numArray2[25] = (short) 4;
      numArray1[26] = (short) 252;
      numArray2[26] = (short) 4;
      numArray1[27] = (short) 257;
      numArray2[27] = (short) 5;
      numArray1[28] = (short) 263;
      numArray2[28] = (short) 30;
      numArray1[29] = (short) 294;
      numArray2[29] = (short) 20;
      numArray1[30] = (short) 315;
      numArray2[30] = (short) 10;
      numArray1[31] = (short) 326;
      numArray2[31] = (short) 10;
      numArray1[32] = (short) 337;
      numArray2[32] = (short) 10;
      numArray1[33] = (short) 348;
      numArray2[33] = (short) 10;
      numArray1[34] = (short) 359;
      numArray2[34] = (short) 10;
      numArray1[35] = (short) 370;
      numArray2[35] = (short) 10;
      numArray1[36] = (short) 381;
      numArray2[36] = (short) 10;
      numArray1[37] = (short) 392;
      numArray2[37] = (short) 10;
      numArray1[38] = (short) 403;
      numArray2[38] = (short) 10;
      numArray1[39] = (short) 414;
      numArray2[39] = (short) 10;
      numArray1[40] = (short) 425;
      numArray2[40] = (short) 10;
      numArray1[41] = (short) 436;
      numArray2[41] = (short) 10;
      numArray1[42] = (short) 447;
      numArray2[42] = (short) 10;
      numArray1[43] = (short) 458;
      numArray2[43] = (short) 10;
      numArray1[44] = (short) 469;
      numArray2[44] = (short) 10;
      numArray1[45] = (short) 480;
      numArray2[45] = (short) 10;
      numArray1[46] = (short) 491;
      numArray2[46] = (short) 10;
      numArray1[47] = (short) 502;
      numArray2[47] = (short) 10;
      numArray1[48] = (short) 513;
      numArray2[48] = (short) 10;
      numArray1[49] = (short) 524;
      numArray2[49] = (short) 10;
      numArray1[50] = (short) 535;
      numArray2[50] = (short) 10;
      numArray1[51] = (short) 546;
      numArray2[51] = (short) 10;
      numArray1[52] = (short) 557;
      numArray2[52] = (short) 10;
      numArray1[53] = (short) 568;
      numArray2[53] = (short) 10;
      numArray1[54] = (short) 579;
      numArray2[54] = (short) 10;
      numArray1[55] = (short) 590;
      numArray2[55] = (short) 10;
      numArray1[56] = (short) 601;
      numArray2[56] = (short) 10;
      numArray1[57] = (short) 612;
      numArray2[57] = (short) 10;
      numArray1[58] = (short) 623;
      numArray2[58] = (short) 10;
      numArray1[59] = (short) 634;
      numArray2[59] = (short) 10;
      numArray1[60] = (short) 645;
      numArray2[60] = (short) 10;
      numArray1[61] = (short) 656;
      numArray2[61] = (short) 10;
      numArray1[62] = (short) 667;
      numArray2[62] = (short) 10;
      numArray1[63] = (short) 678;
      numArray2[63] = (short) 10;
      numArray1[64] = (short) 689;
      numArray2[64] = (short) 10;
      numArray1[65] = (short) 700;
      numArray2[65] = (short) 10;
      numArray1[66] = (short) 711;
      numArray2[66] = (short) 10;
      numArray1[67] = (short) 722;
      numArray2[67] = (short) 10;
      numArray1[68] = (short) 733;
      numArray2[68] = (short) 10;
      numArray1[69] = (short) 744;
      numArray2[69] = (short) 10;
      numArray1[70] = (short) 755;
      numArray2[70] = (short) 1;
      numArray1[71] = (short) 757;
      numArray2[71] = (short) 3;
      numArray1[72] = (short) 761;
      numArray2[72] = (short) 3;
      numArray1[73] = (short) 765;
      numArray2[73] = (short) 3;
      numArray1[74] = (short) 769;
      numArray2[74] = (short) 3;
      numArray1[75] = (short) 773;
      numArray2[75] = (short) 15;
      numArray1[76] = (short) 789;
      numArray2[76] = (short) 2;
      numArray1[77] = (short) 792;
      numArray2[77] = (short) 1;
      numArray1[78] = (short) 794;
      numArray2[78] = (short) 18;
      numArray1[79] = (short) 813;
      numArray2[79] = (short) 1;
      numArray1[80] = (short) 815;
      numArray2[80] = (short) 1;
      numArray1[81] = (short) 817;
      numArray2[81] = (short) 3;
      numArray1[82] = (short) 821;
      numArray2[82] = (short) 15;
      numArray1[83] = (short) 837;
      numArray2[83] = (short) 35;
      numArray1[84] = (short) 873;
      numArray2[84] = (short) 5;
      numArray1[85] = (short) 879;
      numArray2[85] = (short) 1;
      numArray1[86] = (short) 890;
      numArray2[86] = (short) 1;
      numArray1[87] = (short) 892;
      numArray2[87] = (short) 1;
      numArray1[88] = (short) 894;
      numArray2[88] = (short) 1;
      numArray1[89] = (short) 896;
      numArray2[89] = (short) 10;
      numArray1[90] = (short) 907;
      numArray2[90] = (short) 10;
      numArray1[91] = (short) 918;
      numArray2[91] = (short) 1;
      numArray1[92] = (short) 920;
      numArray2[92] = (short) 2;
      numArray1[93] = (short) 923;
      numArray2[93] = (short) 4;
      numArray1[94] = (short) 928;
      numArray2[94] = (short) 2;
      numArray1[95] = (short) 931;
      numArray2[95] = (short) 10;
      numArray1[96] = (short) 942;
      numArray2[96] = (short) 10;
      numArray1[97] = (short) 953;
      numArray2[97] = (short) 10;
      numArray1[98] = (short) 964;
      numArray2[98] = (short) 3;
      numArray1[99] = (short) 968;
      numArray2[99] = (short) 8;
      numArray1[100] = (short) 977;
      numArray2[100] = (short) 5;
      numArray1[101] = (short) 983;
      numArray2[101] = (short) 10;
      numArray1[102] = (short) 994;
      numArray2[102] = (short) 10;
      numArray1[103] = (short) 1005;
      numArray2[103] = (short) 10;
      numArray1[104] = (short) 1016;
      numArray2[104] = (short) 10;
      numArray1[105] = (short) 1027;
      numArray2[105] = (short) 10;
      numArray1[106] = (short) 1051;
      numArray2[106] = (short) 3;
      numArray1[107] = (short) 1055;
      numArray2[107] = (short) 3;
      numArray1[108] = (short) 1059;
      numArray2[108] = (short) 3;
      numArray1[109] = (short) 1063;
      numArray2[109] = (short) 3;
      numArray1[110] = (short) 1067;
      numArray2[110] = (short) 11;
      numArray1[111] = (short) 1079;
      numArray2[111] = (short) 20;
      numArray1[112] = (short) 1100;
      numArray2[112] = (short) 12;
      numArray1[113] = (short) 1113;
      numArray2[113] = (short) 10;
      numArray1[114] = (short) 1124;
      numArray2[114] = (short) 10;
      numArray1[115] = (short) 1135;
      numArray2[115] = (short) 10;
      numArray1[116] = (short) 1146;
      numArray2[116] = (short) 10;
      numArray1[117] = (short) 1157;
      numArray2[117] = (short) 10;
      numArray1[118] = (short) 1168;
      numArray2[118] = (short) 10;
      numArray1[119] = (short) 1179;
      numArray2[119] = (short) 10;
      numArray1[120] = (short) 1190;
      numArray2[120] = (short) 2;
      numArray1[121] = (short) 1193;
      numArray2[121] = (short) 10;
      scOrderImportInfo scOrderImportInfo = (scOrderImportInfo) null;
      ArrayList arrayList2 = new ArrayList();
      while (streamReader.Peek() >= 0)
      {
        Thread.CurrentThread.Join(0);
        string str1 = "";
        string Left1 = "";
        string str2 = streamReader.ReadLine();
        short num1 = 0;
        bool flag;
        do
        {
          int Start = (int) numArray1[(int) num1];
          int Length = (int) numArray2[(int) num1];
          int num2 = checked ((int) (short) unchecked ((int) numArray1[(int) num1] + (int) numArray2[(int) num1]) - 1);
          string Left2 = Microsoft.VisualBasic.Strings.Mid(str2, Start, Length);
          switch (num1)
          {
            case 0:
              string str3 = Left2;
              flag = false;
              if (SEPlants.PlantDesin.Contains(str3))
              {
                scOrderImportInfo = new scOrderImportInfo();
                flag = true;
                scOrderImportInfo.SEPlant = SEPlants;
              }
              if (flag)
                break;
              goto label_120;
            case 1:
              scOrderImportInfo.OrderFO = Left2;
              break;
            case 2:
              scOrderImportInfo.OrderLineNum = Left2;
              break;
            case 3:
              scOrderImportInfo.OrderLineSL = Left2;
              break;
            case 4:
              scOrderImportInfo.OrderLineSS = Left2;
              break;
            case 5:
              scOrderImportInfo.OrderJobName = Left2;
              break;
            case 6:
              scOrderImportInfo.OrderLineQty = Conversions.ToInteger(Left2);
              break;
            case 7:
              str1 = Left2;
              break;
            case 8:
              try
              {
                scOrderImportInfo.OrderLineOrgShipDt = Conversions.ToDate(Left2);
                break;
              }
              catch (Exception ex)
              {
                ProjectData.SetProjectError(ex);
                scOrderImportInfo.OrderLineOrgShipDt = Conversions.ToDate("01/01/1901");
                ProjectData.ClearProjectError();
                break;
              }
            case 9:
              try
              {
                scOrderImportInfo.OrderLineShipDt = Conversions.ToDate(Left2);
                break;
              }
              catch (Exception ex)
              {
                ProjectData.SetProjectError(ex);
                scOrderImportInfo.OrderLineShipDt = Conversions.ToDate("01/01/1901");
                ProjectData.ClearProjectError();
                break;
              }
            case 11:
              Decimal num3 = Decimal.Compare(Conversions.ToDecimal(Left2), Decimal.Zero) <= 0 ? new Decimal() : Decimal.Divide(Conversions.ToDecimal(Left2), new Decimal(10000L));
              scOrderImportInfo.OrderLineBook = num3;
              break;
            case 12:
              Decimal num4 = Decimal.Compare(Conversions.ToDecimal(Left2), Decimal.Zero) <= 0 ? new Decimal() : Decimal.Divide(Conversions.ToDecimal(Left2), new Decimal(10000L));
              scOrderImportInfo.OrderLineNet = num4;
              break;
            case 14:
              Left1 = Left2;
              break;
            case 16:
              scOrderImportInfo.OrdSectsCnt = Conversions.ToInteger(Left2);
              break;
            case 28:
              scOrderImportInfo.OrderPurchaser = Left2;
              break;
            case 55:
              try
              {
                if (Left2.Trim().Length == 10)
                {
                  scOrderImportInfo.OrderLineOrgEngrRelDt = Conversions.ToDate(Left2);
                  break;
                }
                scOrderImportInfo.OrderLineOrgEngrRelDt = Conversions.ToDate("01/01/1901");
                break;
              }
              catch (Exception ex)
              {
                ProjectData.SetProjectError(ex);
                scOrderImportInfo.OrderLineOrgEngrRelDt = Conversions.ToDate("01/01/1901");
                ProjectData.ClearProjectError();
                break;
              }
            case 56:
              try
              {
                if (Left2.Trim().Length == 10)
                {
                  scOrderImportInfo.OrderLineCurEngrRelDt = Conversions.ToDate(Left2);
                  break;
                }
                scOrderImportInfo.OrderLineCurEngrRelDt = Conversions.ToDate("01/01/1901");
                break;
              }
              catch (Exception ex)
              {
                ProjectData.SetProjectError(ex);
                scOrderImportInfo.OrderLineCurEngrRelDt = Conversions.ToDate("01/01/1901");
                ProjectData.ClearProjectError();
                break;
              }
            case 57:
              try
              {
                if (Left2.Trim().Length == 10)
                {
                  scOrderImportInfo.OrderLineActEngrRelDt = Conversions.ToDate(Left2);
                  break;
                }
                scOrderImportInfo.OrderLineActEngrRelDt = Conversions.ToDate("01/01/1901");
                break;
              }
              catch (Exception ex)
              {
                ProjectData.SetProjectError(ex);
                scOrderImportInfo.OrderLineActEngrRelDt = Conversions.ToDate("01/01/1901");
                ProjectData.ClearProjectError();
                break;
              }
            case 61:
              try
              {
                if (Left2.Trim().Length == 10)
                {
                  scOrderImportInfo.OrderLineOrgAssyStDt = Conversions.ToDate(Left2);
                  break;
                }
                scOrderImportInfo.OrderLineOrgAssyStDt = Conversions.ToDate("01/01/1901");
                break;
              }
              catch (Exception ex)
              {
                ProjectData.SetProjectError(ex);
                scOrderImportInfo.OrderLineOrgAssyStDt = Conversions.ToDate("01/01/1901");
                ProjectData.ClearProjectError();
                break;
              }
            case 62:
              try
              {
                if (Left2.Trim().Length == 10)
                {
                  scOrderImportInfo.OrderLineCurAssyStDt = Conversions.ToDate(Left2);
                  break;
                }
                scOrderImportInfo.OrderLineCurAssyStDt = Conversions.ToDate("01/01/1901");
                break;
              }
              catch (Exception ex)
              {
                ProjectData.SetProjectError(ex);
                scOrderImportInfo.OrderLineCurAssyStDt = Conversions.ToDate("01/01/1901");
                ProjectData.ClearProjectError();
                break;
              }
            case 63:
              try
              {
                if (Left2.Trim().Length == 10)
                {
                  scOrderImportInfo.OrderLineActAssyStDt = Conversions.ToDate(Left2);
                  break;
                }
                scOrderImportInfo.OrderLineActAssyStDt = Conversions.ToDate("01/01/1901");
                break;
              }
              catch (Exception ex)
              {
                ProjectData.SetProjectError(ex);
                scOrderImportInfo.OrderLineActAssyStDt = Conversions.ToDate("01/01/1901");
                ProjectData.ClearProjectError();
                break;
              }
            case 72:
              scOrderImportInfo.OrderLineOE.AssocLaborName = Left2;
              break;
            case 74:
              scOrderImportInfo.OrderLineME.AssocLaborName = Left2;
              break;
            case 85:
              if (Operators.CompareString(Left2, "Y", false) != 0)
                break;
              break;
            case 86:
              if (Operators.CompareString(Left2, "Y", false) != 0)
                break;
              break;
            case 87:
              if (Operators.CompareString(Left2, "Y", false) != 0)
                break;
              break;
            case 89:
              try
              {
                if (Left2.Trim().Length == 10)
                {
                  scOrderImportInfo.OrderLineNB4Dt = Conversions.ToDate(Left2);
                  break;
                }
                scOrderImportInfo.OrderLineNB4Dt = Conversions.ToDate("01/01/1901");
                break;
              }
              catch (Exception ex)
              {
                ProjectData.SetProjectError(ex);
                scOrderImportInfo.OrderLineNB4Dt = Conversions.ToDate("01/01/1901");
                ProjectData.ClearProjectError();
                break;
              }
            case 92:
              if (Left2.Trim().Length >= 1)
                scOrderImportInfo.OrderLinePeltCode = Left2.Substring(0, 1);
              else
                scOrderImportInfo.OrderLinePeltCode = " ";
              if (Left2.Trim().Length >= 2)
              {
                if (Operators.CompareString(Left2.Substring(1, 1), "1", false) == 0)
                {
                  scOrderImportInfo.OrderLineEngrGrp = "ICS";
                  scOrderImportInfo.OrderLineEngComposite = 72341268037894144L;
                  break;
                }
                if (Operators.CompareString(Left2.Substring(1, 1), "3", false) == 0)
                {
                  scOrderImportInfo.OrderLineEngrGrp = "DCS";
                  scOrderImportInfo.OrderLineEngComposite = 72340168526266368L;
                  break;
                }
                if (Operators.CompareString(Left2.Substring(1, 1), "5", false) == 0)
                {
                  scOrderImportInfo.OrderLineEngrGrp = "WWT";
                  scOrderImportInfo.OrderLineEngComposite = 72342367549521920L;
                  break;
                }
                scOrderImportInfo.OrderLineEngrGrp = "ENG";
                scOrderImportInfo.OrderLineEngComposite = 72339069014638592L;
                break;
              }
              scOrderImportInfo.OrderLineEngrGrp = "ENG";
              scOrderImportInfo.OrderLineEngComposite = 72339069014638592L;
              break;
            case 93:
              string str4;
              if (Operators.CompareString(Left1, "1988", false) == 0 | Operators.CompareString(Left1, "1989", false) == 0 | Operators.CompareString(Left1, "1990", false) == 0 | Operators.CompareString(Left1, "1991", false) == 0 | Operators.CompareString(Left1, "6494", false) == 0 | Operators.CompareString(Left1, "6495", false) == 0)
              {
                char[] charArray = str1.ToCharArray();
                if (Operators.CompareString(Conversions.ToString(charArray[9]), "A", false) >= 0 & Operators.CompareString(Conversions.ToString(charArray[9]), "Z", false) <= 0)
                {
                  str4 = "NW221C";
                  scOrderImportInfo.OrderJobName = scOrderImportInfo.OrderPurchaser;
                }
                else if (Operators.CompareString(Conversions.ToString(charArray[9]), "0", false) >= 0 & Operators.CompareString(Conversions.ToString(charArray[9]), "9", false) <= 0 | str1.Contains("CIRCUIT BREA"))
                {
                  str4 = "NW221B";
                  scOrderImportInfo.OrderJobName = scOrderImportInfo.OrderPurchaser;
                }
                else
                  str4 = Left2;
              }
              else if (Operators.CompareString(Left1, "2121", false) == 0 | Operators.CompareString(Left1, "9688", false) == 0 | Operators.CompareString(Left1, "9007", false) == 0)
              {
                str4 = "PARTS";
                scOrderImportInfo.OrderJobName = scOrderImportInfo.OrderPurchaser;
              }
              else if (Operators.CompareString(Left1, "9466", false) == 0 | Operators.CompareString(Left1, "9467", false) == 0 | Operators.CompareString(Left1, "9468", false) == 0 | Operators.CompareString(Left1, "9472", false) == 0 | Operators.CompareString(Left1, "9534", false) == 0 | Operators.CompareString(Left1, "9535", false) == 0 | Operators.CompareString(Left1, "9536", false) == 0 | Operators.CompareString(Left1, "9538", false) == 0 | Operators.CompareString(Left1, "2ZUH", false) == 0 | Operators.CompareString(Left1, "0ELW", false) == 0 | Operators.CompareString(Left1, "0ELY", false) == 0 | Operators.CompareString(Left1, "0WKF", false) == 0 | Operators.CompareString(Left1, "0ZUH", false) == 0 | Operators.CompareString(Left1, "1GC8", false) == 0 | Operators.CompareString(Left1, "0ZUJ", false) == 0 | Operators.CompareString(Left1, "0Z6W", false) == 0 | Operators.CompareString(Left1, "0Z6Z", false) == 0 | Operators.CompareString(Left1, "0ZUK", false) == 0)
              {
                if (scOrderImportInfo.OrdSectsCnt > 0)
                {
                  str4 = "SWBD";
                }
                else
                {
                  str4 = "PARTS";
                  scOrderImportInfo.OrderJobName = scOrderImportInfo.OrderPurchaser;
                }
              }
              else if (Operators.CompareString(Left1, "9009", false) == 0 | Operators.CompareString(Left1, "9010", false) == 0 | Operators.CompareString(Left1, "9011", false) == 0 | Operators.CompareString(Left1, "9012", false) == 0 | Operators.CompareString(Left1, "9016", false) == 0 | Operators.CompareString(Left1, "9017", false) == 0 | Operators.CompareString(Left1, "9018", false) == 0 | Operators.CompareString(Left1, "9019", false) == 0 | Operators.CompareString(Left1, "9022", false) == 0 | Operators.CompareString(Left1, "9026", false) == 0 | Operators.CompareString(Left1, "9405", false) == 0 | Operators.CompareString(Left1, "9408", false) == 0 | Operators.CompareString(Left1, "9409", false) == 0 | Operators.CompareString(Left1, "9491", false) == 0 | Operators.CompareString(Left1, "9495", false) == 0 | Operators.CompareString(Left1, "9496", false) == 0)
              {
                if (scOrderImportInfo.OrdSectsCnt > 0)
                {
                  str4 = "LVDO";
                }
                else
                {
                  str4 = "PARTS";
                  scOrderImportInfo.OrderJobName = scOrderImportInfo.OrderPurchaser;
                }
              }
              else
                str4 = Left2;
              List<scAssemblyLine>.Enumerator enumerator;
              try
              {
                enumerator = AssemblyLines.GetEnumerator();
                while (enumerator.MoveNext())
                {
                  scLevels current = (scLevels) enumerator.Current;
                  if (current.LevelAbbrv.Contains(str4))
                  {
                    scOrderImportInfo.AssemblyLine = current;
                    break;
                  }
                }
                break;
              }
              finally
              {
                enumerator.Dispose();
              }
            case 94:
              if (Operators.CompareString(Left2, "01", false) != 0)
                break;
              break;
            case 99:
              if (Left2.Trim().Length >= 8)
              {
                scOrderImportInfo.OrderLineMechClpx = Left2.Substring(6, 1);
                scOrderImportInfo.OrderLineElecClpx = Left2.Substring(7, 1);
              }
              if (Left2.Trim().Length >= 6)
              {
                if (Operators.CompareString(Left2.Substring(3, 2), "44", false) == 0)
                {
                  this.lcLogWriter.logData("Order " + scOrderImportInfo.FOLineSLSS + " is transferred to Rojo, Ship date;" + Conversions.ToString(scOrderImportInfo.OrderLineShipDt));
                  this.lcBWT2.UpdateAssemLine(scOrderImportInfo.FOLineSLSS, 9);
                  flag = false;
                  goto label_120;
                }
                else if (Operators.CompareString(Left2.Substring(3, 2), "88", false) == 0)
                {
                  this.lcLogWriter.logData("Order " + scOrderImportInfo.FOLineSLSS + " is transferred to Oxford, Ship date;" + Conversions.ToString(scOrderImportInfo.OrderLineShipDt));
                  this.lcBWT2.UpdateAssemLine(scOrderImportInfo.FOLineSLSS, 10);
                  flag = false;
                  goto label_120;
                }
                else
                {
                  if (Operators.CompareString(Left2.Substring(3, 2), "00", false) == 0)
                  {
                    this.lcLogWriter.logData("Order " + scOrderImportInfo.FOLineSLSS + " is Columbia Order, Ship date;" + Conversions.ToString(scOrderImportInfo.OrderLineShipDt));
                    this.lcBWT2.UpdateAssemLine(scOrderImportInfo.FOLineSLSS, scOrderImportInfo.AssemblyLine.LevelId);
                  }
                  else if (Operators.CompareString(Left2.Substring(3, 2), "99", false) == 0)
                  {
                    this.lcLogWriter.logData("Order " + scOrderImportInfo.FOLineSLSS + " is Columbia/El-Paso Order, Ship date;" + Conversions.ToString(scOrderImportInfo.OrderLineShipDt));
                    this.lcBWT2.UpdateAssemLine(scOrderImportInfo.FOLineSLSS, scOrderImportInfo.AssemblyLine.LevelId);
                  }
                  break;
                }
              }
              else
                break;
            case 104:
              try
              {
                if (Left2.Trim().Length == 10)
                  scOrderImportInfo.OrderLineOrgTargetDt = Conversions.ToDate(Left2);
                else
                  scOrderImportInfo.OrderLineOrgTargetDt = Conversions.ToDate("01/01/1901");
                scOrderImportInfo.OrderLineTargetDt = Left2.Trim().Length != 10 ? Conversions.ToDate("01/01/1901") : Conversions.ToDate(Left2);
                break;
              }
              catch (Exception ex)
              {
                ProjectData.SetProjectError(ex);
                scOrderImportInfo.OrderLineOrgTargetDt = Conversions.ToDate("01/01/1901");
                scOrderImportInfo.OrderLineTargetDt = Conversions.ToDate("01/01/1901");
                ProjectData.ClearProjectError();
                break;
              }
            case 105:
              try
              {
                if (scOrderImportInfo.AssemblyLine.LevelAbbrv.Contains("NW221B") | scOrderImportInfo.AssemblyLine.LevelAbbrv.Contains("NW221C"))
                {
                  scOrderImportInfo.OrderLineTargetDt = scOrderImportInfo.OrderLineShipDt;
                  break;
                }
                if (Left2.Trim().Length == 10)
                  scOrderImportInfo.OrderLineCurTargetDt = Conversions.ToDate(Left2);
                else
                  scOrderImportInfo.OrderLineCurTargetDt = Conversions.ToDate("01/01/1901");
                break;
              }
              catch (Exception ex)
              {
                ProjectData.SetProjectError(ex);
                scOrderImportInfo.OrderLineCurTargetDt = Conversions.ToDate("01/01/1901");
                ProjectData.ClearProjectError();
                break;
              }
            case 110:
              scOrderImportInfo.OrderLineSER = Left2;
              break;
          }
          ++num1;
        }
        while ((int) num1 <= 120);
label_120:
        if (flag && scOrderImportInfo.SEPlant.PlantId > 0)
          arrayList2.Add((object) scOrderImportInfo);
      }
      streamReader.Close();
      arrayList1 = arrayList2;
label_125:
      return arrayList1;
    }

    public void AppendSection(scOrderImportInfo BackOrders)
    {
      // ISSUE: object of a compiler-generated type is created
      // ISSUE: variable of a compiler-generated type
      clsBackorders._Closure\u0024__102 closure102 = new clsBackorders._Closure\u0024__102();
      // ISSUE: reference to a compiler-generated field
      closure102.\u0024VB\u0024Local_ldBackOrder = new scOrderImportInfo();
      // ISSUE: reference to a compiler-generated field
      closure102.\u0024VB\u0024Local_ldBackOrder = BackOrders;
      using (SE0085CTEntities1 se0085CtEntities1 = new SE0085CTEntities1())
      {
        se0085CtEntities1.Database.Connection.ConnectionString = this._CTConnection;
        ParameterExpression parameterExpression1;
        // ISSUE: reference to a compiler-generated field
        IQueryable<AssemblyLine> source1 = (IQueryable<AssemblyLine>) Queryable.Select(Queryable.Where((IQueryable<M0>) Queryable.Join((IQueryable<M0>) se0085CtEntities1.SEPlants, (IEnumerable<M1>) se0085CtEntities1.AssemblyLines, (Expression<Func<M0, M2>>) (p => p.SEPlantId), (Expression<Func<M1, M2>>) (a => a.SEPlant.SEPlantId), (Expression<Func<M0, M1, M3>>) ((p, a) => new{ p = p, a = a })), (Expression<Func<M0, bool>>) Expression.Lambda<Func<VB\u0024AnonymousType_5<SEPlant, AssemblyLine>, bool>>((Expression) Expression.Equal(\u0024VB\u0024It.a.AssemLineId, closure102.\u0024VB\u0024Local_ldBackOrder.AssemblyLine.LevelId, true, (MethodInfo) null), new ParameterExpression[1]{ parameterExpression1 })), (Expression<Func<M0, M1>>) (data => data.a));
        if (source1.Count<AssemblyLine>() == 0)
        {
          // ISSUE: reference to a compiler-generated field
          int num1 = (int) Interaction.MsgBox((object) ("Error loading Assembly Line data, aborting MES import for AssemblyLineId; " + Conversions.ToString(closure102.\u0024VB\u0024Local_ldBackOrder.AssemblyLine.LevelId)), MsgBoxStyle.Information, (object) "ONE QMS MES Import Error - E0001");
        }
        else if (source1.Count<AssemblyLine>() == 1)
        {
          AssemblyLine assemblyLine;
          try
          {
            assemblyLine = source1.First<AssemblyLine>();
          }
          catch (Exception ex)
          {
            ProjectData.SetProjectError(ex);
            // ISSUE: reference to a compiler-generated field
            int num2 = (int) Interaction.MsgBox((object) ("Error loading MES Order data, aborting MES import for AssemblyLineId; " + Conversions.ToString(closure102.\u0024VB\u0024Local_ldBackOrder.AssemblyLine.LevelId)), MsgBoxStyle.Information, (object) "ONE QMS MES Import Error - E0001");
            ProjectData.ClearProjectError();
            return;
          }
          // ISSUE: method reference
          // ISSUE: reference to a compiler-generated field
          IQueryable<SEOrder> source2 = (IQueryable<SEOrder>) Queryable.Select<SEOrder, SEOrder>(Queryable.Where<SEOrder>((IQueryable<M0>) se0085CtEntities1.SEOrders, (Expression<Func<M0, bool>>) (o => Expression.Call((Expression) null, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (Operators.CompareString)), o.OrderFO, closure102.\u0024VB\u0024Local_ldBackOrder.OrderFO, false) == 0)), (Expression<Func<M0, M1>>) (o => o));
          SEOrder entity;
          if (source2.Count<SEOrder>() == 0)
          {
            entity = new SEOrder();
            // ISSUE: reference to a compiler-generated field
            entity.OrderFO = closure102.\u0024VB\u0024Local_ldBackOrder.OrderFO;
            // ISSUE: reference to a compiler-generated field
            entity.OrderJobName = closure102.\u0024VB\u0024Local_ldBackOrder.OrderJobName;
            // ISSUE: reference to a compiler-generated field
            entity.OrderPurchaser = closure102.\u0024VB\u0024Local_ldBackOrder.OrderPurchaser;
            se0085CtEntities1.SEOrders.Add(entity);
            se0085CtEntities1.SaveChanges();
          }
          else if (source2.Count<SEOrder>() == 1)
          {
            try
            {
              entity = source2.First<SEOrder>();
              bool flag = false;
              // ISSUE: reference to a compiler-generated field
              // ISSUE: reference to a compiler-generated field
              if (!(Operators.CompareString(entity.OrderJobName, closure102.\u0024VB\u0024Local_ldBackOrder.OrderJobName, false) == 0 & Operators.CompareString(entity.OrderPurchaser, closure102.\u0024VB\u0024Local_ldBackOrder.OrderPurchaser, false) == 0))
              {
                // ISSUE: reference to a compiler-generated field
                if (closure102.\u0024VB\u0024Local_ldBackOrder.OrderJobName.Length > 1)
                {
                  // ISSUE: reference to a compiler-generated field
                  entity.OrderJobName = closure102.\u0024VB\u0024Local_ldBackOrder.OrderJobName;
                  flag = true;
                }
                // ISSUE: reference to a compiler-generated field
                if (closure102.\u0024VB\u0024Local_ldBackOrder.OrderPurchaser.Length > 1)
                {
                  // ISSUE: reference to a compiler-generated field
                  entity.OrderPurchaser = closure102.\u0024VB\u0024Local_ldBackOrder.OrderPurchaser;
                  flag = true;
                }
                if (flag)
                  se0085CtEntities1.SaveChanges();
              }
            }
            catch (Exception ex)
            {
              ProjectData.SetProjectError(ex);
              // ISSUE: reference to a compiler-generated field
              int num2 = (int) Interaction.MsgBox((object) ("Error loading MES Order data, aborting MES import for Order; " + closure102.\u0024VB\u0024Local_ldBackOrder.OrderFO), MsgBoxStyle.Information, (object) "ONE QMS MES Import Error - E0001");
              ProjectData.ClearProjectError();
              return;
            }
          }
          else
          {
            // ISSUE: reference to a compiler-generated field
            int num2 = (int) Interaction.MsgBox((object) ("Multiple Order numbers found, aborting MES import for Order; " + closure102.\u0024VB\u0024Local_ldBackOrder.OrderFO), MsgBoxStyle.Information, (object) "ONE QMS MES Import Error - E0001");
            return;
          }
          // ISSUE: method reference
          // ISSUE: reference to a compiler-generated field
          // ISSUE: method reference
          // ISSUE: reference to a compiler-generated field
          // ISSUE: method reference
          // ISSUE: reference to a compiler-generated field
          // ISSUE: method reference
          // ISSUE: reference to a compiler-generated field
          IQueryable<OrderLine> source3 = (IQueryable<OrderLine>) Queryable.Select(Queryable.Where((IQueryable<M0>) Queryable.Join((IQueryable<M0>) se0085CtEntities1.SEOrders, (IEnumerable<M1>) se0085CtEntities1.OrderLines, (Expression<Func<M0, M2>>) (o => o.OrderId), (Expression<Func<M1, M2>>) (l => l.SEOrder.OrderId), (Expression<Func<M0, M1, M3>>) ((o, l) => new{ o = o, l = l })), (Expression<Func<M0, bool>>) (data => Expression.Call((Expression) null, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (Operators.CompareString)), data.o.OrderFO, closure102.\u0024VB\u0024Local_ldBackOrder.OrderFO, false) == 0 & Expression.Call((Expression) null, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (Operators.CompareString)), data.l.OrderLineNum, closure102.\u0024VB\u0024Local_ldBackOrder.OrderLineNum, false) == 0 & Expression.Call((Expression) null, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (Operators.CompareString)), data.l.OrderLineSL, closure102.\u0024VB\u0024Local_ldBackOrder.OrderLineSL, false) == 0 & Expression.Call((Expression) null, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (Operators.CompareString)), data.l.OrderLineSS, closure102.\u0024VB\u0024Local_ldBackOrder.OrderLineSS, false) == 0)), (Expression<Func<M0, M1>>) (data => data.l));
          if (source3.Count<OrderLine>() == 0)
          {
            OrderLine orderLine = new OrderLine();
            // ISSUE: reference to a compiler-generated field
            orderLine.OrderLineNum = closure102.\u0024VB\u0024Local_ldBackOrder.OrderLineNum;
            // ISSUE: reference to a compiler-generated field
            orderLine.OrderLineQty = (int?) closure102.\u0024VB\u0024Local_ldBackOrder.OrderLineQty;
            // ISSUE: reference to a compiler-generated field
            orderLine.OrderLineShipDt = (DateTime?) closure102.\u0024VB\u0024Local_ldBackOrder.OrderLineShipDt;
            // ISSUE: reference to a compiler-generated field
            orderLine.OrderLineShipped = (bool?) closure102.\u0024VB\u0024Local_ldBackOrder.OrderLineShipped;
            // ISSUE: reference to a compiler-generated field
            orderLine.OrderLineShippedDt = (DateTime?) closure102.\u0024VB\u0024Local_ldBackOrder.OrderLineShippedDt;
            // ISSUE: reference to a compiler-generated field
            orderLine.OrderLineSL = closure102.\u0024VB\u0024Local_ldBackOrder.OrderLineSL;
            // ISSUE: reference to a compiler-generated field
            orderLine.OrderLineSS = closure102.\u0024VB\u0024Local_ldBackOrder.OrderLineSS;
            // ISSUE: reference to a compiler-generated field
            orderLine.OrderLineTargetDt = (DateTime?) closure102.\u0024VB\u0024Local_ldBackOrder.OrderLineTargetDt;
            // ISSUE: reference to a compiler-generated field
            orderLine.OrderLineAssyStartDt = (DateTime?) closure102.\u0024VB\u0024Local_ldBackOrder.OrderLineOrgAssyStDt;
            entity.OrderLines.Add(orderLine);
            assemblyLine.OrderLines.Add(orderLine);
            int num2 = 1;
            // ISSUE: reference to a compiler-generated field
            int ordSectsCnt = closure102.\u0024VB\u0024Local_ldBackOrder.OrdSectsCnt;
            int num3 = num2;
            while (num3 <= ordSectsCnt)
            {
              orderLine.OrdSections.Add(new OrdSection()
              {
                OrdSectsNum = num3
              });
              checked { ++num3; }
            }
            se0085CtEntities1.SaveChanges();
          }
          else if (source3.Count<OrderLine>() == 1)
          {
            try
            {
              OrderLine orderLine = source3.First<OrderLine>();
              ParameterExpression parameterExpression2;
              // ISSUE: method reference
              // ISSUE: reference to a compiler-generated field
              // ISSUE: method reference
              // ISSUE: reference to a compiler-generated field
              // ISSUE: method reference
              // ISSUE: reference to a compiler-generated field
              // ISSUE: method reference
              // ISSUE: reference to a compiler-generated field
              // ISSUE: reference to a compiler-generated field
              if (((IQueryable<OrdSection>) Queryable.Select(Queryable.Where((IQueryable<M0>) Queryable.Join((IQueryable<M0>) Queryable.Join((IQueryable<M0>) se0085CtEntities1.SEOrders, (IEnumerable<M1>) se0085CtEntities1.OrderLines, (Expression<Func<M0, M2>>) (o => o.OrderId), (Expression<Func<M1, M2>>) (l => l.SEOrder.OrderId), (Expression<Func<M0, M1, M3>>) ((o, l) => new{ o = o, l = l })), (IEnumerable<M1>) se0085CtEntities1.OrdSections, (Expression<Func<M0, M2>>) (data => data.l.OrderLineId), (Expression<Func<M1, M2>>) (s => s.OrderLine.OrderLineId), (Expression<Func<M0, M1, M3>>) ((data, s) => new{ o = data.o, l = data.l, s = s })), (Expression<Func<M0, bool>>) Expression.Lambda<Func<VB\u0024AnonymousType_45<SEOrder, OrderLine, OrdSection>, bool>>((Expression) Expression.And(Expression.Call((Expression) null, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (Operators.CompareString)), \u0024VB\u0024It.o.OrderFO, closure102.\u0024VB\u0024Local_ldBackOrder.OrderFO, false) == 0 & Expression.Call((Expression) null, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (Operators.CompareString)), \u0024VB\u0024It.l.OrderLineNum, closure102.\u0024VB\u0024Local_ldBackOrder.OrderLineNum, false) == 0 & Expression.Call((Expression) null, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (Operators.CompareString)), \u0024VB\u0024It.l.OrderLineSL, closure102.\u0024VB\u0024Local_ldBackOrder.OrderLineSL, false) == 0 & Expression.Call((Expression) null, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (Operators.CompareString)), \u0024VB\u0024It.l.OrderLineSS, closure102.\u0024VB\u0024Local_ldBackOrder.OrderLineSS, false) == 0, (Expression) Expression.Equal(\u0024VB\u0024It.s.OrdSectsNum, closure102.\u0024VB\u0024Local_ldBackOrder.OrdSectsNum, true, (MethodInfo) null)), new ParameterExpression[1]{ parameterExpression2 })), (Expression<Func<M0, M1>>) (data => data.s))).Count<OrdSection>() == 0)
              {
                // ISSUE: reference to a compiler-generated field
                orderLine.OrdSections.Add(new OrdSection()
                {
                  OrdSectsNum = closure102.\u0024VB\u0024Local_ldBackOrder.OrdSectsNum,
                  OrdSectShipSpt = (int?) 0,
                  OrdSectsRelMfg = (DateTime?) Conversions.ToDate("01/01/1901"),
                  OrdSectsRelSchDt = (DateTime?) Conversions.ToDate("01/01/1901"),
                  OrdSectsRelActDt = (DateTime?) Conversions.ToDate("01/01/1901"),
                  OrdSectsFabSchDt = (DateTime?) Conversions.ToDate("01/01/1901"),
                  OrdSectsFabActDt = (DateTime?) Conversions.ToDate("01/01/1901")
                });
                se0085CtEntities1.SaveChanges();
              }
            }
            catch (Exception ex)
            {
              ProjectData.SetProjectError(ex);
              // ISSUE: reference to a compiler-generated field
              int num2 = (int) Interaction.MsgBox((object) ("Error importing data, aborting MES import for Order; " + closure102.\u0024VB\u0024Local_ldBackOrder.OrderFO), MsgBoxStyle.Information, (object) "ONE QMS MES Import Error - E0001");
              ProjectData.ClearProjectError();
              return;
            }
          }
          else
          {
            // ISSUE: reference to a compiler-generated field
            int num2 = (int) Interaction.MsgBox((object) ("Multiple Order numbers found, aborting MES import for Order; " + closure102.\u0024VB\u0024Local_ldBackOrder.OrderFO), MsgBoxStyle.Information, (object) "ONE QMS MES Import Error - E0001");
            return;
          }
          se0085CtEntities1.Database.Connection.Close();
        }
        else
        {
          // ISSUE: reference to a compiler-generated field
          int num4 = (int) Interaction.MsgBox((object) ("Multiple AssemblyLine Ids found, aborting MES import for AssemblyLineId; " + Conversions.ToString(closure102.\u0024VB\u0024Local_ldBackOrder.AssemblyLine.LevelId)), MsgBoxStyle.Information, (object) "ONE QMS MES Import Error - E0001");
        }
      }
    }

    public string UpdateSection(scOrderImportInfo BackOrders, bool UpdSectData = true)
    {
      // ISSUE: object of a compiler-generated type is created
      // ISSUE: variable of a compiler-generated type
      clsBackorders._Closure\u0024__103 closure103 = new clsBackorders._Closure\u0024__103();
      string str1 = "Results:  ";
      // ISSUE: reference to a compiler-generated field
      closure103.\u0024VB\u0024Local_ldBackOrder = new scOrderImportInfo();
      // ISSUE: reference to a compiler-generated field
      closure103.\u0024VB\u0024Local_ldBackOrder = BackOrders;
      string str2;
      using (SE0085CTEntities1 se0085CtEntities1 = new SE0085CTEntities1())
      {
        se0085CtEntities1.Database.Connection.ConnectionString = this._CTConnection;
        ParameterExpression parameterExpression1;
        // ISSUE: reference to a compiler-generated field
        IQueryable<AssemblyLine> source1 = (IQueryable<AssemblyLine>) Queryable.Select(Queryable.Where((IQueryable<M0>) Queryable.Join((IQueryable<M0>) se0085CtEntities1.SEPlants, (IEnumerable<M1>) se0085CtEntities1.AssemblyLines, (Expression<Func<M0, M2>>) (p => p.SEPlantId), (Expression<Func<M1, M2>>) (a => a.SEPlant.SEPlantId), (Expression<Func<M0, M1, M3>>) ((p, a) => new{ p = p, a = a })), (Expression<Func<M0, bool>>) Expression.Lambda<Func<VB\u0024AnonymousType_5<SEPlant, AssemblyLine>, bool>>((Expression) Expression.Equal(\u0024VB\u0024It.a.AssemLineId, closure103.\u0024VB\u0024Local_ldBackOrder.AssemblyLine.LevelId, true, (MethodInfo) null), new ParameterExpression[1]{ parameterExpression1 })), (Expression<Func<M0, M1>>) (data => data.a));
        if (source1.Count<AssemblyLine>() == 0)
        {
          // ISSUE: reference to a compiler-generated field
          int num = (int) Interaction.MsgBox((object) ("Error loading Assembly Line data, aborting MES import for AssemblyLineId; " + Conversions.ToString(closure103.\u0024VB\u0024Local_ldBackOrder.AssemblyLine.LevelId)), MsgBoxStyle.Information, (object) "ONE QMS MES Import Error - E0001");
          // ISSUE: reference to a compiler-generated field
          str1 = str1 + "Error loading Assembly Line data, aborting MES import for AssemblyLineId; " + Conversions.ToString(closure103.\u0024VB\u0024Local_ldBackOrder.AssemblyLine.LevelId) + "\r\n";
          str2 = str1;
          goto label_43;
        }
        else if (source1.Count<AssemblyLine>() == 1)
        {
          AssemblyLine assemblyLine;
          try
          {
            assemblyLine = source1.First<AssemblyLine>();
          }
          catch (Exception ex)
          {
            ProjectData.SetProjectError(ex);
            // ISSUE: reference to a compiler-generated field
            str1 = str1 + "Error loading MES Order data, aborting MES import for AssemblyLineId; " + Conversions.ToString(closure103.\u0024VB\u0024Local_ldBackOrder.AssemblyLine.LevelId) + "\r\n";
            str2 = str1;
            ProjectData.ClearProjectError();
            goto label_43;
          }
          ParameterExpression parameterExpression2;
          // ISSUE: reference to a compiler-generated field
          IQueryable<SEOrder> source2 = (IQueryable<SEOrder>) Queryable.Select<SEOrder, SEOrder>(Queryable.Where<SEOrder>((IQueryable<M0>) se0085CtEntities1.SEOrders, (Expression<Func<M0, bool>>) Expression.Lambda<Func<SEOrder, bool>>((Expression) Expression.Equal(o.OrderId, closure103.\u0024VB\u0024Local_ldBackOrder.OrderId, true, (MethodInfo) null), new ParameterExpression[1]{ parameterExpression2 })), (Expression<Func<M0, M1>>) (o => o));
          SEOrder entity;
          if (source2.Count<SEOrder>() == 0)
          {
            entity = new SEOrder();
            // ISSUE: reference to a compiler-generated field
            entity.OrderFO = closure103.\u0024VB\u0024Local_ldBackOrder.OrderFO;
            // ISSUE: reference to a compiler-generated field
            entity.OrderJobName = closure103.\u0024VB\u0024Local_ldBackOrder.OrderJobName;
            // ISSUE: reference to a compiler-generated field
            entity.OrderPurchaser = closure103.\u0024VB\u0024Local_ldBackOrder.OrderPurchaser;
            se0085CtEntities1.SEOrders.Add(entity);
            int num = se0085CtEntities1.SaveChanges();
            str1 = str1 + Conversions.ToString(num) + " Order Data Records Added\r\n";
          }
          else if (source2.Count<SEOrder>() == 1)
          {
            try
            {
              entity = source2.First<SEOrder>();
              bool flag = false;
              // ISSUE: reference to a compiler-generated field
              // ISSUE: reference to a compiler-generated field
              if (!(Operators.CompareString(entity.OrderJobName, closure103.\u0024VB\u0024Local_ldBackOrder.OrderJobName, false) == 0 & Operators.CompareString(entity.OrderPurchaser, closure103.\u0024VB\u0024Local_ldBackOrder.OrderPurchaser, false) == 0))
              {
                // ISSUE: reference to a compiler-generated field
                if (closure103.\u0024VB\u0024Local_ldBackOrder.OrderJobName.Length > 1)
                {
                  // ISSUE: reference to a compiler-generated field
                  entity.OrderJobName = closure103.\u0024VB\u0024Local_ldBackOrder.OrderJobName;
                  flag = true;
                }
                // ISSUE: reference to a compiler-generated field
                if (closure103.\u0024VB\u0024Local_ldBackOrder.OrderPurchaser.Length > 1)
                {
                  // ISSUE: reference to a compiler-generated field
                  entity.OrderPurchaser = closure103.\u0024VB\u0024Local_ldBackOrder.OrderPurchaser;
                  flag = true;
                }
                if (flag)
                {
                  int num = se0085CtEntities1.SaveChanges();
                  str1 = str1 + Conversions.ToString(num) + " Order Data Records Updated\r\n";
                }
              }
            }
            catch (Exception ex)
            {
              ProjectData.SetProjectError(ex);
              // ISSUE: reference to a compiler-generated field
              str1 = str1 + "Error loading MES Order data, aborting MES import for Order; " + closure103.\u0024VB\u0024Local_ldBackOrder.OrderFO + "\r\n";
              str2 = str1;
              ProjectData.ClearProjectError();
              goto label_43;
            }
          }
          else
          {
            // ISSUE: reference to a compiler-generated field
            str1 = str1 + "Multiple Order numbers found, aborting MES import for Order; " + closure103.\u0024VB\u0024Local_ldBackOrder.OrderFO + "\r\n";
            str2 = str1;
            goto label_43;
          }
          ParameterExpression parameterExpression3;
          // ISSUE: reference to a compiler-generated field
          // ISSUE: method reference
          // ISSUE: type reference
          // ISSUE: method reference
          // ISSUE: field reference
          // ISSUE: method reference
          IQueryable<OrderLine> source3 = (IQueryable<OrderLine>) Queryable.Select(Queryable.Where((IQueryable<M0>) Queryable.Join((IQueryable<M0>) se0085CtEntities1.SEOrders, (IEnumerable<M1>) se0085CtEntities1.OrderLines, (Expression<Func<M0, M2>>) (o => o.OrderId), (Expression<Func<M1, M2>>) (l => l.SEOrder.OrderId), (Expression<Func<M0, M1, M3>>) ((o, l) => new{ o = o, l = l })), (Expression<Func<M0, bool>>) Expression.Lambda<Func<VB\u0024AnonymousType_41<SEOrder, OrderLine>, bool>>((Expression) Expression.And((Expression) Expression.Equal(\u0024VB\u0024It.o.OrderId, closure103.\u0024VB\u0024Local_ldBackOrder.OrderId, true, (MethodInfo) null), (Expression) Expression.Equal((Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression3, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_41<SEOrder, OrderLine>.get_l), __typeref (VB\u0024AnonymousType_41<SEOrder, OrderLine>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (OrderLine.get_OrderLineId))), (Expression) Expression.Property((Expression) Expression.Field((Expression) Expression.Constant((object) closure103, typeof (clsBackorders._Closure\u0024__103)), FieldInfo.GetFieldFromHandle(__fieldref (clsBackorders._Closure\u0024__103.\u0024VB\u0024Local_ldBackOrder))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scOrderLinesExt.get_OrderLineId))), true, (MethodInfo) null)), new ParameterExpression[1]{ parameterExpression3 })), (Expression<Func<M0, M1>>) (data => data.l));
          if (source3.Count<OrderLine>() == 0)
          {
            OrderLine orderLine = new OrderLine();
            // ISSUE: reference to a compiler-generated field
            orderLine.OrderLineNum = closure103.\u0024VB\u0024Local_ldBackOrder.OrderLineNum;
            // ISSUE: reference to a compiler-generated field
            orderLine.OrderLineQty = (int?) closure103.\u0024VB\u0024Local_ldBackOrder.OrderLineQty;
            // ISSUE: reference to a compiler-generated field
            orderLine.OrderLineShipDt = (DateTime?) closure103.\u0024VB\u0024Local_ldBackOrder.OrderLineShipDt;
            // ISSUE: reference to a compiler-generated field
            orderLine.OrderLineShipped = (bool?) closure103.\u0024VB\u0024Local_ldBackOrder.OrderLineShipped;
            // ISSUE: reference to a compiler-generated field
            orderLine.OrderLineShippedDt = (DateTime?) closure103.\u0024VB\u0024Local_ldBackOrder.OrderLineShippedDt;
            // ISSUE: reference to a compiler-generated field
            orderLine.OrderLineSL = closure103.\u0024VB\u0024Local_ldBackOrder.OrderLineSL;
            // ISSUE: reference to a compiler-generated field
            orderLine.OrderLineSS = closure103.\u0024VB\u0024Local_ldBackOrder.OrderLineSS;
            // ISSUE: reference to a compiler-generated field
            orderLine.OrderLineTargetDt = (DateTime?) closure103.\u0024VB\u0024Local_ldBackOrder.OrderLineTargetDt;
            // ISSUE: reference to a compiler-generated field
            orderLine.OrderLineAssyStartDt = (DateTime?) closure103.\u0024VB\u0024Local_ldBackOrder.OrderLineOrgAssyStDt;
            entity.OrderLines.Add(orderLine);
            assemblyLine.OrderLines.Add(orderLine);
            int num1 = 1;
            // ISSUE: reference to a compiler-generated field
            int ordSectsCnt = closure103.\u0024VB\u0024Local_ldBackOrder.OrdSectsCnt;
            int num2 = num1;
            while (num2 <= ordSectsCnt)
            {
              orderLine.OrdSections.Add(new OrdSection()
              {
                OrdSectsNum = num2
              });
              checked { ++num2; }
            }
            int num3 = se0085CtEntities1.SaveChanges();
            str1 = str1 + Conversions.ToString(num3) + " Order Line/Section Records Added\r\n";
            str2 = str1;
            goto label_43;
          }
          else if (source3.Count<OrderLine>() == 1)
          {
            OrderLine orderLine1 = source3.First<OrderLine>();
            // ISSUE: reference to a compiler-generated field
            int orderLineQty1 = closure103.\u0024VB\u0024Local_ldBackOrder.OrderLineQty;
            int? orderLineQty2 = orderLine1.OrderLineQty;
            bool? nullable1 = orderLineQty2.HasValue ? new bool?(orderLineQty2.GetValueOrDefault() == orderLineQty1) : new bool?();
            // ISSUE: reference to a compiler-generated field
            bool? nullable2 = Operators.CompareString(orderLine1.OrderLineNum, closure103.\u0024VB\u0024Local_ldBackOrder.OrderLineNum, false) == 0 ? nullable1 : new bool?(false);
            // ISSUE: reference to a compiler-generated field
            DateTime orderLineShipDt1 = closure103.\u0024VB\u0024Local_ldBackOrder.OrderLineShipDt;
            DateTime? orderLineShipDt2 = orderLine1.OrderLineShipDt;
            bool? nullable3 = orderLineShipDt2.HasValue ? new bool?(DateTime.Compare(orderLineShipDt2.GetValueOrDefault(), orderLineShipDt1) == 0) : new bool?();
            bool? nullable4 = !nullable2.HasValue || nullable2.GetValueOrDefault() ? (nullable3.HasValue ? (nullable3.GetValueOrDefault() ? nullable2 : new bool?(false)) : new bool?()) : new bool?(false);
            // ISSUE: reference to a compiler-generated field
            bool orderLineShipped1 = closure103.\u0024VB\u0024Local_ldBackOrder.OrderLineShipped;
            bool? orderLineShipped2 = orderLine1.OrderLineShipped;
            bool? nullable5 = orderLineShipped2.HasValue ? new bool?(orderLineShipped2.GetValueOrDefault() == orderLineShipped1) : new bool?();
            bool? nullable6 = !nullable4.HasValue || nullable4.GetValueOrDefault() ? (nullable5.HasValue ? (nullable5.GetValueOrDefault() ? nullable4 : new bool?(false)) : new bool?()) : new bool?(false);
            // ISSUE: reference to a compiler-generated field
            DateTime orderLineShippedDt1 = closure103.\u0024VB\u0024Local_ldBackOrder.OrderLineShippedDt;
            DateTime? orderLineShippedDt2 = orderLine1.OrderLineShippedDt;
            bool? nullable7 = orderLineShippedDt2.HasValue ? new bool?(DateTime.Compare(orderLineShippedDt2.GetValueOrDefault(), orderLineShippedDt1) == 0) : new bool?();
            bool? nullable8 = !nullable6.HasValue || nullable6.GetValueOrDefault() ? (nullable7.HasValue ? (nullable7.GetValueOrDefault() ? nullable6 : new bool?(false)) : new bool?()) : new bool?(false);
            // ISSUE: reference to a compiler-generated field
            bool? nullable9 = Operators.CompareString(orderLine1.OrderLineSL, closure103.\u0024VB\u0024Local_ldBackOrder.OrderLineSL, false) == 0 ? nullable8 : new bool?(false);
            // ISSUE: reference to a compiler-generated field
            bool? nullable10 = Operators.CompareString(orderLine1.OrderLineSS, closure103.\u0024VB\u0024Local_ldBackOrder.OrderLineSS, false) == 0 ? nullable9 : new bool?(false);
            // ISSUE: reference to a compiler-generated field
            DateTime orderLineTargetDt1 = closure103.\u0024VB\u0024Local_ldBackOrder.OrderLineTargetDt;
            DateTime? orderLineTargetDt2 = orderLine1.OrderLineTargetDt;
            bool? nullable11 = orderLineTargetDt2.HasValue ? new bool?(DateTime.Compare(orderLineTargetDt2.GetValueOrDefault(), orderLineTargetDt1) == 0) : new bool?();
            bool? nullable12 = !nullable10.HasValue || nullable10.GetValueOrDefault() ? (nullable11.HasValue ? (nullable11.GetValueOrDefault() ? nullable10 : new bool?(false)) : new bool?()) : new bool?(false);
            if ((nullable12.HasValue ? new bool?(!nullable12.GetValueOrDefault()) : new bool?()).GetValueOrDefault())
            {
              // ISSUE: reference to a compiler-generated field
              orderLine1.OrderLineNum = closure103.\u0024VB\u0024Local_ldBackOrder.OrderLineNum;
              // ISSUE: reference to a compiler-generated field
              orderLine1.OrderLineQty = (int?) closure103.\u0024VB\u0024Local_ldBackOrder.OrderLineQty;
              // ISSUE: reference to a compiler-generated field
              orderLine1.OrderLineShipDt = (DateTime?) closure103.\u0024VB\u0024Local_ldBackOrder.OrderLineShipDt;
              // ISSUE: reference to a compiler-generated field
              orderLine1.OrderLineShipped = (bool?) closure103.\u0024VB\u0024Local_ldBackOrder.OrderLineShipped;
              // ISSUE: reference to a compiler-generated field
              orderLine1.OrderLineShippedDt = (DateTime?) closure103.\u0024VB\u0024Local_ldBackOrder.OrderLineShippedDt;
              // ISSUE: reference to a compiler-generated field
              orderLine1.OrderLineSL = closure103.\u0024VB\u0024Local_ldBackOrder.OrderLineSL;
              // ISSUE: reference to a compiler-generated field
              orderLine1.OrderLineSS = closure103.\u0024VB\u0024Local_ldBackOrder.OrderLineSS;
              // ISSUE: reference to a compiler-generated field
              orderLine1.OrderLineTargetDt = (DateTime?) closure103.\u0024VB\u0024Local_ldBackOrder.OrderLineTargetDt;
              int num = se0085CtEntities1.SaveChanges();
              str1 = str1 + Conversions.ToString(num) + " Orderline Data Records Updated\r\n";
            }
            if (UpdSectData)
            {
              try
              {
                OrderLine orderLine2 = source3.First<OrderLine>();
                ParameterExpression parameterExpression4;
                // 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: type reference
                // ISSUE: method reference
                // ISSUE: field reference
                // ISSUE: method reference
                IQueryable<OrdSection> source4 = (IQueryable<OrdSection>) Queryable.Select(Queryable.Where((IQueryable<M0>) Queryable.Join((IQueryable<M0>) Queryable.Join((IQueryable<M0>) se0085CtEntities1.SEOrders, (IEnumerable<M1>) se0085CtEntities1.OrderLines, (Expression<Func<M0, M2>>) (o => o.OrderId), (Expression<Func<M1, M2>>) (l => l.SEOrder.OrderId), (Expression<Func<M0, M1, M3>>) ((o, l) => new{ o = o, l = l })), (IEnumerable<M1>) se0085CtEntities1.OrdSections, (Expression<Func<M0, M2>>) (data => data.l.OrderLineId), (Expression<Func<M1, M2>>) (s => s.OrderLine.OrderLineId), (Expression<Func<M0, M1, M3>>) ((data, s) => new{ o = data.o, l = data.l, s = s })), (Expression<Func<M0, bool>>) Expression.Lambda<Func<VB\u0024AnonymousType_45<SEOrder, OrderLine, OrdSection>, bool>>((Expression) Expression.And((Expression) Expression.And((Expression) Expression.Equal(\u0024VB\u0024It.o.OrderId, closure103.\u0024VB\u0024Local_ldBackOrder.OrderId, true, (MethodInfo) null), (Expression) Expression.Equal((Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression4, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_45<SEOrder, OrderLine, OrdSection>.get_l), __typeref (VB\u0024AnonymousType_45<SEOrder, OrderLine, OrdSection>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (OrderLine.get_OrderLineId))), (Expression) Expression.Property((Expression) Expression.Field((Expression) Expression.Constant((object) closure103, typeof (clsBackorders._Closure\u0024__103)), FieldInfo.GetFieldFromHandle(__fieldref (clsBackorders._Closure\u0024__103.\u0024VB\u0024Local_ldBackOrder))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scOrderLinesExt.get_OrderLineId))), true, (MethodInfo) null)), (Expression) Expression.Equal((Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression4, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_45<SEOrder, OrderLine, OrdSection>.get_s), __typeref (VB\u0024AnonymousType_45<SEOrder, OrderLine, OrdSection>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (OrdSection.get_OrdSectsId))), (Expression) Expression.Property((Expression) Expression.Field((Expression) Expression.Constant((object) closure103, typeof (clsBackorders._Closure\u0024__103)), FieldInfo.GetFieldFromHandle(__fieldref (clsBackorders._Closure\u0024__103.\u0024VB\u0024Local_ldBackOrder))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scOrderImportInfo.get_OrdSectsId))), true, (MethodInfo) null)), new ParameterExpression[1]{ parameterExpression4 })), (Expression<Func<M0, M1>>) (data => data.s));
                if (source4.Count<OrdSection>() == 0)
                {
                  // ISSUE: reference to a compiler-generated field
                  orderLine2.OrdSections.Add(new OrdSection()
                  {
                    OrdSectsNum = closure103.\u0024VB\u0024Local_ldBackOrder.OrdSectsNum,
                    OrdSectShipSpt = (int?) 0,
                    OrdSectsRelMfg = (DateTime?) Conversions.ToDate("01/01/1901"),
                    OrdSectsRelSchDt = (DateTime?) Conversions.ToDate("01/01/1901"),
                    OrdSectsRelActDt = (DateTime?) Conversions.ToDate("01/01/1901"),
                    OrdSectsFabSchDt = (DateTime?) Conversions.ToDate("01/01/1901"),
                    OrdSectsFabActDt = (DateTime?) Conversions.ToDate("01/01/1901")
                  });
                  int num = se0085CtEntities1.SaveChanges();
                  str1 = str1 + Conversions.ToString(num) + " Order Data Records Added\r\n";
                }
                else if (source4.Count<OrdSection>() == 1)
                {
                  OrdSection ordSection = source4.First<OrdSection>();
                  // ISSUE: reference to a compiler-generated field
                  if (ordSection.OrdSectsNum != closure103.\u0024VB\u0024Local_ldBackOrder.OrdSectsNum)
                  {
                    // ISSUE: reference to a compiler-generated field
                    ordSection.OrdSectsNum = closure103.\u0024VB\u0024Local_ldBackOrder.OrdSectsNum;
                    int num = se0085CtEntities1.SaveChanges();
                    str1 = str1 + Conversions.ToString(num) + " Order section Data Records Updated\r\n";
                  }
                }
              }
              catch (Exception ex)
              {
                ProjectData.SetProjectError(ex);
                // ISSUE: reference to a compiler-generated field
                str1 = str1 + "Error importing data, aborting MES import for Order; " + closure103.\u0024VB\u0024Local_ldBackOrder.OrderFO + "\r\n";
                str2 = str1;
                ProjectData.ClearProjectError();
                goto label_43;
              }
            }
            se0085CtEntities1.Database.Connection.Close();
          }
          else
          {
            // ISSUE: reference to a compiler-generated field
            str1 = str1 + "Multiple Order numbers found, aborting MES import for Order; " + closure103.\u0024VB\u0024Local_ldBackOrder.OrderFO + "\r\n";
            str2 = str1;
            goto label_43;
          }
        }
        else
        {
          // ISSUE: reference to a compiler-generated field
          str1 = str1 + "Multiple AssemblyLine Ids found, aborting MES import for AssemblyLineId; " + Conversions.ToString(closure103.\u0024VB\u0024Local_ldBackOrder.AssemblyLine.LevelId) + "\r\n";
          str2 = str1;
          goto label_43;
        }
      }
      str2 = str1;
label_43:
      return str2;
    }

    public scOrderImportInfo LoadSection(scOrderImportInfo BackOrders)
    {
      // ISSUE: object of a compiler-generated type is created
      // ISSUE: variable of a compiler-generated type
      clsBackorders._Closure\u0024__104 closure104 = new clsBackorders._Closure\u0024__104();
      // ISSUE: reference to a compiler-generated field
      closure104.\u0024VB\u0024Local_ldRtnData = new scOrderImportInfo();
      // ISSUE: reference to a compiler-generated field
      closure104.\u0024VB\u0024Local_ldBackOrder = new scOrderImportInfo();
      // ISSUE: reference to a compiler-generated field
      closure104.\u0024VB\u0024Local_ldBackOrder = BackOrders;
      using (SE0085CTEntities1 se0085CtEntities1 = new SE0085CTEntities1())
      {
        se0085CtEntities1.Database.Connection.ConnectionString = this._CTConnection;
        ParameterExpression parameterExpression1;
        // ISSUE: method reference
        // ISSUE: reference to a compiler-generated field
        // ISSUE: method reference
        // ISSUE: reference to a compiler-generated field
        // ISSUE: method reference
        // ISSUE: reference to a compiler-generated field
        // ISSUE: method reference
        // ISSUE: reference to a compiler-generated field
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: type reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: type reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: type reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: type reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: type reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: type reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: type reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: type reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: type reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: type reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: type reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: type reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: type reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: method reference
        // ISSUE: type reference
        IQueryable<scOrderImportInfo> source1 = (IQueryable<scOrderImportInfo>) Queryable.Select(Queryable.Where((IQueryable<M0>) Queryable.GroupJoin((IQueryable<M0>) Queryable.Join((IQueryable<M0>) se0085CtEntities1.SEOrders, (IEnumerable<M1>) se0085CtEntities1.OrderLines, (Expression<Func<M0, M2>>) (o => o.OrderId), (Expression<Func<M1, M2>>) (l => l.SEOrder.OrderId), (Expression<Func<M0, M1, M3>>) ((o, l) => new{ o = o, l = l })), (IEnumerable<M1>) se0085CtEntities1.OrdSections, (Expression<Func<M0, M2>>) (data => data.l.OrderLineId), (Expression<Func<M1, M2>>) (s => s.OrderLine.OrderLineId), (Expression<Func<M0, IEnumerable<M1>, M3>>) ((data, ordSections) => new{ o = data.o, l = data.l, st = ordSections })), (Expression<Func<M0, bool>>) (data => Expression.Call((Expression) null, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (Operators.CompareString)), data.o.OrderFO, closure104.\u0024VB\u0024Local_ldBackOrder.OrderFO, false) == 0 & Expression.Call((Expression) null, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (Operators.CompareString)), data.l.OrderLineNum, closure104.\u0024VB\u0024Local_ldBackOrder.OrderLineNum, false) == 0 & Expression.Call((Expression) null, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (Operators.CompareString)), data.l.OrderLineSL, closure104.\u0024VB\u0024Local_ldBackOrder.OrderLineSL, false) == 0 & Expression.Call((Expression) null, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (Operators.CompareString)), data.l.OrderLineSS, closure104.\u0024VB\u0024Local_ldBackOrder.OrderLineSS, false) == 0)), (Expression<Func<M0, M1>>) Expression.Lambda<Func<VB\u0024AnonymousType_47<SEOrder, OrderLine, IEnumerable<OrdSection>>, scOrderImportInfo>>((Expression) Expression.MemberInit(Expression.New((ConstructorInfo) MethodBase.GetMethodFromHandle(__methodref (scOrderImportInfo.\u002Ector)), (Expression[]) null), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scOrderImportInfo.set_OrderId)), (Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression1, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_47<SEOrder, OrderLine, IEnumerable<OrdSection>>.get_o), __typeref (VB\u0024AnonymousType_47<SEOrder, OrderLine, IEnumerable<OrdSection>>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (SEOrder.get_OrderId)))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scOrderImportInfo.set_OrderFO)), (Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression1, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_47<SEOrder, OrderLine, IEnumerable<OrdSection>>.get_o), __typeref (VB\u0024AnonymousType_47<SEOrder, OrderLine, IEnumerable<OrdSection>>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (SEOrder.get_OrderFO)))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scOrderImportInfo.set_OrderJobName)), (Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression1, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_47<SEOrder, OrderLine, IEnumerable<OrdSection>>.get_o), __typeref (VB\u0024AnonymousType_47<SEOrder, OrderLine, IEnumerable<OrdSection>>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (SEOrder.get_OrderJobName)))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scOrderImportInfo.set_OrderPurchaser)), (Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression1, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_47<SEOrder, OrderLine, IEnumerable<OrdSection>>.get_o), __typeref (VB\u0024AnonymousType_47<SEOrder, OrderLine, IEnumerable<OrdSection>>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (SEOrder.get_OrderPurchaser)))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scOrderLinesExt.set_OrderLineId)), (Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression1, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_47<SEOrder, OrderLine, IEnumerable<OrdSection>>.get_l), __typeref (VB\u0024AnonymousType_47<SEOrder, OrderLine, IEnumerable<OrdSection>>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (OrderLine.get_OrderLineId)))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scOrderImportInfo.set_OrderLineNum)), (Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression1, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_47<SEOrder, OrderLine, IEnumerable<OrdSection>>.get_l), __typeref (VB\u0024AnonymousType_47<SEOrder, OrderLine, IEnumerable<OrdSection>>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (OrderLine.get_OrderLineNum)))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scOrderImportInfo.set_OrderLineQty)), (Expression) Expression.ConvertChecked((Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression1, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_47<SEOrder, OrderLine, IEnumerable<OrdSection>>.get_l), __typeref (VB\u0024AnonymousType_47<SEOrder, OrderLine, IEnumerable<OrdSection>>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (OrderLine.get_OrderLineQty))), typeof (int))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scOrderImportInfo.set_OrderLineShipDt)), (Expression) Expression.Convert((Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression1, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_47<SEOrder, OrderLine, IEnumerable<OrdSection>>.get_l), __typeref (VB\u0024AnonymousType_47<SEOrder, OrderLine, IEnumerable<OrdSection>>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (OrderLine.get_OrderLineShipDt))), typeof (DateTime))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scOrderImportInfo.set_OrderLineShipped)), (Expression) Expression.Convert((Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression1, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_47<SEOrder, OrderLine, IEnumerable<OrdSection>>.get_l), __typeref (VB\u0024AnonymousType_47<SEOrder, OrderLine, IEnumerable<OrdSection>>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (OrderLine.get_OrderLineShipped))), typeof (bool))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scOrderImportInfo.set_OrderLineShippedDt)), (Expression) Expression.Convert((Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression1, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_47<SEOrder, OrderLine, IEnumerable<OrdSection>>.get_l), __typeref (VB\u0024AnonymousType_47<SEOrder, OrderLine, IEnumerable<OrdSection>>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (OrderLine.get_OrderLineShippedDt))), typeof (DateTime))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scOrderImportInfo.set_OrderLineSL)), (Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression1, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_47<SEOrder, OrderLine, IEnumerable<OrdSection>>.get_l), __typeref (VB\u0024AnonymousType_47<SEOrder, OrderLine, IEnumerable<OrdSection>>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (OrderLine.get_OrderLineSL)))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scOrderImportInfo.set_OrderLineSS)), (Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression1, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_47<SEOrder, OrderLine, IEnumerable<OrdSection>>.get_l), __typeref (VB\u0024AnonymousType_47<SEOrder, OrderLine, IEnumerable<OrdSection>>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (OrderLine.get_OrderLineSS)))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scOrderImportInfo.set_OrderLineTargetDt)), (Expression) Expression.Convert((Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression1, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_47<SEOrder, OrderLine, IEnumerable<OrdSection>>.get_l), __typeref (VB\u0024AnonymousType_47<SEOrder, OrderLine, IEnumerable<OrdSection>>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (OrderLine.get_OrderLineTargetDt))), typeof (DateTime))), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scOrderImportInfo.set_OrdSectsCnt)), (Expression) Expression.Call((Expression) null, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (Enumerable.Count)), new Expression[1]{ (Expression) Expression.Property((Expression) parameterExpression1, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_47<SEOrder, OrderLine, IEnumerable<OrdSection>>.get_st), __typeref (VB\u0024AnonymousType_47<SEOrder, OrderLine, IEnumerable<OrdSection>>))) }))), new ParameterExpression[1]{ parameterExpression1 }));
        if (source1.Count<scOrderImportInfo>() == 1)
        {
          // ISSUE: reference to a compiler-generated field
          closure104.\u0024VB\u0024Local_ldRtnData = source1.First<scOrderImportInfo>();
          // ISSUE: reference to a compiler-generated field
          if (closure104.\u0024VB\u0024Local_ldBackOrder.OrdSectsNum > 0)
          {
            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: 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.SEOrders, (IEnumerable<M1>) se0085CtEntities1.OrderLines, (Expression<Func<M0, M2>>) (o => o.OrderId), (Expression<Func<M1, M2>>) (l => l.SEOrder.OrderId), (Expression<Func<M0, M1, M3>>) ((o, l) => new{ o = o, l = l })), (IEnumerable<M1>) se0085CtEntities1.OrdSections, (Expression<Func<M0, M2>>) (data => data.l.OrderLineId), (Expression<Func<M1, M2>>) (s => s.OrderLine.OrderLineId), (Expression<Func<M0, M1, M3>>) ((data, s) => new{ o = data.o, l = data.l, s = s })), (Expression<Func<M0, bool>>) Expression.Lambda<Func<VB\u0024AnonymousType_45<SEOrder, OrderLine, OrdSection>, bool>>((Expression) Expression.And((Expression) Expression.And((Expression) Expression.Equal(\u0024VB\u0024It.o.OrderId, closure104.\u0024VB\u0024Local_ldRtnData.OrderId, true, (MethodInfo) null), (Expression) Expression.Equal((Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_45<SEOrder, OrderLine, OrdSection>.get_l), __typeref (VB\u0024AnonymousType_45<SEOrder, OrderLine, OrdSection>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (OrderLine.get_OrderLineId))), (Expression) Expression.Property((Expression) Expression.Field((Expression) Expression.Constant((object) closure104, typeof (clsBackorders._Closure\u0024__104)), FieldInfo.GetFieldFromHandle(__fieldref (clsBackorders._Closure\u0024__104.\u0024VB\u0024Local_ldRtnData))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scOrderLinesExt.get_OrderLineId))), true, (MethodInfo) null)), (Expression) Expression.Equal((Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression2, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_45<SEOrder, OrderLine, OrdSection>.get_s), __typeref (VB\u0024AnonymousType_45<SEOrder, OrderLine, OrdSection>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (OrdSection.get_OrdSectsNum))), (Expression) Expression.Property((Expression) Expression.Field((Expression) Expression.Constant((object) closure104, typeof (clsBackorders._Closure\u0024__104)), FieldInfo.GetFieldFromHandle(__fieldref (clsBackorders._Closure\u0024__104.\u0024VB\u0024Local_ldBackOrder))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scOrderImportInfo.get_OrdSectsNum))), true, (MethodInfo) null)), new ParameterExpression[1]{ parameterExpression2 })), (Expression<Func<M0, M1>>) (data => data.s.OrdSectsId));
            if (source2.Count<int>() == 1)
            {
              // ISSUE: reference to a compiler-generated field
              closure104.\u0024VB\u0024Local_ldRtnData.OrdSectsId = source2.First<int>();
              // ISSUE: reference to a compiler-generated field
              // ISSUE: reference to a compiler-generated field
              closure104.\u0024VB\u0024Local_ldRtnData.OrdSectsNum = closure104.\u0024VB\u0024Local_ldBackOrder.OrdSectsNum;
            }
            else
            {
              // ISSUE: reference to a compiler-generated field
              closure104.\u0024VB\u0024Local_ldRtnData.OrdSectsId = 0;
              // ISSUE: reference to a compiler-generated field
              closure104.\u0024VB\u0024Local_ldRtnData.OrdSectsNum = 0;
            }
          }
          else
          {
            // ISSUE: reference to a compiler-generated field
            closure104.\u0024VB\u0024Local_ldRtnData.OrdSectsId = 0;
            // ISSUE: reference to a compiler-generated field
            closure104.\u0024VB\u0024Local_ldRtnData.OrdSectsNum = 0;
          }
        }
        se0085CtEntities1.Database.Connection.Close();
      }
      // ISSUE: reference to a compiler-generated field
      return closure104.\u0024VB\u0024Local_ldRtnData;
    }

    public string DeleteSection(scOrderImportInfo BackOrders)
    {
      // ISSUE: object of a compiler-generated type is created
      // ISSUE: variable of a compiler-generated type
      clsBackorders._Closure\u0024__105 closure105 = new clsBackorders._Closure\u0024__105();
      string str = "Results:  ";
      // ISSUE: reference to a compiler-generated field
      closure105.\u0024VB\u0024Local_ldBackOrder = new scOrderImportInfo();
      // ISSUE: reference to a compiler-generated field
      closure105.\u0024VB\u0024Local_ldBackOrder = BackOrders;
      // ISSUE: reference to a compiler-generated field
      if (closure105.\u0024VB\u0024Local_ldBackOrder.OrdSectsId > 0)
      {
        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: type reference
          // ISSUE: method reference
          // ISSUE: field reference
          // ISSUE: method reference
          IQueryable<OrdSection> queryable = (IQueryable<OrdSection>) Queryable.Select(Queryable.Where((IQueryable<M0>) Queryable.Join((IQueryable<M0>) Queryable.Join((IQueryable<M0>) se0085CtEntities1.SEOrders, (IEnumerable<M1>) se0085CtEntities1.OrderLines, (Expression<Func<M0, M2>>) (o => o.OrderId), (Expression<Func<M1, M2>>) (l => l.SEOrder.OrderId), (Expression<Func<M0, M1, M3>>) ((o, l) => new{ o = o, l = l })), (IEnumerable<M1>) se0085CtEntities1.OrdSections, (Expression<Func<M0, M2>>) (data => data.l.OrderLineId), (Expression<Func<M1, M2>>) (s => s.OrderLine.OrderLineId), (Expression<Func<M0, M1, M3>>) ((data, s) => new{ o = data.o, l = data.l, s = s })), (Expression<Func<M0, bool>>) Expression.Lambda<Func<VB\u0024AnonymousType_45<SEOrder, OrderLine, OrdSection>, bool>>((Expression) Expression.And((Expression) Expression.And((Expression) Expression.Equal(\u0024VB\u0024It.o.OrderId, closure105.\u0024VB\u0024Local_ldBackOrder.OrderId, true, (MethodInfo) null), (Expression) Expression.Equal((Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_45<SEOrder, OrderLine, OrdSection>.get_l), __typeref (VB\u0024AnonymousType_45<SEOrder, OrderLine, OrdSection>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (OrderLine.get_OrderLineId))), (Expression) Expression.Property((Expression) Expression.Field((Expression) Expression.Constant((object) closure105, typeof (clsBackorders._Closure\u0024__105)), FieldInfo.GetFieldFromHandle(__fieldref (clsBackorders._Closure\u0024__105.\u0024VB\u0024Local_ldBackOrder))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scOrderLinesExt.get_OrderLineId))), true, (MethodInfo) null)), (Expression) Expression.Equal((Expression) Expression.Property((Expression) Expression.Property((Expression) parameterExpression, (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (VB\u0024AnonymousType_45<SEOrder, OrderLine, OrdSection>.get_s), __typeref (VB\u0024AnonymousType_45<SEOrder, OrderLine, OrdSection>))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (OrdSection.get_OrdSectsId))), (Expression) Expression.Property((Expression) Expression.Field((Expression) Expression.Constant((object) closure105, typeof (clsBackorders._Closure\u0024__105)), FieldInfo.GetFieldFromHandle(__fieldref (clsBackorders._Closure\u0024__105.\u0024VB\u0024Local_ldBackOrder))), (MethodInfo) MethodBase.GetMethodFromHandle(__methodref (scOrderImportInfo.get_OrdSectsId))), true, (MethodInfo) null)), new ParameterExpression[1]{ parameterExpression })), (Expression<Func<M0, M1>>) (data => data.s));
          IEnumerator<OrdSection> enumerator;
          try
          {
            enumerator = queryable.GetEnumerator();
            while (enumerator.MoveNext())
            {
              OrdSection current = enumerator.Current;
              se0085CtEntities1.OrdSections.Remove(current);
            }
          }
          finally
          {
            if (enumerator != null)
              enumerator.Dispose();
          }
          int num = se0085CtEntities1.SaveChanges();
          str = str + Conversions.ToString(num) + " sections deleted\r\n";
          se0085CtEntities1.Database.Connection.Close();
        }
      }
      return str;
    }
  }
}
