// Decompiled with JetBrains decompiler
// Type: SE0085.StCl.scPlants
// 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

namespace SE0085.StCl
{
  public class scPlants
  {
    private int _PlantId;
    private string _PlantDesin;
    private string _PlantName;
    private string _PlantCity;
    private string _PlantState;
    private byte _PlantValue;
    private byte _PlantActive;

    public int PlantId
    {
      get
      {
        return this._PlantId;
      }
      set
      {
        this._PlantId = value;
      }
    }

    public string PlantDesin
    {
      get
      {
        return this._PlantDesin;
      }
      set
      {
        this._PlantDesin = value;
      }
    }

    public string PlantName
    {
      get
      {
        return this._PlantName;
      }
      set
      {
        this._PlantName = value;
      }
    }

    public string PlantCity
    {
      get
      {
        return this._PlantCity;
      }
      set
      {
        this._PlantCity = value;
      }
    }

    public string PlantState
    {
      get
      {
        return this._PlantState;
      }
      set
      {
        this._PlantState = value;
      }
    }

    public byte PlantValue
    {
      get
      {
        return this._PlantValue;
      }
      set
      {
        this._PlantValue = value;
      }
    }

    public byte PlantActive
    {
      get
      {
        return this._PlantActive;
      }
      set
      {
        this._PlantActive = value;
      }
    }

    public bool PlantActiveBool
    {
      get
      {
        return (int) this._PlantActive != 0;
      }
      set
      {
        if (!value)
          this._PlantActive = (byte) 0;
        else
          this._PlantActive = (byte) 1;
      }
    }

    public scLevels PlantLevel
    {
      get
      {
        return new scLevels() { LevelId = this._PlantId, LevelAbbrv = this._PlantDesin, LevelName = this._PlantName, LevelActive = this._PlantActive, LevelValue = this._PlantValue };
      }
      set
      {
        this._PlantId = value.LevelId;
        this._PlantDesin = value.LevelAbbrv;
        this._PlantName = value.LevelName;
        this._PlantActive = value.LevelActive;
        this._PlantValue = value.LevelValue;
      }
    }

    public scPlants()
    {
      this._PlantId = 0;
      this._PlantDesin = "";
      this._PlantName = "";
      this._PlantCity = "";
      this._PlantState = "";
      this._PlantValue = (byte) 0;
      this._PlantActive = (byte) 0;
    }

    public override string ToString()
    {
      return this._PlantDesin + " " + this._PlantName + " - " + this._PlantCity + ", " + this._PlantState;
    }
  }
}
