//// ////////////////////////////////////////////////////////////////////////
        //// 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);
                }
            }
        }
        private bool StepInsuranceCompaniesNext()
        {
            int selectedCompaniesIdForInsuranceCompanies = Int32.Parse(ddlCompaniesForInsuranceCompanies.SelectedValue);
            int companyIdForInsuranceCompanies = Int32.Parse(hdfCompanyIdForInsuranceCompanies.Value);

            InsuranceCompaniesAddInsuranceCompaniesGateway insuranceCompaniesAddInsuranceCompaniesGateway = new InsuranceCompaniesAddInsuranceCompaniesGateway();

            if (insuranceCompaniesAddInsuranceCompaniesGateway.IsInLfs(selectedCompaniesIdForInsuranceCompanies, companyIdForInsuranceCompanies))
            {
                lblUserErrorMessageForInsuranceCompanies.Visible = true;
            }
            else
            {
                lblUserErrorMessageForInsuranceCompanies.Visible = false;

                // Get name
                int companiesIdForInsuranceCompanies = Int32.Parse(ddlCompaniesForInsuranceCompanies.SelectedValue);
                DateTime dateForInsuranceCompanies = DateTime.Now;

                // Insert subcontractor
                hdfNameForInsuranceCompanies.Value = GetCompanyName(companiesIdForInsuranceCompanies, companyIdForInsuranceCompanies);

                InsuranceCompaniesAddInsuranceCompanies model = new InsuranceCompaniesAddInsuranceCompanies(insuranceCompaniesAddTDS);
                model.Insert(companiesIdForInsuranceCompanies, dateForInsuranceCompanies, hdfNameForInsuranceCompanies.Value, false, companyIdForInsuranceCompanies);

                // ... Store tables
                Session["insuranceCompaniesAddTDS"] = insuranceCompaniesAddTDS;
            }
            return true;
        }
        private bool StepBeginNext()
        {
            int selectedCompaniesId = Int32.Parse(ddlCompanies.SelectedValue);
            int companyId = Int32.Parse(hdfCompanyId.Value);

            InsuranceCompaniesAddInsuranceCompaniesGateway insuranceCompaniesAddInsuranceCompaniesGateway = new InsuranceCompaniesAddInsuranceCompaniesGateway();

            if (insuranceCompaniesAddInsuranceCompaniesGateway.IsInLfs(selectedCompaniesId, companyId))
            {
                lblUserErrorMessage.Visible = true;
                return false;
            }
            else
            {
                lblUserErrorMessage.Visible = false;

                // Get name
                int companiesId = Int32.Parse(ddlCompanies.SelectedValue);
                DateTime date = DateTime.Now;

                // Insert subcontractor
                CompaniesGatewayRAF companiesGatewayRAF = new CompaniesGatewayRAF();
                companiesGatewayRAF.LoadByCompaniesId(companiesId, companyId);

                hdfName.Value = companiesGatewayRAF.GetName(companiesId);

                InsuranceCompaniesAddInsuranceCompanies model = new InsuranceCompaniesAddInsuranceCompanies(insuranceCompaniesAddTDS);
                model.Insert(companiesId, date, hdfName.Value, false,  companyId);

                // ... Store tables
                Session["insuranceCompaniesAddTDS"] = insuranceCompaniesAddTDS;
            }
            return true;
        }