Esempio n. 1
0
        private CUnit ReadRecord(DataTable dtTable)
        {
            CUnitS cRowS = null;

            foreach (DataRow dtRow in dtTable.Rows)
            {
                CUnit cRow = new CUnit();
                //cRow.ProcessKey = (ushort)dtRow[0];
                //cRow.AlarmTagKey = (string)dtRow[1];
                //cRow.ErrorStartTime = (DateTime)dtRow[2];
                //cRow.ErrorEndTime = (DateTime)dtRow[3];
                //cRow.Description = (string)dtRow[4];

                cRowS.Add(cRow);
            }

            if (cRowS.Count != 0)
            {
                return((CUnit)cRowS[0]);
            }

            else
            {
                return(null);
            }
        }
Esempio n. 2
0
        public object Clone()
        {
            CUnitS cUnitLogS = new CUnitS();

            for (int i = 0; i < this.Count; i++)
            {
                cUnitLogS.Add((CUnit)this[i].Clone());
            }

            return(cUnitLogS);
        }
Esempio n. 3
0
        private CUnitS ReadTable(DataTable dtTable)
        {
            CUnitS cRowS = new CUnitS();

            foreach (DataRow dtRow in dtTable.Rows)
            {
                CUnit cRow = new CUnit();
                //cRow.ProcessKey = (ushort)dtRow[0];
                //cRow.AlarmTagKey = (string)dtRow[1];
                //cRow.ErrorStartTime = (DateTime)dtRow[2];
                //cRow.ErrorEndTime = (DateTime)dtRow[3];
                //cRow.Description = (string)dtRow[4];

                cRowS.Add(cRow);
            }

            return(cRowS);
        }