Пример #1
0
        public ResponseModel DeleteUser(int id)
        {
            int           noOfProject = 0;
            int           noOfTask    = 0;
            ResponseModel response    = new ResponseModel();

            var projects = businessObj.GetAllProject();
            var tasks    = businessObj.GetAllTask();

            if (projects.Count > 0)
            {
                noOfProject = projects.Where(x => x.UserID == id).Count();
            }
            if (tasks.Count > 0)
            {
                noOfTask = tasks.Where(x => x.UserID == id).Count();
            }

            if (noOfProject == 0 && noOfTask == 0)
            {
                response.IsSuccess = true;
                response.UserList  = businessObj.DeleteUser(id);
            }
            else
            {
                response.IsSuccess = false;
            }

            return(response);
        }
Пример #2
0
 public void BenchmarkView()
 {
     obj.GetAllTask();
     obj.GetAllUser();
     obj.GetAllParentTask();
     obj.GetAllProject();
 }
Пример #3
0
        public void TestGetAllTask()
        {
            int actual = businessObj.GetAllTask().Count;

            Assert.Greater(actual, 0);
        }