private string GetCompanyName(int companiesId, int companyId)
        {
            string companyName = "";

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

            companyName = companiesGatewayRAF.GetName(companiesId);

            return companyName;
        }
        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;
        }
        private bool StepBeginNext()
        {
            int selectedCompaniesId = Int32.Parse(ddlCompanies.SelectedValue);
            int companyId = Int32.Parse(hdfCompanyId.Value);

            HotelsAddHotelsGateway hotelsAddHotelsGateway = new HotelsAddHotelsGateway();

            if (hotelsAddHotelsGateway.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);

                HotelsAddHotels model = new HotelsAddHotels(hotelsAddTDS);
                model.Insert(companiesId, date, hdfName.Value, false, companyId);

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