예제 #1
0
        public Details(ITaskData taskData, int taskId) : this()
        {
            Data.Task task = taskData.Get(taskId);

            TaskId         = taskId;
            TaskCategoryId = task.CategoryId;
            TaskName       = task.Name;
            TaskStartTime  = task.StartTime;
            TaskEndTime    = task.EndTime;
            CategoryName   = task.Category.Name;

            if (task.Appointments != null)
            {
                foreach (Data.Appointment appointment in task.Appointments)
                {
                    Appointments.Add(new Appointment(appointment));
                }
            }

            if (task.Notes != null)
            {
                foreach (Data.Note note in task.Notes)
                {
                    Notes.Add(new Note(note));
                }
            }

            if (task.Documents != null)
            {
                foreach (Data.Document document in task.Documents)
                {
                    Documents.Add(new Document(document));
                }
            }
        }
예제 #2
0
        public ActionResult Details(int id)
        {
            var model = Db.Get(id);

            return(View(model));
        }