コード例 #1
0
        public bool SaveCompensation()
        {
            //Save
            bool result = false;

            try {
                //Save all new routes
                for (int i = 0; i < this.mCompensation.DriverRouteTable.Rows.Count; i++)
                {
                    //Validate route as new (NULL Import date)
                    if (this.mCompensation.DriverRouteTable[i].IsImportedNull())
                    {
                        DriverCompDataset.DriverRouteTableRow driverRoute = this.mCompensation.DriverRouteTable[i];
                        driverRoute.Imported = DateTime.Now;
                        result = FinanceGateway.CreateDriverRoute(driverRoute);
                    }
                }
                ViewCompensation();
            }
            catch (ApplicationException ex) { throw ex; }
            catch (Exception ex) { throw new ApplicationException(ex.Message, ex); }
            return(result);
        }