Beispiel #1
0
        public override IPipeData GetDataByID(string ID)
        {
            string    sql       = string.Format("select * from PS_PIPE where ID='{0}'", ID);
            IDataBase pDataBase = SysDBUnitiy.OleDataBase;

            System.Data.DataTable pTable = pDataBase.ExecuteQuery(sql).Tables[0];
            if (pTable.Rows.Count == 0)
            {
                return(null);
            }
            IPIPELine pPCPoint = new PIPELineClass();

            pPCPoint.FillValueByRow(pTable.Rows[0]);
            return(pPCPoint);
        }
Beispiel #2
0
        public IPIPELine[] GetConnLines()
        {
            string    sql       = string.Format("select  *  from  ps_pipe t  where  t.US_OBJECT_ID='{0}' or t.DS_OBJECT_ID='{0}'", this.ID);
            IDataBase pDataBase = SysDBUnitiy.OleDataBase;

            System.Data.DataTable ptable = pDataBase.ExecuteQuery(sql).Tables[0];

            IPIPELine[] pLines = new IPIPELine[ptable.Rows.Count];
            for (int i = 0; i < pLines.Length; i++)
            {
                IPIPELine pPIPELine = new PIPELineClass();
                pPIPELine.FillValueByRow(ptable.Rows[i]);
                pLines[i] = pPIPELine;
            }
            return(pLines);
        }