Dependent dropdown picklist for aspnetzero application

50 views Asked by At

Trying to configure a dependent dropdown picklist for my aspnetzero application. Specs are as follows: framework: aspnetzero (latest verson)

Table 1: Customer Table 2: Location Table 3: Order Table 4; OrderLocation

Customer can have many locations. Therefore, the customer table uses a master-detail layout with Location (this is working fine). Both customer and location are set up as lookups in the OrderLocation table.

Orders can have only one customer but many locations, and the OrderLocation table provides tracking/status for each location in the order. Therefore, customer is a lookup field in the order table.

I want use one of the Metronic wizard layouts. When I create a new order, I want to be able to select the customer from the picklist. Then next screen will take me to the OrderLocation table where I want to select locations based only on the customer identified in the Order table.

I’ve seen several similar questions on here as well as the aspnetzero support page, but I haven’t seen anything similar enough for me to replicate. Mainly because I am new to aspnetzero and there is a learning curve with respect to the flow of data from database to angular. I am not the strongest with Angular, but I am using Angular because it appears to be “easier” to manipulate certain aspects within the DDD/aspnetzero framework.

Using this link as a guide: https://stackblitz.com/edit/cascading-dropdown-angular?file=app%2Fapp.component.ts

I have not made any modifications to the files generated by aspnetzero PowerTools within Visual Studio, so given the parameters above, I believe I need to change selectedCountry to _orderLocationServiceProxy,

The countries variable will need to be changed to order, and the states variable will need to be changed to location; however, I can not figure out the changes necessary for Country[] and State[] within the aspnetzero framework.

I assumed it would be something similar to _orderLocationServiceProxy.getAll(), but that does not work.

I know changes will also need to be made for the onSelect syntax as well, but I haven’t been able to try anything because I haven’t gotten the above working yet.

As previously indicated, I have searched stackoverflow and their support forum, but I have not been able to isolate my specific use case.

0

There are 0 answers