Example #1
0
        public CadastralParcelDTO GetCadastralParcel(string username, string password, string municipality, string cadastralMunicipality, string noCadastralParcel)
        {
            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 AKNServiceClient();
            var cadastralParcel = new ATRparceli();


            cadastralParcel = AKNClient.GetCadastrialParcel(username, password, municipality, cadastralMunicipality, noCadastralParcel);



            List <ParcelAttributes> attributes = new List <ParcelAttributes>();

            foreach (var parcel in cadastralParcel.nizparField)
            {
                var attribute = new ParcelAttributes()
                {
                    Area         = parcel.povrsinaField,
                    Location     = parcel.mestoField,
                    Culture      = parcel.kulturaField,
                    Object       = parcel.objektField,
                    PartNumber   = parcel.broj_delField,
                    PropertyList = parcel.ilistField,
                    Pravo        = parcel.pravoField
                };
                attributes.Add(attribute);
            }

            var cadastralParcelDto = new CadastralParcelDTO
            {
                AttributesList = attributes,
                Message        = cadastralParcel.messageField
            };

            return(cadastralParcelDto);
        }
Example #2
0
        private static void CallService(string institutionName)
        {
            switch (institutionName)
            {
            case "MON":
            {
                var client = new FPIOMServiceClient();
                client.GetDataForRetired("0606949469013");
                break;
            }

            case "MZTV":
            {
                var client = new YearsOfWorkExperienceClient();
                client.GetYWExpXML("1604991455147");
                break;
            }

            case "FPIOM":
            {
                var client = new SRegStudentClient();
                client.GetStuS("1810997495034");
                break;
            }

            case "CRRM":
            {
                var client = new AKNServiceClient();
                client.GetCadastrialParcel("mio", "katastarservis", "1", "1", "2");
                break;
            }

            case "CURM":
            {
                var client = new AKNServiceClient();
                client.GetCadastrialParcel("mio", "katastarservis", "1", "1", "2");
                break;
            }

            case "AVRM":
            {
                var client = new YearsOfWorkExperienceClient();
                client.GetYWExpXML("1604991455147");
                break;
            }

            case "UJP":
            {
                var client = new MzTVAdapterClient();
                client.ConsPerm("УП 221/2014", "2", "108", null, null);
                break;
            }

            case "AKN":
            {
                var client = new CRMServiceClient();
                client.GetTekovnaSostojba(_signedCertificate);
                break;
            }

            case "MVR":
            {
                var client = new YearsOfWorkExperienceClient();
                client.GetYWExpXML("1604991455147");
                break;
            }

            case "FZOM":
            {
                var client = new CRMServiceClient();
                client.GetTekovnaSostojba(_signedCertificate);
                break;
            }

            case "UIPR":
            {
                var client = new AKNServiceClient();
                client.GetCadastrialParcel("mio", "katastarservis", "1", "1", "2");
                break;
            }

            case "GS":
            {
                var client = new FPIOMServiceClient();
                client.GetDataForRetired("0606949469013");
                break;
            }

            case "MTSP":
            {
                var client = new SRegStudentClient();
                client.GetStuS("1810997495034");
                break;
            }

            case "OSS2":
            {
                var client = new FPIOMServiceClient();
                client.GetDataForRetired("0606949469013");
                break;
            }

            case "USS":
            {
                var client = new SRegStudentClient();
                client.GetStuS("1810997495034");
                break;
            }

            default:
            {
                Thread.Sleep(2000);
                break;
            }
            }
        }