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 [tblInstrumentUnitsGrp] ;";
                myCommand.Connection  = Common.Conn;
                myReader = myCommand.ExecuteReader();
                while (myReader.Read())
                {
                    idlist.Add(myReader.GetInt64(myReader.GetOrdinal("ID")));
                }

                myReader.Close();
                myCommand.Dispose();
                int count = idlist.Count;
                foreach (long id in idlist)// (int i = 0; i < count ; i++)
                {
                    tblInstrumentUnitsGrp tblinstrumentunitsgrp = new tblInstrumentUnitsGrp();
                    tblinstrumentunitsgrp.ID = id;// idlist[i];
                    tblinstrumentunitsgrp.m_SolutionID_tblSolution = this.m_SolutionID_tblSolution;
                    tblinstrumentunitsgrp.Select();

                    this.Add(tblinstrumentunitsgrp);
                }
            }
            catch (SQLiteException ae)
            {
                System.Windows.Forms.MessageBox.Show(ae.Message);
                return(false);
            }



            return(ret);
        }
Ejemplo n.º 2
0
 public tblInstrumentUnitsCollection(tblInstrumentUnitsGrp _parent)
 {
     _ID_tblInstrumentUnitsGrp = _parent;
 }
Ejemplo n.º 3
0
 public bool Contains(tblInstrumentUnitsGrp item)
 {
     return(List.Contains(item));
 }
Ejemplo n.º 4
0
 public int IndexOf(tblInstrumentUnitsGrp item)
 {
     return(List.IndexOf(item));
 }
Ejemplo n.º 5
0
 public void Insert(int index, tblInstrumentUnitsGrp item)
 {
     List.Insert(index, item);
     this.OntblInstrumentUnitsGrpChanged(EventArgs.Empty);
 }
Ejemplo n.º 6
0
 public void Remove(tblInstrumentUnitsGrp item)
 {
     List.Remove(item);
     this.OntblInstrumentUnitsGrpChanged(EventArgs.Empty);
 }
Ejemplo n.º 7
0
 public void Add(tblInstrumentUnitsGrp item)
 {
     List.Add(item);
     this.OntblInstrumentUnitsGrpChanged(EventArgs.Empty);
 }