This project is read-only.

2. Manager Approval: Code Behind (Includes (1) To Do List Click, and (2) Agree/Deny Click.)

Manager Approval has two parts: (1) one is to get the user's to-do lists, and (2) the other is to perform process approval. 

VB .NET: 

(1) Get the user's to-do lists. (To Do List Click)

  1.         Dim manager As New TaskManagerControl()
  2.         Dim vdb As RetrieveToDoList = manager.RetrieveToDo(Request.Params("empId"))
  3.         BindData(vdb)

(2) Perform process approval. (Agree/Deny Click)

  1.         Dim manager As New TaskManagerControl()
  2.         Dim taskID As String = GridView1.Rows(Integer.Parse(e.CommandArgument.ToString())).Cells(0).Text
  3.         If (e.CommandName = "Execute") Then
  4.             manager.CompleteTask(taskID, True)
  5.         Else
  6.             manager.CompleteTask(taskID, False)
  7.         End If
  8.         Dim vdb As New RetrieveToDoList
  9.         Dim reader As New StringReader(ViewState("vdb").ToString())
  10.        vdb.ReadXml(reader)
  11.        vdb.Task.FindByTaskID(taskID).Delete()
  12.        BindData(vdb)

Last edited Jun 25, 2012 at 2:48 PM by cathysung, version 3

Comments

No comments yet.