This is probably a simple question...
I have a window with a listbox of employees and a # of textboxes for displaying or entering data. The listbox of employees is bound to an observable collection in my ViewModel, which is read from a database.
Right now I have a SelectedEmployee property that the textboxes are bound to, so if a user clicks on a existing employee it displays the existing attributes.
Now I want to add a new employee from values entered into the textboxes. My thought was a user would enter the values and then click "Add Employee".
But I'm confused as to what the textboxes would be bound to. I don't have an employee object yet and to display existing employees I have need to bind to the SelectedEmployee.
I thought about changing the work flow where a user needs to click "Add New Employee" enter the data and click "Save" but I think I run into the same issue.
I think I'm missing something obvious or my ViewModel is incorrect to support my work flow.
Any suggestions?
Thanks