public override bool Load() { bool ret = true; if (Common.Conn == null) { Common.Conn = new SQLiteConnection(Common.ConnectionString); Common.Conn.Open(); } SQLiteDataReader myReader = null; SQLiteCommand myCommand = new SQLiteCommand(); try { myReader = null; myCommand.CommandText = @"SELECT * FROM [tblPlantStructure] "; myCommand.Connection = Common.Conn; myReader = myCommand.ExecuteReader(); while (myReader.Read()) { tblPlantStructure tblplantstructure = new tblPlantStructure(); tblplantstructure.m_SolutionID_tblSolution = this.m_SolutionID_tblSolution; tblplantstructure.AddFromRecordSet(myReader); this.Add(tblplantstructure); } myReader.Close(); myCommand.Dispose(); } catch (SQLiteException ae) { System.Windows.Forms.MessageBox.Show(ae.Message); return(false); } return(ret); }
public tblEquipmentCollection(tblPlantStructure _parent) { _ID_tblPlantStructure = _parent; }
public bool Contains(tblPlantStructure item) { return(List.Contains(item)); }
public int IndexOf(tblPlantStructure item) { return(List.IndexOf(item)); }
public void Insert(int index, tblPlantStructure item) { List.Insert(index, item); this.OntblPlantStructureChanged(EventArgs.Empty); }
public void Remove(tblPlantStructure item) { List.Remove(item); this.OntblPlantStructureChanged(EventArgs.Empty); }
public void Add(tblPlantStructure item) { List.Add(item); this.OntblPlantStructureChanged(EventArgs.Empty); }