示例#1
0
        public static void UpdateCustomer(EditableWorldCustomer customer)
        {
            EditableWorldCustomer editableCustomer = GetEditableCustomerByID(customer.CustomerId);

            if (editableCustomer == null)
            {
                return;
            }
            editableCustomer.CustomerName = customer.CustomerName;
            editableCustomer.CountryId    = customer.CountryId;
            editableCustomer.CityId       = customer.CityId;
        }
示例#2
0
        public static void InsertCustomer(EditableWorldCustomer customer)
        {
            var newCustomer = new EditableWorldCustomer()
            {
                CustomerId   = GetNewEditableCustomerID(),
                CustomerName = customer.CustomerName,
                CountryId    = customer.CountryId,
                CityId       = customer.CityId
            };

            GetEditableCustomers().Add(newCustomer);
        }