public override bool Load()
        {
            bool        ret    = true;
            List <long> idlist = new List <long>();

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

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

                    this.Add(tblblockmodetext);
                }
                //"SELECT [FunctionName], [Description], [Type], [IsStandard], [FunctionGroup], [Extensible], [IsFunction], [Body], [Language] FROM [tblFunction] WHERE [FunctionID]=@FunctionID ";
            }
            catch (SQLiteException ae)
            {
                System.Windows.Forms.MessageBox.Show(ae.Message);
                return(false);
            }



            return(ret);
        }
Exemple #2
0
 public bool Contains(tblBlockModeText item)
 {
     return(List.Contains(item));
 }
Exemple #3
0
 public int IndexOf(tblBlockModeText item)
 {
     return(List.IndexOf(item));
 }
Exemple #4
0
 public void Insert(int index, tblBlockModeText item)
 {
     List.Insert(index, item);
     this.OntblBlockModeTextChanged(EventArgs.Empty);
 }
Exemple #5
0
 public void Remove(tblBlockModeText item)
 {
     List.Remove(item);
     this.OntblBlockModeTextChanged(EventArgs.Empty);
 }
Exemple #6
0
 public void Add(tblBlockModeText item)
 {
     List.Add(item);
     this.OntblBlockModeTextChanged(EventArgs.Empty);
 }