コード例 #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);
            }
        }