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

            if (subcontractorChanges.Subcontractors.Rows.Count > 0)
            {
                SubcontractorsAddSubcontractorsGateway subcontractorsAddSubcontractorsGateway = new SubcontractorsAddSubcontractorsGateway(subcontractorChanges);

                foreach (SubcontractorsAddTDS.SubcontractorsRow row in (SubcontractorsAddTDS.SubcontractorsDataTable)subcontractorChanges.Subcontractors)
                {
                    //Insert companies
                    SubcontractorsResoucesSubcontractors subcontractorsResoucesSubcontractors = new SubcontractorsResoucesSubcontractors(null);
                    subcontractorsResoucesSubcontractors.InsertDirect(row.COMPANIES_ID, row.Date, row.Name, row.Active, row.Udf, row.Deleted, row.COMPANY_ID);
                }
            }
        }
        private bool StepSubcontractorsNext()
        {
            int selectedCompaniesId = Int32.Parse(ddlCompanies.SelectedValue);
            int companyIdForSubcontractors = Int32.Parse(hdfCompanyIdForSubcontractors.Value);

            SubcontractorsAddSubcontractorsGateway subcontractorsAddSubcontractorsGateway = new SubcontractorsAddSubcontractorsGateway();

            if (subcontractorsAddSubcontractorsGateway.IsInLfs(selectedCompaniesId, companyIdForSubcontractors))
            {
                lblUserErrorMessage.Visible = true;
            }
            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, companyIdForSubcontractors);
                hdfNameForSubcontractors.Value = GetCompanyName(companiesId, companyIdForSubcontractors);

                SubcontractorsAddSubcontractors model = new SubcontractorsAddSubcontractors(subcontractorsAddTDS);
                model.Insert(companiesId, date, hdfNameForSubcontractors.Value, true, companiesGatewayRAF.GetActive(companiesId), false, companyIdForSubcontractors);

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