Beispiel #1
0
        public AppAddresss GetAddress(string addressid, string companyid, string objectid)
        {
            ApplicationService.address address = new ApplicationService.address();
            AppAddresss returnaddress          = new AppAddresss();

            try
            {
                address       = appclient.GetAddres(companyid, objectid, addressid, "address");
                returnaddress = AppAddresss.ConvertServiceAddressToAppAddress(address);
            }
            catch
            {
            }
            return(returnaddress);
        }
Beispiel #2
0
        public static AppAddresss ConvertServiceAddressToAppAddress(ApplicationService.address serviceAddress)
        {
            AppAddresss tempaddress = new AppAddresss();

            tempaddress.id         = serviceAddress.addressid;
            tempaddress.objectid   = serviceAddress.objectid;
            tempaddress.companyid  = serviceAddress.creatorid;
            tempaddress.line1      = serviceAddress.addressline1;
            tempaddress.line2      = serviceAddress.addressline2;
            tempaddress.landmark   = serviceAddress.landmark;
            tempaddress.city       = serviceAddress.city;
            tempaddress.state      = serviceAddress.state;
            tempaddress.country    = serviceAddress.country;
            tempaddress.zipcode    = serviceAddress.zipcode;
            tempaddress.objecttype = serviceAddress.objecttype;

            return(tempaddress);
        }
Beispiel #3
0
        public static List <AppAddresss> ConvertServiceAddressesToAppAddresses(List <ApplicationService.address> addresses)
        {
            List <AppAddresss> tempaddresses = new List <AppAddresss>();

            foreach (ApplicationService.address item in addresses)
            {
                AppAddresss tempaddress = new AppAddresss();

                tempaddress.id         = item.addressid;
                tempaddress.objectid   = item.objectid;
                tempaddress.companyid  = item.creatorid;
                tempaddress.line1      = item.addressline1;
                tempaddress.line2      = item.addressline2;
                tempaddress.landmark   = item.landmark;
                tempaddress.city       = item.city;
                tempaddress.state      = item.state;
                tempaddress.country    = item.country;
                tempaddress.zipcode    = item.zipcode;
                tempaddress.objecttype = item.objecttype;
                tempaddresses.Add(tempaddress);
            }

            return(tempaddresses);
        }
        public AppAddresss GetAddress(string addressid, string companyid, string objectid)
        {
            ApplicationService.address address = new ApplicationService.address();
            AppAddresss returnaddress = new AppAddresss();
            try
            {
                address = appclient.GetAddres(companyid, objectid, addressid, "address");
                returnaddress = AppAddresss.ConvertServiceAddressToAppAddress(address);
            }
            catch
            {

            }
            return returnaddress;
        }
        public static AppAddresss ConvertServiceAddressToAppAddress(ApplicationService.address serviceAddress)
        {
            AppAddresss tempaddress = new AppAddresss();
            tempaddress.id = serviceAddress.addressid;
            tempaddress.objectid = serviceAddress.objectid;
            tempaddress.companyid = serviceAddress.creatorid;
            tempaddress.line1 = serviceAddress.addressline1;
            tempaddress.line2 = serviceAddress.addressline2;
            tempaddress.landmark = serviceAddress.landmark;
            tempaddress.city = serviceAddress.city;
            tempaddress.state = serviceAddress.state;
            tempaddress.country = serviceAddress.country;
            tempaddress.zipcode = serviceAddress.zipcode;
            tempaddress.objecttype = serviceAddress.objecttype;

            return tempaddress;
        }
        public static List<AppAddresss> ConvertServiceAddressesToAppAddresses(List<ApplicationService.address> addresses)
        {
            List<AppAddresss> tempaddresses = new List<AppAddresss>();

            foreach (ApplicationService.address item in addresses)
            {
                AppAddresss tempaddress = new AppAddresss();

                tempaddress.id = item.addressid;
                tempaddress.objectid = item.objectid;
                tempaddress.companyid = item.creatorid;
                tempaddress.line1 = item.addressline1;
                tempaddress.line2 = item.addressline2;
                tempaddress.landmark = item.landmark;
                tempaddress.city = item.city;
                tempaddress.state = item.state;
                tempaddress.country = item.country;
                tempaddress.zipcode = item.zipcode;
                tempaddress.objecttype = item.objecttype;
                tempaddresses.Add(tempaddress);
            }

            return tempaddresses;
        }
Beispiel #7
0
        public List <AppAddresss> GetAddresses(string companyid, string objectid)
        {
            ApplicationService.address[] addresses = appclient.GetAddress(companyid, objectid);

            return(AppAddresss.ConvertServiceAddressesToAppAddresses(addresses.ToList()));
        }