Example #1
0
 /// <summary>
 /// 传入成员ID得到此成员全部状态任务列表
 /// </summary>
 /// <param name="userId"></param>
 /// <returns></returns>
 public ActionResult GetTasksByUserId(string userId)
 {
     RRWMEntities er = new RRWMEntities();
     TaskService ts = new TaskService(er);
     List<Task> list = ts.FindByUserID(userId);
     List<ComplexTask> comList = ConvertToComplexTaskList(list);
     return Json(comList);
 }
Example #2
0
        /// <summary>
        /// 成员ID(memberId)memberId=0时为全部,,,,后台返回:符合要求的任务记录总数  
        /// </summary>
        /// <param name="UserId"></param>
        /// <returns></returns>
        public int GetTaskCountByUserId(string UserId)
        {
            TaskService ts = new TaskService();
            int num = 0;
            if (UserId != "0")
            {
                num = ts.FindByUserID(UserId).Count();
            }
            else {

                num = ts.GetAllTasks().Count();
            }
            return num;
        }