Example #1
0
        public ActionResult MyTaskDetail(int taskId, string taskReciver)
        {
            MODEL.T_TaskInformation   info = new MODEL.T_TaskInformation();
            MODEL.T_MemberInformation user = new OperateContext().Usr;
            string stuNum = user.StuNum;



            if ((iBLLSession.ITaskInformationBLL.GetListBy(t => t.TaskSender == stuNum &&
                                                           t.TaskId == taskId).Count > 0) ||
                iBLLSession.ITaskParticipationBLL.GetListBy(t => t.TaskReceiver == stuNum &&
                                                            t.TaskId == taskId).Count > 0)//验证是否有查看此任务的权限
            {
                MODEL.ViewModel.Task.TaskDetail        taskDetail   = iBLLSession.ITaskInformationBLL.GetTaskDetailById(taskId);
                MODEL.ViewModel.Task.TaskEvaluateModel taskEvaluate = iBLLSession.ITaskInformationBLL.GetTaskEvaluateList(taskReciver, taskId)[0];
                MODEL.T_TaskParticipation taskParticipation         = iBLLSession.ITaskParticipationBLL.GetListBy(t => t.TaskId == taskId & t.TaskReceiver == taskReciver).ToList()[0];


                ViewData["taskDetail"]        = taskDetail;
                ViewData["taskEvaluate"]      = taskEvaluate;
                ViewData["taskParticipation"] = taskParticipation;

                return(View());
            }
            else
            {
                return(null);
            }
        }
Example #2
0
        /////
        #region 任务提交 + public ActionResult TaskSubmit(int taskId)
        /// <summary>
        /// 任务提交 + public ActionResult TaskSubmit(int taskId)
        /// </summary>
        /// <param name="taskId"></param>
        /// <returns></returns>
        public ActionResult TaskSubmit(int taskId)
        {
            MODEL.T_MemberInformation user = new OperateContext().Usr;
            string stuNum = user.StuNum;

            if ((iBLLSession.ITaskInformationBLL.GetListBy(t => t.TaskSender == stuNum &&
                                                           t.TaskId == taskId).Count > 0) ||
                iBLLSession.ITaskParticipationBLL.GetListBy(t => t.TaskReceiver == stuNum &&
                                                            t.TaskId == taskId).Count > 0)//验证是否有查看此任务的权限
            {
                MODEL.ViewModel.Task.TaskDetail taskDetail = iBLLSession.ITaskInformationBLL.GetTaskDetailById(taskId);

                ViewData["taskDetail"] = taskDetail;

                return(View());
            }
            else
            {
                return(null);
            }
        }