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

            if (insuranceCompaniesChanges.InsuranceCompanies.Rows.Count > 0)
            {
                InsuranceCompaniesAddInsuranceCompaniesGateway insuranceCompaniesAddInsuranceCompaniesGateway = new InsuranceCompaniesAddInsuranceCompaniesGateway(insuranceCompaniesChanges);

                foreach (InsuranceCompaniesAddTDS.InsuranceCompaniesRow row in (InsuranceCompaniesAddTDS.InsuranceCompaniesDataTable)insuranceCompaniesChanges.InsuranceCompanies)
                {
                    //Insert companies
                    InsuranceCompanies hotels = new InsuranceCompanies(null);
                    hotels.InsertDirect(row.COMPANIES_ID, row.Date, row.Name,  row.Deleted, row.COMPANY_ID);
                }
            }
        }
        /// <summary>
        /// Save all insuranceCompanies to database (direct)
        /// </summary>
        /// <param name="companyId">companyId</param>        
        public void Save(int companyId)
        {
            InsuranceCompaniesSetupTDS subcontractorSetupChanges = (InsuranceCompaniesSetupTDS)Data.GetChanges();

            if (subcontractorSetupChanges != null)
            {
                if (subcontractorSetupChanges.InsuranceCompaniesSetup.Rows.Count > 0)
                {
                    InsuranceCompaniesSetupInsuranceCompaniesSetupGateway insuranceCompaniesSetupInsuranceCompaniesSetupGateway = new InsuranceCompaniesSetupInsuranceCompaniesSetupGateway(subcontractorSetupChanges);

                    foreach (InsuranceCompaniesSetupTDS.InsuranceCompaniesSetupRow row in (InsuranceCompaniesSetupTDS.InsuranceCompaniesSetupDataTable)subcontractorSetupChanges.InsuranceCompaniesSetup)
                    {
                        // Delete insuranceCompanies
                        if (row.Deleted)
                        {
                            InsuranceCompanies insuranceCompanies = new InsuranceCompanies(null);
                            insuranceCompanies.DeleteDirect(row.COMPANIES_ID, row.Date);
                        }
                    }
                }
            }
        }