// Decompiled with JetBrains decompiler
// Type: SE0085.StCl.scODVSummary
// Assembly: SE0085StCl, Version=1.0.0.1, Culture=neutral, PublicKeyToken=null
// MVID: 2F536775-F65D-4A2A-A94A-55B55F096E84
// Assembly location: C:\Users\Abishek\Downloads\SchneiderCode_Breaker_09292016\Breaker Schedule-20160930T014118Z\Breaker Schedule\Solution for gathering Breaker Data\DMS\bin\Debug\SE0085StCl.dll

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

namespace SE0085.StCl
{
  public class scODVSummary
  {
    private string _AssemLineAbbrv;
    private string _OrderFO;
    private string _OrderJobName;
    private int _OrderLineId;
    private string _OrderLineNum;
    private string _OrderLineSS;
    private string _OrderLineSL;
    private DateTime _OrderLineTargetDt;
    private DateTime _OrderLineShipDt;
    private DateTime _OrderLineShippedDt;
    private string _OrderNotes;

    public string AssemLineAbbrv
    {
      get
      {
        return this._AssemLineAbbrv;
      }
      set
      {
        this._AssemLineAbbrv = value;
      }
    }

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

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

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

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

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

    public DateTime OrderLineTargetDt
    {
      get
      {
        return Conversions.ToDate(Strings.FormatDateTime(this._OrderLineTargetDt, DateFormat.ShortDate));
      }
      set
      {
        this._OrderLineTargetDt = value;
      }
    }

    public string OrderLineTargetShortDt
    {
      get
      {
        return Strings.FormatDateTime(this._OrderLineTargetDt, DateFormat.ShortDate);
      }
    }

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

    public string OrderLineShipShortDt
    {
      get
      {
        return Strings.FormatDateTime(this._OrderLineShipDt, DateFormat.ShortDate);
      }
    }

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

    public string OrderLineShippedShortDt
    {
      get
      {
        return Strings.FormatDateTime(this._OrderLineShippedDt, DateFormat.ShortDate);
      }
    }

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

    public string FactoryOrder
    {
      get
      {
        string str;
        if (this._OrderFO.Length == 8 & this._OrderLineNum.Length == 3 & this._OrderLineSL.Length == 2 & this._OrderLineSS.Length == 2)
        {
          try
          {
            str = Strings.Trim(this._OrderFO) + "-" + Strings.Trim(this._OrderLineNum) + "-" + Strings.Trim(this._OrderLineSL) + "-" + Strings.Trim(this._OrderLineSS);
          }
          catch (Exception ex)
          {
            ProjectData.SetProjectError(ex);
            str = "";
            ProjectData.ClearProjectError();
          }
        }
        else
          str = "";
        return str;
      }
      set
      {
        string str1 = value.Trim();
        if (str1.Length == 15)
        {
          try
          {
            string str2 = str1.Substring(0, 8);
            string str3 = str1.Substring(8, 3);
            string str4 = str1.Substring(11, 2);
            string str5 = str1.Substring(13, 2);
            this._OrderFO = str2;
            this._OrderLineNum = str3;
            this._OrderLineSL = str4;
            this._OrderLineSS = str5;
          }
          catch (Exception ex)
          {
            ProjectData.SetProjectError(ex);
            this._OrderFO = "";
            this._OrderLineNum = "";
            this._OrderLineSL = "";
            this._OrderLineSS = "";
            ProjectData.ClearProjectError();
          }
        }
      }
    }

    public string OrderNotes
    {
      get
      {
        return this._OrderNotes;
      }
      set
      {
        this._OrderNotes = value;
      }
    }

    public scODVSummary()
    {
      this._AssemLineAbbrv = "";
      this._OrderFO = "";
      this._OrderJobName = "";
      this._OrderLineId = 0;
      this._OrderLineNum = "";
      this._OrderLineSL = "00";
      this._OrderLineSS = "01";
      this._OrderLineTargetDt = Conversions.ToDate("01/01/1901");
      this._OrderLineShipDt = Conversions.ToDate("01/01/1901");
      this._OrderLineShippedDt = Conversions.ToDate("01/01/1901");
      this._OrderNotes = "";
    }

    public override string ToString()
    {
      return this._OrderFO + this._OrderLineNum + this._OrderLineSL + this._OrderLineSS;
    }
  }
}
