Quote:AddNew cannot be called on the 'Company.BLL.Entity.Employee' type. This type does not have a public default constructor. You can call AddNew on the 'Company.BLL.Entity.Employee' type if you handle the AddingNew event and create the appropriate object.
employeeBindingSource.AllowNew = true; employeeBindingSource.AddNew(); EmployeeManager.InsertEmployee( (employeeBindingSource.Current as Employee).Name, (employeeBindingSource.Current as Employee).Salary, (employeeBindingSource.Current as Employee).DepartmentID, (employeeBindingSource.Current as Employee).Age );
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)