public DesignTimeEmployeeInsertViewModel() { ViewData = new EmployeeInsertViewData() { FirstName = "Insert First Name", LastName = "Insert Last Name", Email = "Insert Email Address", City = "Insert City Name" }; ViewData = new EmployeeInsertViewData(); }
public void InsertEmployee(EmployeeInsertViewData data) { Employee emp = new Employee() { FirstName = data.FirstName, LastName = data.LastName, Email = data.Email, City = data.City }; empRep.InsertAction(emp); context_db.SaveChanges(); Messenger.NotifyColleagues(MessageTypes.MSG_EMPLOYEE_INSERTED, data); }