private void buttonAdd_Click(object sender, EventArgs e) { EmployeesProxyStub emp = new EmployeesProxyStub(); emp.FirstName = "Mr."; emp.LastName = "EntitySpaces"; coll.Collection.Add(emp); }
private void AddButton_Click(object sender, RoutedEventArgs e) { if (employees == null) { employees = new EmployeesCollectionProxyStub(); EmployeesDataGrid.ItemsSource = employees.Collection; } if (RecordsAdded++ < 5) { EmployeesProxyStub newEmp = new EmployeesProxyStub(); newEmp.FirstName = "Scott"; newEmp.LastName = "Schecter"; employees.Collection.Add(newEmp); } }