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 [tblPlantStructureObject] "; myCommand.Connection = Common.Conn; myReader = myCommand.ExecuteReader(); while (myReader.Read()) { tblPlantStructureObject tblplantstructureobject = new tblPlantStructureObject(); tblplantstructureobject.m_SolutionID_tblSolution = this.m_SolutionID_tblSolution; tblplantstructureobject.AddFromRecordSet(myReader); this.Add(tblplantstructureobject); } myReader.Close(); myCommand.Dispose(); } catch (SQLiteException ae) { System.Windows.Forms.MessageBox.Show(ae.Message); return(false); } return(ret); }
public bool Contains(tblPlantStructureObject item) { return(List.Contains(item)); }
public void Insert(int index, tblPlantStructureObject item) { List.Insert(index, item); this.OntblPlantStructureObjectChanged(EventArgs.Empty); }
public int IndexOf(tblPlantStructureObject item) { return(List.IndexOf(item)); }
public void Remove(tblPlantStructureObject item) { List.Remove(item); this.OntblPlantStructureObjectChanged(EventArgs.Empty); }