コード例 #1
0
        public static string GetTitle(this DTask task)
        {
            if (string.IsNullOrEmpty(task.Title))
            {
                return(task.Description.LimitCharacters(150));
            }

            return(task.Title);
        }
コード例 #2
0
        public static string GetExecutorDisplayName(this DTask task, IRepository repository)
        {
            string name;

            if (task.Executor == null)
            {
                name = repository.GetOrganisationUnit(task.ExecutorPosition.Id).Title;
            }
            else
            {
                name = task.Executor.Id == repository.CurrentPerson().Id ? "You" : task.Executor.ActualName();
            }

            return(name);
        }