Exemplo n.º 1
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);
        }
Exemplo n.º 2
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);
        }
Exemplo n.º 3
0
        public TLs GetTLDetail(int terminalID, string tlNumber)
        {
            //Get TL detail for the specified TL#
            TLs tls = null;

            try {
                tls = new TLs();
                DataSet ds = new TLViewerGateway().GetTLDetail(terminalID, tlNumber);
                if (ds != null)
                {
                    FreightDataset tlDS = new FreightDataset();
                    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(ex.Message, ex); }
            return(tls);
        }
Exemplo n.º 4
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);
        }
Exemplo n.º 5
0
        public TLs GetAgentSummary(int terminalID)
        {
            //Get an agent summary view for the specified terminal
            TLs tls = null;

            try {
                tls = new TLs();
                DataSet ds = new TLViewerGateway().GetAgentSummary(terminalID);
                if (ds != null)
                {
                    FreightDataset tlDS = new FreightDataset();
                    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(ex.Message, ex); }
            return(tls);
        }