0

I select query then convert it to dictionary contains key and value i fill combobox with this dictionary but i want to update the select collection not select new query every time

example: first time select query and fill combobox second time check if data in database has changed reselect or update the selected collection

var db = new Smart_M_DataDataContext();
if (db.DatabaseExists())
            {
                Employeeinf = (from a in db.Employees  select new { a.Employee_ID, a.Employee_Name }).ToDictionary(c => c.Employee_ID, c => c.Employee_Name);
            }
combobox.itemsource=Employeeinf ;

how to update Employeeinf object if data has Changed in table

Zenwalker
  • 1,847
  • 1
  • 13
  • 24
  • 2
    Not sure if this helps, you could subscribe for Table update notifications and then do what ever changes you wanted as explained here http://stackoverflow.com/questions/15225147/watch-for-a-table-new-records-in-sql-database – Zenwalker Dec 10 '13 at 04:18
  • thank you but i need funcation check if my selected object is contain the same data in database when i press in combobox – Hassan Sabra Dec 10 '13 at 08:40

0 Answers0