public Domain GetDomain(DomainModel domainModel)
        {
            Domain domain = new Domain();

            Environment.set_Ambiente(domainModel.name);
            domain.name = domainModel.name;
            domain.language = Environment.LeerVarAmbienteEx("", "Idioma");
            domain.connectionType = Convert.ToInt32(Environment.LeerVarAmbienteEx("", "WebTipoconexion"));
            domain.securityLevel = ((Environment.LeerVarAmbienteEx("", "Nvlseg")) != "") ? Convert.ToInt32(Environment.LeerVarAmbienteEx("", "Nvlseg")) : 0;
            domain.webEnvironment = Environment.LeerVarAmbienteEx("", "WebAmbientes");

            return domain;
        }
        public List<DomainModel> GetEnvironments()
        {
            var myList = new List<DomainModel>();

            for (int i = 1; i <= CountEnvironments(); i++)
            {
                DomainModel domain = new DomainModel();
                domain.name = Environment[i];
                myList.Add(domain);
            }

            return myList;
        }