示例#1
0
 public JsonResponse DeleteTaskDetails(Task task)
 {
     if (task == null)
     {
         throw new ArgumentNullException("Task object is null");
     }
     if (task.Parent_ID < 0)
     {
         throw new ArithmeticException("Parent Id of task cannot be negative");
     }
     if (task.Project_ID < 0)
     {
         throw new ArithmeticException("Project Id cannot be negative");
     }
     if (task.TaskId < 0)
     {
         throw new ArithmeticException("Task id cannot be negative");
     }
     return(new JsonResponse()
     {
         Data = taskObj.DeleteTaskDetails(task)
     });
 }