/// <remarks>Represents the foreign key object</remarks> //private tblSolution _SolutionID_tblSolution; //[Description("Represents the foreign key object of the type SolutionID")] //public tblSolution m_SolutionID_tblSolution //{ // get // { // return _SolutionID_tblSolution; // } // set // { // _SolutionID_tblSolution = value; // } //} public override bool Load() { bool ret = true; List <long> idlist = new List <long>(); SQLiteConnection _SqlConnectionConnection = new SQLiteConnection(Common.ConnectionString); SQLiteDataReader myReader = null; SQLiteCommand myCommand = new SQLiteCommand(); if (_SqlConnectionConnection.State == System.Data.ConnectionState.Open) { _SqlConnectionConnection.Close(); } _SqlConnectionConnection.ConnectionString = Common.ConnectionString; _SqlConnectionConnection.Open(); try { myReader = null; myCommand.CommandText = @"SELECT * FROM [tblSymbols] "; myCommand.Connection = _SqlConnectionConnection; myReader = myCommand.ExecuteReader(); while (myReader.Read()) { idlist.Add(myReader.GetInt64(myReader.GetOrdinal("SymbolID"))); } myReader.Close(); myCommand.Dispose(); _SqlConnectionConnection.Close(); foreach (long id in idlist)// (int i = 0; i < count ; i++) { tblSymbols tblsymbols = new tblSymbols(); tblsymbols.SymbolID = id; tblsymbols.m_SolutionID_tblSolution = this.m_SolutionID_tblSolution; tblsymbols.Select(); //tblsymbols.m_tblSymbolStatusCollection.Load(); this.Add(tblsymbols); } } catch (SQLiteException ae) { System.Windows.Forms.MessageBox.Show(ae.Message); return(false); } return(ret); }
public tblSymbolStatusCollection(tblSymbols _parent) { _SymbolID_tblSymbols = _parent; }
public bool Contains(tblSymbols item) { return(List.Contains(item)); }
public int IndexOf(tblSymbols item) { return(List.IndexOf(item)); }
public void Insert(int index, tblSymbols item) { List.Insert(index, item); this.OntblSymbolsChanged(EventArgs.Empty); }
public void Remove(tblSymbols item) { List.Remove(item); this.OntblSymbolsChanged(EventArgs.Empty); }
public void Add(tblSymbols item) { List.Add(item); this.OntblSymbolsChanged(EventArgs.Empty); }