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);
        }
예제 #2
0
 public bool Contains(tblPlantStructureObject item)
 {
     return(List.Contains(item));
 }
예제 #3
0
 public void Insert(int index, tblPlantStructureObject item)
 {
     List.Insert(index, item);
     this.OntblPlantStructureObjectChanged(EventArgs.Empty);
 }
예제 #4
0
 public int IndexOf(tblPlantStructureObject item)
 {
     return(List.IndexOf(item));
 }
예제 #5
0
 public void Remove(tblPlantStructureObject item)
 {
     List.Remove(item);
     this.OntblPlantStructureObjectChanged(EventArgs.Empty);
 }