Please note: In an effort to better serve you, we are in the process of restructuring DevCenter.
In the process, we have moved many items that you may be used to finding in DevCenter over to the
Main Site. If you are having trouble locating something,
please try looking at the following places:
The Build Chart method accepts a string that represents the value of an entity which will be used to build a SQL query so that we can fetch the appropriate chart data. The value of the parameter represents a field from each of the different entities which vary from drill level to drill level. For example, if we are on “Level 1”, we do not even need to pass in a value, we just pass in Null or Nothing because at “Level 1”, we simply load all customers. If we are on “Level 2”, the method parameter reflects one particular CustomerID, which is an attribute of the Customer entity. On “Level 3”, the same parameter represents the Order ID of the Order entity. The main point is that for each level, we must clearly define what entity attribute is represented by the parameter so that all we have to do in code is use the drill level along with the parameter value to build a query that fetches data from the appropriate database tables.Notice the simple pattern being used for the case of each drill level. We build a query and SqlCommand object, we then set the Chart properties, we then get the Data and bind it to the Chart and finally, we update each UI and navigation element so that it makes sense for that drill level. When we think about it, this makes sense; if we are on “Level 1”, the root Link Label should not be enabled. We should not be able to click on Link Label 1 to go to “Level 1” because at this point, we are already at that level. If we are on “Level 2”, Link Label 1 should be enabled so that we can navigate back and Link Label 2 should now have text that represents the customer that we clicked on from “Level 1”; also Link Label 2 should be disabled. Additionally, we must only see Link Labels up to the current drill level; we should not see Link Labels for drill levels that we have not navigated to yet. ..Continued..