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

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

            companyName = companiesGatewayRAF.GetName(companiesId);

            return companyName;
        }
Exemplo n.º 2
0
        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;
        }