I am having some issues with using the enumerator classes in my project. For my dropdown I am using the suggestion that was posted by prof haines .. adding all of the choices to the dropdown then using a case to actually select the TaskType and TaskStatus.. However, when I am trying to actually save the information that was entered with the AddEmployeeTask method I am uncertain how to get the Task ID for whichever task was selected in the drop down. This is the code I am trying to use. It works as long as I code in the case as i did below:
Try
Dim thisEmp As wrefEmployeeManagementService.Employee
Dim thisID As String
Dim taskID As String
thisEmp =
Me.cbxEmployeeName.SelectedValue
thisID = thisEmp.ID
thisTask =
Me.cbxTaskType.SelectedValue
taskID = task.ID
' MessageBox.Show(taskID)
emptask =
New wrefEmployeeManagementService.EmployeeTask
emptask.DateWorked =
Me.dtCalendar.Value
emptask.HoursWorked =
Me.txtEmloyeeHours.Text
' MessageBox.Show(thisEmp.FullName)
emptask.EmployeeId = thisID
' MessageBox.Show(thisID)
emptask.ID = Count + 2
emptask.TaskId = taskID
ws.addEmployeeTask(emptask)
Select Case Me.cbxTaskType.SelectedItem
Case "Armaflex"
thisTask = wrefEmployeeManagementService.TaskType.Armaflex
task.TaskName =
"Armaflex"
If task.TaskStatus = wrefEmployeeManagementService.TaskStatus.Completed Then
task.ID =
"00011"
Else
task.ID =
"00012"
End If
Anybody have any suggestions??
Thanks!