// Decompiled with JetBrains decompiler
// Type: SE0085.Q2CdB.dBConnect
// Assembly: SE0085Q2CdB, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
// MVID: A5680110-30A2-457F-A920-E4C024719231
// Assembly location: C:\Users\Abishek\Downloads\SchneiderCode_Breaker_09292016\Breaker Schedule-20160930T014118Z\Breaker Schedule\Solution for gathering Breaker Data\DMS\bin\Debug\SE0085Q2CdB.dll

using Microsoft.VisualBasic.CompilerServices;
using System.Data.EntityClient;

namespace SE0085.Q2CdB
{
  public class dBConnect
  {
    private emDataEntity _dbDataEntity;
    private emDataSource _dbDataSource;
    private emInitCatalog _dbInitCatalog;
    private EntityConnection _dBconnection;
    private string lmUserAccess;

    public EntityConnection Connection
    {
      get
      {
        return this._dBconnection;
      }
    }

    public dBConnect(emDataEntity DataEntity, emDataSource DataSource, emInitCatalog InitCatalog, string Password)
    {
      this._dBconnection = new EntityConnection();
      this.lmUserAccess = "NewCastle";
      if (Operators.CompareString(Password, this.lmUserAccess, false) != 0)
        return;
      this._dbDataEntity = DataEntity;
      this._dbDataSource = DataSource;
      this._dbInitCatalog = InitCatalog;
      this.BuildConnection();
    }

    private void BuildConnection()
    {
      this._dBconnection = new icDataConnectionQ2C(this._dbDataEntity, this._dbDataSource, this._dbInitCatalog, "NewCastle").Connection;
    }
  }
}
