Esempio n. 1
0
        public TaskCommentExtended(int task_comment_id, int user_id)
        {
            TaskCommentCallerID = user_id;
            TaskCommentID       = task_comment_id;

            if (task_comment_id != 0)
            {
                task_comment _task_comment_original = db.task_comment.Where(item => item.id == task_comment_id).FirstOrDefault();
                _taskComment = _task_comment_original;

                if (_taskComment.id != 0)
                {
                    _parentTask = new TaskExtended(_taskComment.task_id, user_id);
                }

                if (_task_comment_original.user_id != 0)
                {
                    UserModel temp_user = new UserModel(_task_comment_original.user_id);
                    if (temp_user._user.photo_path.Trim().Length > 0)
                    {
                        PosterPath = temp_user._user.photo_path;
                    }
                }
            }
        }
Esempio n. 2
0
        public void HasTaskFile(TaskExtended task)
        {
            List <attachment> list = new List <attachment>();

            if (task.TaskID > 0)
            {
                list = db.attachment.Where(item => (item.report_task_id == task.TaskID)).ToList();
            }
            if (list.Count > 0)
            {
                task.file = true;
            }
            task.fileAttach = list;
        }