Exemplo n.º 1
0
        public override bool Load(/*long _domainid*/)
        {
            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();

            //if (_SqlConnectionConnection.State == System.Data.ConnectionState.Open)
            //    _SqlConnectionConnection.Close();
            //_SqlConnectionConnection.ConnectionString = Common.ConnectionString;
            //_SqlConnectionConnection.Open();

            try
            {
                myReader = null;
                myCommand.CommandText = @"SELECT * FROM [tblDisplay]  WHERE [SolutionID]= " + this.m_SolutionID_tblSolution.SolutionID + " order by oIndex;";
                myCommand.Connection  = Common.Conn;
                myReader = myCommand.ExecuteReader();
                while (myReader.Read())
                {
                    idlist.Add(myReader.GetInt64(myReader.GetOrdinal("DisplayID")));
                }

                myReader.Close();
                myCommand.Dispose();
                //_SqlConnectionConnection.Close();

                foreach (long id in idlist)// (int i = 0; i < count ; i++)
                {
                    tblDisplay tbldisplay = new tblDisplay();

                    tbldisplay.DisplayID = id;
                    tbldisplay.m_SolutionID_tblSolution = this.m_SolutionID_tblSolution;
                    tbldisplay.Select();
                    // tbldisplay.LoadPicFile();
                    //tbldisplay.m_tblPouCollection.Load(_connectionstring, tbldisplay.DisplayID);
                    this.Add(tbldisplay);
                }
            }
            catch (SQLiteException ae)
            {
                System.Windows.Forms.MessageBox.Show(ae.Message);
                return(false);
            }

            return(ret);
        }
Exemplo n.º 2
0
 public tblTextCollection(tblDisplay _parent)
 {
     _DisplayID_tblDisplay = _parent;
 }
Exemplo n.º 3
0
 public tblPolygonCollection(tblDisplay _parent)
 {
     _DisplayID_tblDisplay = _parent;
 }
Exemplo n.º 4
0
 public tblBlockCollection(tblDisplay _parent)
 {
     _DisplayID_tblDisplay = _parent;
 }
Exemplo n.º 5
0
 public tblEllipseCollection(tblDisplay _parent)
 {
     _DisplayID_tblDisplay = _parent;
 }
Exemplo n.º 6
0
 public tblButtonCollection(tblDisplay _parent)
 {
     _DisplayID_tblDisplay = _parent;
 }
Exemplo n.º 7
0
 public tblMeterCollection(tblDisplay _parent)
 {
     _DisplayID_tblDisplay = _parent;
 }
Exemplo n.º 8
0
 public tblBargraphCollection(tblDisplay _parent)
 {
     _DisplayID_tblDisplay = _parent;
 }
Exemplo n.º 9
0
 public tblEditBoxCollection(tblDisplay _parent)
 {
     _DisplayID_tblDisplay = _parent;
 }
Exemplo n.º 10
0
 public tblCurveCollection(tblDisplay _parent)
 {
     _DisplayID_tblDisplay = _parent;
 }
Exemplo n.º 11
0
 public tblBitmapCollection(tblDisplay _parent)
 {
     _DisplayID_tblDisplay = _parent;
 }
Exemplo n.º 12
0
 public tblNavigationCollection(tblDisplay _parent)
 {
     _DisplayID_tblDisplay = _parent;
 }