I have a window which displays sales between a certain time in a restaurant/shop. When the user selects the time period to query, it shows sales data between that time. I am also Programatically creating a list of users which one can then select to filter a query. For example, I choose the 'Michael' user which is then used to show all sales that have been attributed to him (in the time frame previously selected).
Creating the ListView
of users is fairly easy but I am trying to append this list with an item which would read 'All Users'. This would then be passed back to the query, which would then recognize this user by some Property (UserId = 999 or whatever. Not important) to populate the page with the data of all users again.
Right now I have to exit the page and go back in to do this. Not very elegant!
I was going to append a User
object in the ViewModel
to the list that is generated from the database EF but it creates a list of IUsers
so I can't instantiate an actual instance of it (maybe I am being incredibly stupid here and am missing something fundamental?).
Any help in achieving this goal would be most appreciated.