Exemplo n.º 1
0
        //public PlaybookDto GetPlaybookByDate(DateTime dt)
        //{
        //    var calendarItem = _calendar.GetStartOfWeekItemByDate(dt);

        //    var result = new PlaybookDto
        //    {
        //        Week = calendarItem
        //    };

        //    if (calendarItem != null)
        //    {
        //        result.Rows.AddRange(
        //            _assignments.GetAllAssignmentsPerWeek(calendarItem.ID).Select(x => ConvertToVM(x))
        //            );
        //    }

        //    return result;
        //}

        //public static PlaybookRowDto ConvertToVM(Assignment row)
        //{
        //    return new PlaybookRowDto
        //    {
        //        ID = row.ID,
        //        Description = row.Description,
        //        Duration = row.Duration,
        //        Intraweek = row.Intraweek,
        //        Priority = row.Priority,
        //        ProjectID = row.WhatID,
        //        RequestorName = row.Requestor?.Name,
        //        ResourceID = row.ResourceID,
        //        Status = row.Status
        //    };
        //}

        protected override void DisposeDisposables()
        {
            _calendar.Dispose();
            _assignments.Dispose();
        }