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 [tblFBDAlarmOrder] WHERE [FunctionID]= " + this._FunctionID_tblFunction.FunctionID + " order by oIndex;"; myCommand.Connection = Common.Conn; myReader = myCommand.ExecuteReader(); while (myReader.Read()) { idlist.Add(myReader.GetInt64(myReader.GetOrdinal("ID"))); } myReader.Close(); myCommand.Dispose(); // _SqlConnectionConnection.Close(); for (int i = 0; i < idlist.Count; i++) { tblFBDAlarmOrder tblfbdalarmorder = new tblFBDAlarmOrder(); tblfbdalarmorder.ID = idlist[i]; tblfbdalarmorder.m_FunctionID_tblFunction = m_FunctionID_tblFunction; tblfbdalarmorder.Select(); this.Add(tblfbdalarmorder); } } catch (SQLiteException ae) { System.Windows.Forms.MessageBox.Show(ae.Message); return(false); } return(ret); }
public bool Contains(tblFBDAlarmOrder item) { return(List.Contains(item)); }
public int IndexOf(tblFBDAlarmOrder item) { return(List.IndexOf(item)); }
public void Insert(int index, tblFBDAlarmOrder item) { List.Insert(index, item); this.OntblFBDAlarmOrderChanged(EventArgs.Empty); }
public void Remove(tblFBDAlarmOrder item) { List.Remove(item); this.OntblFBDAlarmOrderChanged(EventArgs.Empty); }
public void Add(tblFBDAlarmOrder item) { List.Add(item); this.OntblFBDAlarmOrderChanged(EventArgs.Empty); }