Description / Purpose: Currently adding a Location tag does not create the correct structure to link part numbers to it. The purpose of this modification is to create the customer record so we have something to hang our information on.
Overview / Processing:
- ShopController
- Create new function CreateCustomerLocation
- Input: Customer Name
- Output: Customer Entity in the form of a JSON object.
- Process:
- If Customer Name = “” bail out
- Initialize new Customer business entity. Setting Customer Name
- Call CustomerService.Create()
- This should return the customer ID it just created.
- Set the Customer Entitiy ID and return as JSON.
- Create new function CreateCustomerLocation
- In Locations.vbhtml AddNewLocation click handler.
- Once we establish that this is in-fact a new customer name, make an AJAX call to a new controller function, CreateCustomerLocation
- In the call to CreateAndAddNewTag replace newElementId with the returned customer’s ID
- _InfoItemSave.vbhtml
- CreateAddNewTag
- Remove the * from the id of the input checkbox being created.
- CreateAddNewTag
After the above changes are made, the added locations should react just as if they were existing customers in the first place.