//// ////////////////////////////////////////////////////////////////////////
        //// PRIVATE METHODS
        ////
        /// <summary>
        /// Save all bondingCompanies to database (direct)
        /// </summary>
        /// <param name="companyId">companyId</param>        
        public void Save(int companyId)
        {
            BondingCompaniesAddTDS bondingCompaniesChanges = (BondingCompaniesAddTDS)Data.GetChanges();

            if (bondingCompaniesChanges.BondingCompanies.Rows.Count > 0)
            {
                BondingCompaniesAddBondingCompaniesGateway bondingCompaniesAddBondingCompaniesGateway = new BondingCompaniesAddBondingCompaniesGateway(bondingCompaniesChanges);

                foreach (BondingCompaniesAddTDS.BondingCompaniesRow row in (BondingCompaniesAddTDS.BondingCompaniesDataTable)bondingCompaniesChanges.BondingCompanies)
                {
                    //Insert companies
                    BondingCompanies hotels = new BondingCompanies(null);
                    hotels.InsertDirect(row.COMPANIES_ID, row.Date, row.Name,  row.Deleted, row.COMPANY_ID);
                }
            }
        }
        /// <summary>
        /// Save all bondingCompanies to database (direct)
        /// </summary>
        /// <param name="companyId">companyId</param>        
        public void Save(int companyId)
        {
            BondingCompaniesSetupTDS subcontractorSetupChanges = (BondingCompaniesSetupTDS)Data.GetChanges();

            if (subcontractorSetupChanges != null)
            {
                if (subcontractorSetupChanges.BondingCompaniesSetup.Rows.Count > 0)
                {
                    BondingCompaniesSetupBondingCompaniesSetupGateway bondingCompaniesSetupBondingCompaniesSetupGateway = new BondingCompaniesSetupBondingCompaniesSetupGateway(subcontractorSetupChanges);

                    foreach (BondingCompaniesSetupTDS.BondingCompaniesSetupRow row in (BondingCompaniesSetupTDS.BondingCompaniesSetupDataTable)subcontractorSetupChanges.BondingCompaniesSetup)
                    {

                        // Delete bondingCompanies
                        if (row.Deleted)
                        {
                            BondingCompanies bondingCompanies = new BondingCompanies(null);
                            bondingCompanies.DeleteDirect(row.COMPANIES_ID, row.Date);
                        }
                    }
                }
            }
        }