using Microsoft.VisualBasic;
using Microsoft.VisualBasic.CompilerServices;
using System;

//namespace SE0085.CTdB
namespace FAS_LIB
{
  public class scMESOrderInfo
  {
    private int _OrderId;
    private int _SEPlantId;
    private int _AssemLineId;
    private string _OrderFO;
    private string _OrderJobName;
    private string _OrderPurchaser;
    private int _OrderLineId;
    private string _OrderLineNum;
    private int _OrderLineQty;
    private string _OrderLineSS;
    private string _OrderLineSL;
    private DateTime _OrderLineTargetDt;
    private DateTime _OrderLineShipDt;
    private DateTime _OrderLineShippedDt;
    private bool _OrderLineShipped;
    private int _OrdSectsId;
    private int _OrdSectsNum;
    private int _OrdShipSplt;
    private string _OrdSectsProdNum;
    private string _OrdSectsCryptRt;
    private string _OrdSectsCurrWorkCtr;
    private int _RoutingId;
    private string _RoutingWorkCenter;
    private string _RoutingNextWorkCtr;
    private int _RoutingRunTimeMin;
    private DateTime _RoutingSchStartDt;
    private DateTime _RoutingSchFinishDt;
    private DateTime _RoutingActStartDt;
    private DateTime _RoutingActFinishDt;
    private DateTime _RoutingQueuedDt;
    private string _RoutingStatusCD;
    private bool _RoutingProcessed;

    public object Order
    {
      get
      {
        return (object) new scOrdersInfo()
        {
          OrderId = this._OrderId,
          OrderFO = Strings.Trim(this._OrderFO),
          OrderJobName = Strings.Trim(this._OrderJobName),
          OrderPurchaser = Strings.Trim(this._OrderPurchaser)
        };
      }
    }

    public scOrderLinesInfo OrderLine
    {
      get
      {
        return new scOrderLinesInfo()
        {
          OrderLineId = this._OrderLineId,
          AssemblyLineId = this._AssemLineId,
          OrderLineNum = Strings.Trim(this._OrderLineNum),
          OrderLineQty = this._OrderLineQty,
          OrderLineSS = Strings.Trim(this._OrderLineSS),
          OrderLineSL = Strings.Trim(this._OrderLineSL),
          OrderLineTargetDt = this._OrderLineTargetDt,
          OrderLineShippedDt = this._OrderLineShipDt,
          OrderLineShippedbln = this._OrderLineShipped
        };
      }
    }

    public scOrdSectionsInfo OrdSection
    {
      get
      {
        return new scOrdSectionsInfo()
        {
          OrdSectsId = this._OrdSectsId,
          OrdSectsNum = this._OrdSectsNum,
          OrdSectsProdNum = Strings.Trim(this._OrdSectsProdNum),
          OrdSectsCurrWorkCtr = Strings.Trim(this._OrdSectsCurrWorkCtr),
          OrdSectsCryptRt = Strings.Trim(this._OrdSectsCryptRt)
        };
      }
    }

    public scSectionsRoutingInfo OrdRouting
    {
      get
      {
        return new scSectionsRoutingInfo()
        {
          RoutingId = this._RoutingId,
          RoutingWorkCenter = Strings.Trim(this._RoutingWorkCenter),
          RoutingNextWorkCtr = Strings.Trim(this._RoutingNextWorkCtr),
          RoutingRunTimeMin = this._RoutingRunTimeMin,
          RoutingSchStartDt = this._RoutingSchStartDt,
          RoutingSchFinishDt = this._RoutingSchFinishDt,
          RoutingActStartDt = this._RoutingActStartDt,
          RoutingActFinishDt = this._RoutingActFinishDt
        };
      }
    }

    public int OrderId
    {
      get
      {
        return this._OrderId;
      }
      set
      {
        this._OrderId = value;
      }
    }

    public int SEPlantId
    {
      get
      {
        return this._SEPlantId;
      }
      set
      {
        this._SEPlantId = value;
      }
    }

    public int AssemblyLineId
    {
      get
      {
        return this._AssemLineId;
      }
      set
      {
        this._AssemLineId = value;
      }
    }

    public string OrderFO
    {
      get
      {
        return this._OrderFO;
      }
      set
      {
        this._OrderFO = value;
      }
    }

    public string OrderJobName
    {
      get
      {
        return this._OrderJobName;
      }
      set
      {
        this._OrderJobName = value;
      }
    }

    public string OrderPurchaser
    {
      get
      {
        return this._OrderPurchaser;
      }
      set
      {
        this._OrderPurchaser = value;
      }
    }

    public int OrderLineId
    {
      get
      {
        return this._OrderLineId;
      }
      set
      {
        this._OrderLineId = value;
      }
    }

    public string OrderLineNum
    {
      get
      {
        return this._OrderLineNum;
      }
      set
      {
        this._OrderLineNum = value;
      }
    }

    public int OrderLineQty
    {
      get
      {
        return this._OrderLineQty;
      }
      set
      {
        this._OrderLineQty = value;
      }
    }

    public string OrderLineSS
    {
      get
      {
        return this._OrderLineSS;
      }
      set
      {
        this._OrderLineSS = value;
      }
    }

    public string OrderLineSL
    {
      get
      {
        return this._OrderLineSL;
      }
      set
      {
        this._OrderLineSL = value;
      }
    }

    public DateTime OrderLineTargetDt
    {
      get
      {
        return this._OrderLineTargetDt;
      }
      set
      {
        this._OrderLineTargetDt = value;
      }
    }

    public DateTime OrderLineShipDt
    {
      get
      {
        return this._OrderLineShipDt;
      }
      set
      {
        this._OrderLineShipDt = value;
      }
    }

    public DateTime OrderLineShippedDt
    {
      get
      {
        return this._OrderLineShippedDt;
      }
      set
      {
        this._OrderLineShippedDt = value;
      }
    }

    public byte OrderLineShipped
    {
      get
      {
        return this._OrderLineShipped ? (byte) 1 : (byte) 0;
      }
      set
      {
        if ((int) value > 0)
          this._OrderLineShipped = true;
        else
          this._OrderLineShipped = false;
      }
    }

    public bool OrderLineShippedbln
    {
      get
      {
        return this._OrderLineShipped;
      }
      set
      {
        this._OrderLineShipped = value;
      }
    }

    public int OrdShipSplt
    {
      get
      {
        return this._OrdShipSplt;
      }
      set
      {
        this._OrdShipSplt = value;
      }
    }

    public int OrdSectsId
    {
      get
      {
        return this._OrdSectsId;
      }
      set
      {
        this._OrdSectsId = value;
      }
    }

    public int OrdSectsNum
    {
      get
      {
        return this._OrdSectsNum;
      }
      set
      {
        this._OrdSectsNum = value;
      }
    }

    public string OrdSectsProdNum
    {
      get
      {
        return this._OrdSectsProdNum;
      }
      set
      {
        this._OrdSectsProdNum = value;
      }
    }

    public string OrdSectsCryptRt
    {
      get
      {
        return this._OrdSectsCryptRt;
      }
      set
      {
        this._OrdSectsCryptRt = value;
      }
    }

    public string OrdSectsCurrWorkCtr
    {
      get
      {
        return this._OrdSectsCurrWorkCtr;
      }
      set
      {
        this._OrdSectsCurrWorkCtr = value;
      }
    }

    public int RoutingId
    {
      get
      {
        return this._RoutingId;
      }
      set
      {
        this._RoutingId = value;
      }
    }

    public string RoutingWorkCenter
    {
      get
      {
        return this._RoutingWorkCenter;
      }
      set
      {
        this._RoutingWorkCenter = value;
      }
    }

    public string RoutingNextWorkCtr
    {
      get
      {
        return this._RoutingNextWorkCtr;
      }
      set
      {
        this._RoutingNextWorkCtr = value;
      }
    }

    public int RoutingRunTimeMin
    {
      get
      {
        return this._RoutingRunTimeMin;
      }
      set
      {
        this._RoutingRunTimeMin = value;
      }
    }

    public DateTime RoutingSchStartDt
    {
      get
      {
        return this._RoutingSchStartDt;
      }
      set
      {
        this._RoutingSchStartDt = value;
      }
    }

    public DateTime RoutingSchFinishDt
    {
      get
      {
        return this._RoutingSchFinishDt;
      }
      set
      {
        this._RoutingSchFinishDt = value;
      }
    }

    public DateTime RoutingActStartDt
    {
      get
      {
        return this._RoutingActStartDt;
      }
      set
      {
        this._RoutingActStartDt = value;
      }
    }

    public DateTime RoutingActFinishDt
    {
      get
      {
        return this._RoutingActFinishDt;
      }
      set
      {
        this._RoutingActFinishDt = value;
      }
    }

    public DateTime RoutingQueuedDt
    {
      get
      {
        return this._RoutingQueuedDt;
      }
      set
      {
        this._RoutingQueuedDt = value;
      }
    }

    public string RoutingStatusCD
    {
      get
      {
        return this._RoutingStatusCD;
      }
      set
      {
        this._RoutingStatusCD = value;
      }
    }

    public bool RoutingProcessed
    {
      get
      {
        return this._RoutingProcessed;
      }
      set
      {
        this._RoutingProcessed = value;
      }
    }

    public scMESOrderInfo()
    {
      this._OrderId = 0;
      this._SEPlantId = 0;
      this._AssemLineId = 0;
      this._OrderFO = "";
      this._OrderJobName = "";
      this._OrderPurchaser = "";
      this._OrderLineId = 0;
      this._OrderLineNum = "";
      this._OrderLineQty = 1;
      this._OrderLineSS = "";
      this._OrderLineSL = "";
      this._OrderLineTargetDt = Conversions.ToDate("01/01/1901");
      this._OrderLineShipDt = Conversions.ToDate("01/01/1901");
      this._OrderLineShippedDt = Conversions.ToDate("01/01/1901");
      this._OrderLineShipped = false;
      this._OrdSectsId = 0;
      this._OrdShipSplt = 0;
      this._OrdSectsNum = 0;
      this._OrdSectsProdNum = "";
      this._OrdSectsCryptRt = "";
      this._OrdSectsCurrWorkCtr = "";
      this._RoutingId = 0;
      this._RoutingWorkCenter = "";
      this._RoutingNextWorkCtr = "";
      this._RoutingRunTimeMin = 0;
      this._RoutingSchStartDt = Conversions.ToDate("12/31/2019");
      this._RoutingSchFinishDt = Conversions.ToDate("12/31/2019");
      this._RoutingActStartDt = Conversions.ToDate("01/01/1901");
      this._RoutingActFinishDt = Conversions.ToDate("01/01/1901");
      this._RoutingQueuedDt = Conversions.ToDate("01/01/1901");
      this._RoutingStatusCD = "X";
      this._RoutingProcessed = false;
    }
  }
}
