public JSendResponse DeleteProjectDetails(Project project)
 {
     return(new JSendResponse()
     {
         Data = projObjBC.DeleteProjectDetails(project)
     });
 }
示例#2
0
 public JSendResponse DeleteProjectDetails(Project project)
 {
     if (project == null)
     {
         throw new ArgumentNullException("Project is null");
     }
     if (project.ProjectId < 0)
     {
         throw new ArithmeticException("Project ID cannot be negative");
     }
     if (project.User == null)
     {
         throw new ArgumentNullException("User related to the project cannot be null");
     }
     if (project.User.ProjectId < 0)
     {
         throw new ArithmeticException("User object project Id cannot be negative");
     }
     if (project.NoOfCompletedTasks > project.NoOfTasks)
     {
         throw new ArgumentException("Completed tasks cannot be greater than total tasks");
     }
     return(new JSendResponse()
     {
         Data = projObjBC.DeleteProjectDetails(project)
     });
 }