Index: ActiviteitenOpvolging/ActiviteitenOpvolging/domain/managers/implementations/WorkItemManager.vb =================================================================== diff -u -r1731 -r1736 --- ActiviteitenOpvolging/ActiviteitenOpvolging/domain/managers/implementations/WorkItemManager.vb (.../WorkItemManager.vb) (revision 1731) +++ ActiviteitenOpvolging/ActiviteitenOpvolging/domain/managers/implementations/WorkItemManager.vb (.../WorkItemManager.vb) (revision 1736) @@ -5,4 +5,16 @@ Public Function GiveWorkItems(workPostIndex As Integer, employees As List(Of IEmployee)) As ICollection(Of IWorkItem) Implements IWorkItemManager.GiveWorkItems Return CacheMapper.GetData(workPostIndex, employees) End Function + + Public Sub StartActivity(activity As IActivity, employee As IEmployee) Implements IWorkItemManager.StartActivity + Throw New NotImplementedException("Activity start...") + End Sub + + Public Sub FinishActivity(activity As IActivity) Implements IWorkItemManager.FinishActivity + Throw New NotImplementedException("Activity finish...") + End Sub + + Public Sub StopActivity(activity As IActivity) Implements IWorkItemManager.StopActivity + Throw New NotImplementedException("Activity stop...") + End Sub End Class Index: ActiviteitenOpvolging/ActiviteitenOpvolging/screens/employee/details/EmployeeDetailUserControl.vb =================================================================== diff -u -r1728 -r1736 --- ActiviteitenOpvolging/ActiviteitenOpvolging/screens/employee/details/EmployeeDetailUserControl.vb (.../EmployeeDetailUserControl.vb) (revision 1728) +++ ActiviteitenOpvolging/ActiviteitenOpvolging/screens/employee/details/EmployeeDetailUserControl.vb (.../EmployeeDetailUserControl.vb) (revision 1736) @@ -124,7 +124,7 @@ Try _parentUserControl.StopActivity() Catch ex As Exception - MessageBox.Show($"Could not pauze activity.{vbNewLine}{ex.Message}", "An error occured...", MessageBoxButtons.OK, MessageBoxIcon.Error) + MessageBox.Show($"Could not stop activity.{vbNewLine}{ex.Message}", "An error occured...", MessageBoxButtons.OK, MessageBoxIcon.Error) End Try End Sub Index: ActiviteitenOpvolging/ActiviteitenOpvolging/ActiviteitenOpvolgingForm.vb =================================================================== diff -u -r1735 -r1736 --- ActiviteitenOpvolging/ActiviteitenOpvolging/ActiviteitenOpvolgingForm.vb (.../ActiviteitenOpvolgingForm.vb) (revision 1735) +++ ActiviteitenOpvolging/ActiviteitenOpvolging/ActiviteitenOpvolgingForm.vb (.../ActiviteitenOpvolgingForm.vb) (revision 1736) @@ -199,5 +199,17 @@ Return _domainController.GetSelectedEmployee(employeeIndex) End Function + Public Sub StartActivity(employee As IEmployee) Implements IEmployeesMainForm.StartActivity + _domainController.StartActivity(_selectedActivity, employee) + End Sub + + Public Sub FinishActivity() Implements IEmployeesMainForm.FinishActivity + _domainController.FinishActivity(_selectedActivity) + End Sub + + Public Sub StopActivity() Implements IEmployeesMainForm.StopActivity + _domainController.StopActivity(_selectedActivity) + End Sub + #End Region End Class Index: ActiviteitenOpvolging/ActiviteitenOpvolging/domain/controllers/DomainController.vb =================================================================== diff -u -r1733 -r1736 --- ActiviteitenOpvolging/ActiviteitenOpvolging/domain/controllers/DomainController.vb (.../DomainController.vb) (revision 1733) +++ ActiviteitenOpvolging/ActiviteitenOpvolging/domain/controllers/DomainController.vb (.../DomainController.vb) (revision 1736) @@ -62,6 +62,19 @@ Function GiveWorkItems(workPostIndex As Integer) As ICollection(Of IWorkItem) Implements IDomainController.GiveWorkItems Return _workItemManager.GiveWorkItems(workPostIndex, _employeeManager.Employees.ToList()) End Function + + Public Sub StartActivity(activity As IActivity, employee As IEmployee) Implements IDomainController.StartActivity + _workItemManager.StartActivity(activity, employee) + End Sub + + Public Sub FinishActivity(activity As IActivity) Implements IDomainController.FinishActivity + _workItemManager.FinishActivity(activity) + End Sub + + Public Sub StopActivity(activity As IActivity) Implements IDomainController.StopActivity + _workItemManager.StopActivity(activity) + End Sub + #End Region End Class Index: ActiviteitenOpvolging/ActiviteitenOpvolging/screens/IEmployeesMainForm.vb =================================================================== diff -u -r1726 -r1736 --- ActiviteitenOpvolging/ActiviteitenOpvolging/screens/IEmployeesMainForm.vb (.../IEmployeesMainForm.vb) (revision 1726) +++ ActiviteitenOpvolging/ActiviteitenOpvolging/screens/IEmployeesMainForm.vb (.../IEmployeesMainForm.vb) (revision 1736) @@ -24,4 +24,8 @@ ''' ''' The selected employee if there is one. 'Nothing' if there wasn't one. Function GetSelectedEmployee(employeeIndex As Integer) As IEmployee + + Sub StartActivity(employee As IEmployee) + Sub FinishActivity() + Sub StopActivity() End Interface Index: ActiviteitenOpvolging/ActiviteitenOpvolging/domain/managers/IworkItemManager.vb =================================================================== diff -u -r1731 -r1736 --- ActiviteitenOpvolging/ActiviteitenOpvolging/domain/managers/IworkItemManager.vb (.../IworkItemManager.vb) (revision 1731) +++ ActiviteitenOpvolging/ActiviteitenOpvolging/domain/managers/IworkItemManager.vb (.../IworkItemManager.vb) (revision 1736) @@ -5,4 +5,10 @@ ''' The index of the work post, 0 based ''' Collection of the work items Function GiveWorkItems(workPostIndex As Integer, employees As List(Of IEmployee)) As ICollection(Of IWorkItem) + + Sub StartActivity(activity As IActivity, employee As IEmployee) + + Sub FinishActivity(activity As IActivity) + + Sub StopActivity(activity As IActivity) End Interface Index: ActiviteitenOpvolging/ActiviteitenOpvolging/domain/controllers/IDomainController.vb =================================================================== diff -u -r1718 -r1736 --- ActiviteitenOpvolging/ActiviteitenOpvolging/domain/controllers/IDomainController.vb (.../IDomainController.vb) (revision 1718) +++ ActiviteitenOpvolging/ActiviteitenOpvolging/domain/controllers/IDomainController.vb (.../IDomainController.vb) (revision 1736) @@ -32,7 +32,7 @@ ''' Deselect an employee. ''' ''' The number (index) of an employee, 0 based - sub DeselectEmployee(employeeNumber As Integer) + Sub DeselectEmployee(employeeNumber As Integer) #End Region #Region "Work items" @@ -42,5 +42,11 @@ ''' The index of the work post, 0 based ''' Collection of the work items Function GiveWorkItems(workPostIndex As Integer) As ICollection(Of IWorkItem) + + Sub StartActivity(activity As IActivity, employee As IEmployee) + + Sub FinishActivity(activity As IActivity) + + Sub StopActivity(activity As IActivity) #End Region End Interface Index: ActiviteitenOpvolging/ActiviteitenOpvolging/screens/employee/EmployeeUserControl.vb =================================================================== diff -u -r1735 -r1736 --- ActiviteitenOpvolging/ActiviteitenOpvolging/screens/employee/EmployeeUserControl.vb (.../EmployeeUserControl.vb) (revision 1735) +++ ActiviteitenOpvolging/ActiviteitenOpvolging/screens/employee/EmployeeUserControl.vb (.../EmployeeUserControl.vb) (revision 1736) @@ -154,17 +154,18 @@ ''' Public Sub StartActivity() Implements IEmployeeDetailParentUserControl.StartActivity - Throw New NotImplementedException + 'Start activity with correct employee. + _parentForm.StartActivity(_parentForm.GetSelectedEmployee(EmployeeIndex)) End Sub ''' Public Sub FinishActivity() Implements IEmployeeDetailParentUserControl.FinishActivity - Throw New NotImplementedException + _parentForm.FinishActivity() End Sub ''' Public Sub StopActivity() Implements IEmployeeDetailParentUserControl.StopActivity - Throw New NotImplementedException + _parentForm.StopActivity() End Sub #End Region