Example #1
0
        public TLs GetTLView(int terminalID)
        {
            //Get a view of TLs for the specified terminal
            TLs tls = null;

            try {
                tls = new TLs();
                DataSet ds = fillDataset(USP_TLVIEW, TBL_TLVIEW, new object[] { terminalID });
                if (ds != null)
                {
                    TLViewDS tlDS = new TLViewDS();
                    tlDS.Merge(ds);
                    for (int i = 0; i < tlDS.TLTable.Rows.Count; i++)
                    {
                        TL tl = new TL(tlDS.TLTable[i]);
                        tls.Add(tl);
                    }
                }
            }
            catch (Exception ex) { throw new ApplicationException("Unexpected error while reading TL's.", ex); }
            return(tls);
        }
Example #2
0
        public TLs GetTLDetail(int terminalID, string tlNumber)
        {
            //Get TL detail for the specified TL#
            TLs tls = null;

            try {
                tls = new TLs();
                DataSet ds = fillDataset(USP_TLDETAIL, TBL_TLDETAIL, new object[] { terminalID, tlNumber });
                if (ds != null)
                {
                    TLViewDS tlDS = new TLViewDS();
                    tlDS.Merge(ds);
                    for (int i = 0; i < tlDS.TLTable.Rows.Count; i++)
                    {
                        TL tl = new TL(tlDS.TLTable[i]);
                        tls.Add(tl);
                    }
                }
            }
            catch (Exception ex) { throw new ApplicationException("Unexpected error while reading TL detail.", ex); }
            return(tls);
        }
Example #3
0
        public TLs GetAgentSummary(int terminalID)
        {
            //Get an agent summary view for the specified terminal
            TLs tls = null;

            try {
                tls = new TLs();
                DataSet ds = fillDataset(USP_AGENTSUMMARY, TBL_AGENTSUMMARY, new object[] { terminalID });
                if (ds != null)
                {
                    TLViewDS tlDS = new TLViewDS();
                    tlDS.Merge(ds);
                    for (int i = 0; i < tlDS.TLTable.Rows.Count; i++)
                    {
                        TL tl = new TL(tlDS.TLTable[i]);
                        tls.Add(tl);
                    }
                }
            }
            catch (Exception ex) { throw new ApplicationException("Unexpected error while reading agent summary.", ex); }
            return(tls);
        }