예제 #1
0
 public async Task <List <Survelem> > GetSurvelems(Customer customer, Address address)
 {
     return(await LoadWithPaging <Survelem, GetSurvelemsReply, HuntersWP.ServiceReference.Survelem>((i) =>
     {
         return new MyServiceClient().GetSurvelems(i, customer.CustomerSurveyID, address.UPRN);
     },
                                                                                                    r => r.Items));
 }
예제 #2
0
        async Task DownloadSurvelemsForAddress(Customer customer, Address address, bool alwaysInsert)
        {
            var survelems = await new DataLoaderService().GetSurvelems(customer, address);


            if (alwaysInsert)
            {
                await new DbService().Insert(survelems);
            }
            else
            {
                await new DbService().Save(survelems);
            }
        }