private void m_GetCustomerListFromServiceButton_Click(object sender, EventArgs e) { OfflineManager manager = new OfflineManager(); ACME.POS.Service.Client.ACMECustomerWebService.Customer[] customers = manager.ReadCustomerData(); MessageBox.Show("Records returned from service : " + customers.Length.ToString()); }
private void m_SaveCustomerToServiceTestButton_Click(object sender, EventArgs e) { OfflineManager manager = new OfflineManager(); ACME.POS.Service.Client.ACMECustomerWebService.Customer[] customers = new ACME.POS.Service.Client.ACMECustomerWebService.Customer[1]; ACME.POS.Service.Client.ACMECustomerWebService.Customer customer = new ACME.POS.Service.Client.ACMECustomerWebService.Customer(); customer.FirstName = "Test"; customer.LastName = "Test"; customer.MemberSince = DateTime.Now; customer.CustomerId = 0; customer.BirthDate = DateTime.Now; customer.IsActive = true; customer.IsModified = true; customer.Addresses = new ACME.POS.Service.Client.ACMECustomerWebService.Address[1]; ACME.POS.Service.Client.ACMECustomerWebService.Address address = new ACME.POS.Service.Client.ACMECustomerWebService.Address(); address.StreetAddress = "0000 Some St."; address.AddressId = 0; address.City = "A City"; address.CustomerId = 0; address.IsPrimaryShipping = true; address.IsActive = true; address.State = "IL"; address.Zipcode = "00000"; customer.Addresses[0] = address; customer.BillingMethods = new ACME.POS.Service.Client.ACMECustomerWebService.BillingMethod[1]; ACME.POS.Service.Client.ACMECustomerWebService.BillingMethod billingMethod = new ACME.POS.Service.Client.ACMECustomerWebService.BillingMethod(); billingMethod.BillingMethodId = 0; billingMethod.CreditCardExpiration = DateTime.MinValue; billingMethod.CreditCardBillingAddressId = 0; billingMethod.CustomerId = 0; billingMethod.IsActive = true; billingMethod.NetTermDays = 30; billingMethod.PaymentMethodId = 2; customer.BillingMethods[0] = billingMethod; customers[0] = customer; manager.SaveData(customers); }