예제 #1
0
        public static DriverRatesDS GetMileageRouteRates(DateTime date, string terminalAgent, string route)
        {
            //Return applicable route-based mileage rates for the specified date
            DriverRatesDS rates = new DriverRatesDS();

            try {
                DataSet ds = Mediator.FillDataset(USP_RATEMILEAGEROUTE, TBL_RATEMILEAGEROUTE, new object[] { date, terminalAgent, route });
                if (ds.Tables[TBL_RATEMILEAGEROUTE].Rows.Count > 0)
                {
                    rates.Merge(ds);
                }
            }
            catch (ApplicationException ex) { throw ex; }
            catch (Exception ex) { throw new DriverRateException("Unexpected error while reading rates.", ex); }
            return(rates);
        }
예제 #2
0
        public DriverRatesDS GetUnitRouteRates(DateTime date, string terminalAgent, string route)
        {
            //Return applicable route-based unit rates (i.e. multi-trip, carton, pallet) for the specified date
            DriverRatesDS rates = new DriverRatesDS();

            try {
                DataSet ds = new DataService().FillDataset(this.mConnectionID, USP_RATEUNITROUTE, TBL_RATEUNITROUTE, new object[] { date, terminalAgent, route });
                if (ds.Tables[TBL_RATEUNITROUTE].Rows.Count > 0)
                {
                    rates.Merge(ds);
                }
            }
            catch (ApplicationException ex) { throw ex; }
            catch (Exception ex) { throw new DriverRateException("Unexpected error while reading rates.", ex); }
            return(rates);
        }
예제 #3
0
        public DriverRatesDS GetMileageRates(DateTime date, string terminalAgent, int equipmentTypeID)
        {
            //Return applicable mileage rates for the specified date
            DriverRatesDS rates = new DriverRatesDS();

            try {
                object id = null; if (equipmentTypeID > -1)
                {
                    id = equipmentTypeID;
                }
                DataSet ds = new DataService().FillDataset(this.mConnectionID, USP_RATEMILEAGE, TBL_RATEMILEAGE, new object[] { date, terminalAgent, id });
                if (ds.Tables[TBL_RATEMILEAGE].Rows.Count > 0)
                {
                    rates.Merge(ds);
                }
            }
            catch (ApplicationException ex) { throw ex; }
            catch (Exception ex) { throw new DriverRateException("Unexpected error while reading rates.", ex); }
            return(rates);
        }
예제 #4
0
        public static DriverRatesDS GetUnitRates(DateTime date, string terminalAgent, int equipmentTypeID)
        {
            //Return applicable unit rates (i.e. multi-trip, carton, pallet) for the specified date
            DriverRatesDS rates = new DriverRatesDS();

            try {
                object id = null; if (equipmentTypeID > -1)
                {
                    id = equipmentTypeID;
                }
                DataSet ds = Mediator.FillDataset(USP_RATEUNIT, TBL_RATEUNIT, new object[] { date, terminalAgent, id });
                if (ds.Tables[TBL_RATEUNIT].Rows.Count > 0)
                {
                    rates.Merge(ds);
                }
            }
            catch (ApplicationException ex) { throw ex; }
            catch (Exception ex) { throw new DriverRateException("Unexpected error while reading rates.", ex); }
            return(rates);
        }