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. 

C#: 

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

  1.         TaskManagerControl manager = new TaskManagerControl();
  2.         RetrieveToDoList vdb = manager.RetrieveToDo(Request.Params("empId"));
  3.         BindData(vdb);

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

  1.         TaskManagerControl manager = new TaskManagerControl();
  2.         string taskID = GridView1.Rows(int.Parse(e.CommandArgument.ToString())).Cells(0).Text;
  3.         if ((e.CommandName == "Execute")) {
  4.              manager.CompleteTask(taskID, true);
  5.         } else {
  6.              manager.CompleteTask(taskID, false);
  7.         }
  8.         RetrieveToDoList vdb = new RetrieveToDoList();
  9.         StringReader reader = 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.