Beispiel #1
0
 protected void gdvTask_RowCommand(object sender, GridViewCommandEventArgs e)
 {
     if (e.CommandName == "Edit")
     {
         Session["LastListID"] = lstTaskListV.SelectedIndex;
         Response.Redirect("~/EditTask.aspx?Id=" + e.CommandArgument.ToString());
     }
     if (e.CommandName == "Archieve")
     {
         objListService.UpdateTasktoarchieve(Convert.ToInt32(e.CommandArgument.ToString()), this.DBConnectionString);
         chkArchived_CheckedChanged(null, null);
     }
     if (e.CommandName == "Delete")
     {
         objListService.DeleteTask(Convert.ToInt32(e.CommandArgument.ToString()), this.DBConnectionString);
         chkArchived_CheckedChanged(null, null);
     }
 }
Beispiel #2
0
 public void DeleteTask_should_call_unitOfWork_taskListItenRepository()
 {
     _taskListService.DeleteTask(1);
     _mockUnityOfWork.Verify(u => u.TaskListItenRepository, Times.Exactly(2));
 }