private void UpdateCustomer(SharedCustomer sharedCustomer, Customer customer) { customer.BillingAddress = sharedCustomer.BillingAddress; customer.FirstName = sharedCustomer.FullName.Split(Convert.ToChar(" "))[0]; customer.LastName = sharedCustomer.FullName.Split(Convert.ToChar(" "))[1]; customer.MasterId = sharedCustomer.Id; _customerManager.UpdateCustomer(true); }
private void AddCustomer(SharedCustomer sharedCustomer) { var customer = new Customer { BillingAddress = sharedCustomer.BillingAddress, FirstName = sharedCustomer.FullName.Split(Convert.ToChar(" "))[0], LastName = sharedCustomer.FullName.Split(Convert.ToChar(" "))[1], MasterId = sharedCustomer.Id }; _customerManager.AddCustomer(customer, true); }