public static Customers convertCustomer(CustomerBaseRepresentation customer) { // TODO: Implement concurency checking (rowVersion) var convertedCustomer = new Customers() { customerID = customer.id, comment = customer.comment, customerAddress = customer.customerAddress, customerName = customer.customerName, customerPhone = customer.customerPhone, defaultDiscount = customer.defaultDiscount * 100, IDNumber = customer.IDNumber, isDeleted = customer.isDeleted, isFirm = customer.isFirm, problems = customer.problems, rentCounter = customer.rentCounter, serviceCounter = customer.serviceCounter }; if (customer.GetType() == typeof(PersonRepresentation)) { convertedCustomer.birthDate = ((PersonRepresentation)customer).birthDate; convertedCustomer.mothersName = ((PersonRepresentation)customer).mothersName; convertedCustomer.workPlace = ((PersonRepresentation)customer).workplace; } if (customer.city != null) { convertedCustomer.cityID = customer.city.id; } return convertedCustomer; }
private void addContact(CustomerBaseRepresentation c) { DataProxy.Instance.AddContact(selectedCustomer, c); refreshContacts(); }
public static void Send(CustomerBaseRepresentation selectedCustomer) { Messenger.Default.Send(selectedCustomer, MessageTypes.customerToSelect); }
public static void Send(CustomerBaseRepresentation selectedContactPerson) { Messenger.Default.Send(selectedContactPerson, MessageTypes.contactSelected); }