Пример #1
0
        public bool UpdateRouteUnitRate(int id, string route, decimal dayRate, decimal tripRate, decimal stopRate, decimal cartonRate, decimal palletRate, decimal returnRate, decimal minAmount, decimal maxAmt, string maxTrigFld, int maxTrigVal, decimal fsBase, int status)
        {
            bool result = false;

            try {
                result = new DriverCompGateway().UpdateUnitRouteRate(id, route, dayRate, tripRate, stopRate, cartonRate, palletRate, returnRate, minAmount, maxAmt, maxTrigFld, maxTrigVal, fsBase, status);
            }
            catch (Exception ex) { throw new FaultException <DriverRatingFault>(new DriverRatingFault(ex.Message), "Service Error"); }
            return(result);
        }
Пример #2
0
        public DataSet GetLocalTerminals()
        {
            DataSet terminals = null;

            try {
                terminals = new DriverCompGateway().ReadLocalTerminals();
            }
            catch (Exception ex) { throw new FaultException <DriverRatingFault>(new DriverRatingFault(ex.Message), "Service Error"); }
            return(terminals);
        }
Пример #3
0
        public bool UpdateRouteMileageRate(int id, string route, double mile, decimal baseRate, decimal rate, int status)
        {
            bool result = false;

            try {
                result = new DriverCompGateway().UpdateMileageRouteRate(id, route, mile, baseRate, rate, status);
            }
            catch (Exception ex) { throw new FaultException <DriverRatingFault>(new DriverRatingFault(ex.Message), "Service Error"); }
            return(result);
        }
Пример #4
0
        public DataSet ReadDriverEquipment(string financeVendorID, string operatorName)
        {
            DataSet equipment = null;

            try {
                equipment = new DriverCompGateway().ReadDriverEquipment(financeVendorID, operatorName);
            }
            catch (Exception ex) { throw new FaultException <DriverCompensationFault>(new DriverCompensationFault(ex.Message), "Service Error"); }
            return(equipment);
        }
Пример #5
0
        public bool CreateVehicleUnitRate(string agentNumber, int equipmentID, DateTime effectiveDate, decimal dayRate, decimal tripRate, decimal stopRate, decimal cartonRate, decimal palletRate, decimal returnRate, decimal minAmount, decimal maxAmt, string maxTrigFld, int maxTrigVal, decimal fsBase)
        {
            bool result = false;

            try {
                result = new DriverCompGateway().CreateUnitRate(agentNumber, equipmentID, effectiveDate, dayRate, tripRate, stopRate, cartonRate, palletRate, returnRate, minAmount, maxAmt, maxTrigFld, maxTrigVal, fsBase);
            }
            catch (Exception ex) { throw new FaultException <DriverRatingFault>(new DriverRatingFault(ex.Message), "Service Error"); }
            return(result);
        }
Пример #6
0
        public bool CreateRouteMileageRate(string agentNumber, string route, DateTime effectiveDate, double mile, decimal baseRate, decimal rate, int status)
        {
            bool result = false;

            try {
                result = new DriverCompGateway().CreateMileageRouteRate(agentNumber, route, effectiveDate, mile, baseRate, rate, status);
            }
            catch (Exception ex) { throw new FaultException <DriverRatingFault>(new DriverRatingFault(ex.Message), "Service Error"); }
            return(result);
        }
Пример #7
0
        public DataSet ReadVehicleUnitRates(DateTime date, string terminalAgent, int equipmentTypeID)
        {
            DataSet rates = null;

            try {
                rates = new DriverCompGateway().ReadUnitRates(date, terminalAgent, equipmentTypeID);
            }
            catch (Exception ex) { throw new FaultException <DriverRatingFault>(new DriverRatingFault(ex.Message), "Service Error"); }
            return(rates);
        }
Пример #8
0
        public bool UpdateVehicleMileageRate(int id, int equipmentID, double mile, decimal baseRate, decimal rate)
        {
            bool result = false;

            try {
                result = new DriverCompGateway().UpdateMileageRate(id, equipmentID, mile, baseRate, rate);
            }
            catch (Exception ex) { throw new FaultException <DriverRatingFault>(new DriverRatingFault(ex.Message), "Service Error"); }
            return(result);
        }
Пример #9
0
        public bool CreateDriverEquipment(string financeVendorID, string operatorName, int equipmentID)
        {
            bool result = false;

            try {
                result = new DriverCompGateway().CreateDriverEquipment(financeVendorID, operatorName, equipmentID);
            }
            catch (Exception ex) { throw new FaultException <DriverCompensationFault>(new DriverCompensationFault(ex.Message), "Service Error"); }
            return(result);
        }
Пример #10
0
        public DataSet GetRateTypes()
        {
            DataSet types = null;

            try {
                types = new DriverCompGateway().ReadRateTypes();
            }
            catch (Exception ex) { throw new FaultException <DriverRatingFault>(new DriverRatingFault(ex.Message), "Service Error"); }
            return(types);
        }
Пример #11
0
        public DataSet ReadRouteUnitRates(DateTime date, string terminalAgent, string route)
        {
            DataSet rates = null;

            try {
                rates = new DriverCompGateway().ReadUnitRouteRates(date, terminalAgent, route);
            }
            catch (Exception ex) { throw new FaultException <DriverRatingFault>(new DriverRatingFault(ex.Message), "Service Error"); }
            return(rates);
        }
Пример #12
0
        public DataSet ReadTerminalConfigurations(string agentNumber)
        {
            DataSet configs = null;

            try {
                configs = new DriverCompGateway().ReadTerminalConfigurations(agentNumber);
            }
            catch (Exception ex) { throw new FaultException <DriverCompensationFault>(new DriverCompensationFault(ex.Message), "Service Error"); }
            return(configs);
        }
Пример #13
0
        public decimal GetFuelCost(DateTime date, string agentNumber)
        {
            decimal cost = 0.0M;

            try {
                cost = new DriverCompGateway().GetFuelCost(date, agentNumber);
            }
            catch (Exception ex) { throw new FaultException <DriverCompensationFault>(new DriverCompensationFault(ex.Message), "Service Error"); }
            return(cost);
        }
Пример #14
0
        public DataSet ReadRoadshowRoutes(string agentNumber, DateTime startDate, DateTime endDate)
        {
            //
            DataSet routes = new DataSet();

            try {
                DataSet ds = new DriverCompGateway().ReadRoadshowRoutes(agentNumber, startDate, endDate);
                routes.Merge(ds);
            }
            catch (Exception ex) { throw new FaultException <DriverCompensationFault>(new DriverCompensationFault(ex.Message), "Service Error"); }
            return(routes);
        }
Пример #15
0
        public PayPeriod GetPayPeriod(DateTime date)
        {
            PayPeriod pp = new PayPeriod();

            try {
                DataSet ds = new DriverCompGateway().ReadPayPeriod(date);
                if (ds.Tables["PayPeriodTable"] != null && ds.Tables["PayPeriodTable"].Rows.Count > 0)
                {
                    pp.Month = ds.Tables["PayPeriodTable"].Rows[0]["Month"].ToString().PadLeft(2, '0');
                    pp.Year  = ds.Tables["PayPeriodTable"].Rows[0]["Year"].ToString();
                }
            }
            catch (Exception ex) { throw new FaultException <DriverRatingFault>(new DriverRatingFault(ex.Message), "Service Error"); }
            return(pp);
        }
Пример #16
0
        public DataSet ReadDriverRoutes(string agentNumber, DateTime startDate, DateTime endDate)
        {
            //Get a list of all driver routes for this terminal and date range
            DataSet routes = new DataSet();

            try {
                DataSet ds = new DriverCompGateway().ReadDriverRoutes(agentNumber, startDate, endDate);
                if (ds.Tables["DriverRouteTable"] != null)
                {
                    ds.Tables["DriverRouteTable"].Columns.Add("IsNew", typeof(bool), "IsNewRoute=1");
                    routes.Merge(ds);
                }
            }
            catch (Exception ex) { throw new FaultException <DriverCompensationFault>(new DriverCompensationFault(ex.Message), "Service Error"); }
            return(routes);
        }
Пример #17
0
        public bool CreateDriverRoute(DriverRoute route)
        {
            bool result = false;

            try {
                //Create the TransactionScope to execute the commands, guaranteeing that both commands can commit or roll back as a single unit of work
                using (TransactionScope scope = new TransactionScope()) {
                    //
                    result = new DriverCompGateway().CreateDriverRoute(route);

                    //Commits the transaction; if an exception is thrown, Complete is not called and the transaction is rolled back
                    scope.Complete();
                }
            }
            catch (Exception ex) { throw new FaultException <DriverCompensationFault>(new DriverCompensationFault(ex.Message), "Service Error"); }
            return(result);
        }