Exemplo n.º 1
0
        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);
        }
Exemplo n.º 2
0
 public tblEquipmentCollection(tblPlantStructure _parent)
 {
     _ID_tblPlantStructure = _parent;
 }
Exemplo n.º 3
0
 public bool Contains(tblPlantStructure item)
 {
     return(List.Contains(item));
 }
Exemplo n.º 4
0
 public int IndexOf(tblPlantStructure item)
 {
     return(List.IndexOf(item));
 }
Exemplo n.º 5
0
 public void Insert(int index, tblPlantStructure item)
 {
     List.Insert(index, item);
     this.OntblPlantStructureChanged(EventArgs.Empty);
 }
Exemplo n.º 6
0
 public void Remove(tblPlantStructure item)
 {
     List.Remove(item);
     this.OntblPlantStructureChanged(EventArgs.Empty);
 }
Exemplo n.º 7
0
 public void Add(tblPlantStructure item)
 {
     List.Add(item);
     this.OntblPlantStructureChanged(EventArgs.Empty);
 }