Esempio n. 1
0
        public IEnumerable <MunicipalityDTO> GetCMunicipalities(string municipalityValue)
        {
            System.Net.ServicePointManager.ServerCertificateValidationCallback =
                ((sender, certificate, chain, sslPolicyErrors) => true);//sertifikatot ne im e u red za toa go stavam ova za da go ignorira
            var     AKNClient      = new AKNOriginalService.Service_MACEDONIAN_CADASTRESoapClient();
            DataSet municipalities = AKNClient.VRATIKATOPSDATASET(municipalityValue);

            IEnumerable <MunicipalityDTO> caadstralMunicipalityList;

            using (var stringWriter = new StringWriter())
                using (var xmlTextWriter = XmlWriter.Create(stringWriter))
                {
                    municipalities.WriteXml(xmlTextWriter);
                    xmlTextWriter.Flush();
                    var       stringDoc = stringWriter.GetStringBuilder().ToString();
                    XDocument xmlDoc    = XDocument.Parse(stringDoc);

                    caadstralMunicipalityList = xmlDoc.Root.Elements("KATOPSTINI").Select(x => new MunicipalityDTO()
                    {
                        Name  = (string)x.Element("NAZIV"),
                        Value = (int)x.Element("KOPS")
                    });
                }
            return(caadstralMunicipalityList);
        }
Esempio n. 2
0
        public AKNOriginalService.dzgr GetPropertyList(string username, string password, string opstina, string katastarskaOpstina, string brImotenList)
        {
            System.Net.ServicePointManager.ServerCertificateValidationCallback =
                ((sender, certificate, chain, sslPolicyErrors) => true);//sertifikatot ne im e u red za toa go stavam ova za da go ignorira
            var AKNClient = new AKNOriginalService.Service_MACEDONIAN_CADASTRESoapClient();
            var output    = AKNClient.VRATIPODATOCI_STRUKTURA_DZGR(username, password, opstina, katastarskaOpstina, brImotenList);

            return(output);
        }