public override bool Load() { bool ret = true; List <long> idlist = new List <long>(); 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 [tblText] WHERE [DisplayID]= " + m_DisplayID_tblDisplay.DisplayID + " order by oIndex;"; myCommand.Connection = Common.Conn; myReader = myCommand.ExecuteReader(); while (myReader.Read()) { idlist.Add(myReader.GetInt64(myReader.GetOrdinal("ID"))); } myReader.Close(); myCommand.Dispose(); foreach (long id in idlist)// (int i = 0; i < count ; i++) { tblText tblText = new tblText(); tblText.ID = id; tblText.m_DisplayID_tblDisplay = this.m_DisplayID_tblDisplay; tblText.Select(); Add(tblText); } } catch (SQLiteException ae) { System.Windows.Forms.MessageBox.Show(ae.Message); return(false); } return(ret); }
public bool Contains(tblText item) { return(List.Contains(item)); }
public int IndexOf(tblText item) { return(List.IndexOf(item)); }
public void Insert(int index, tblText item) { List.Insert(index, item); this.OntblTextChanged(EventArgs.Empty); }
public void Remove(tblText item) { List.Remove(item); this.OntblTextChanged(EventArgs.Empty); }
public void Add(tblText item) { List.Add(item); this.OntblTextChanged(EventArgs.Empty); }