コード例 #1
0
ファイル: DriverCompService.cs プロジェクト: jpheary/Argix10
        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
ファイル: DriverCompService.cs プロジェクト: jpheary/Argix10
        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
ファイル: DriverCompService.cs プロジェクト: jpheary/Argix10
        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
ファイル: DriverCompService.cs プロジェクト: jpheary/Argix10
        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
ファイル: DriverCompService.cs プロジェクト: jpheary/Argix10
        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
ファイル: DriverCompService.cs プロジェクト: jpheary/Argix10
        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
ファイル: DriverCompService.cs プロジェクト: jpheary/Argix10
        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
ファイル: DriverCompService.cs プロジェクト: jpheary/Argix10
        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
ファイル: DriverCompService.cs プロジェクト: jpheary/Argix10
        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
ファイル: DriverCompService.cs プロジェクト: jpheary/Argix10
        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
ファイル: DriverCompService.cs プロジェクト: jpheary/Argix10
        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
ファイル: DriverCompService.cs プロジェクト: jpheary/Argix10
        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
ファイル: DriverCompService.cs プロジェクト: jpheary/Argix10
        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
ファイル: DriverCompService.cs プロジェクト: jpheary/Argix10
        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
ファイル: DriverCompService.cs プロジェクト: jpheary/Argix10
        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
ファイル: DriverCompService.cs プロジェクト: jpheary/Argix10
        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
ファイル: DriverCompService.cs プロジェクト: jpheary/Argix10
        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);
        }