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 [tblBlockStateText] ;";
                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++)
                {
                    tblBlockStateText tblblockstatetext = new tblBlockStateText();
                    tblblockstatetext.ID = id;// idlist[i];
                    tblblockstatetext.m_SolutionID_tblSolution = this.m_SolutionID_tblSolution;
                    tblblockstatetext.Select();

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



            return(ret);
        }
Esempio n. 2
0
 public bool Contains(tblBlockStateText item)
 {
     return(List.Contains(item));
 }
Esempio n. 3
0
 public int IndexOf(tblBlockStateText item)
 {
     return(List.IndexOf(item));
 }
Esempio n. 4
0
 public void Insert(int index, tblBlockStateText item)
 {
     List.Insert(index, item);
     this.OntblBlockStateTextChanged(EventArgs.Empty);
 }
Esempio n. 5
0
 public void Remove(tblBlockStateText item)
 {
     List.Remove(item);
     this.OntblBlockStateTextChanged(EventArgs.Empty);
 }
Esempio n. 6
0
 public void Add(tblBlockStateText item)
 {
     List.Add(item);
     this.OntblBlockStateTextChanged(EventArgs.Empty);
 }