public Connection(ConnectionString connStr) { Setup(); this._catalog = connStr.InitialCatalog; this._SSPI = (connStr.IntegratedSecurity.ToUpper() == "SSPI"); this._encPasswd = connStr.Password; this._user = connStr.UserID; this._server = new Server(); this._server.DNSName = connStr.DataSource; }
public bool Contains(Server obj) { foreach(Server child in List) { if (obj.Equals(child)){ return true; } } return false; }
public void LoadAll() { using(MySqlConnection conn = Connections.Inst.item("QED_DB").MySqlConnection){ using(MySqlDataReader dr = MySqlDBLayer.LoadAll(conn, _table)){ Server server; while(dr.Read()) { server = new Server(dr); server.BusinessCollection = this; List.Add(server); } } } }
public Server Add(Server obj) { obj.BusinessCollection = this; List.Add(obj); return obj; }