Example #1
0
        public StaffGroupDetail CreateDetail(StaffGroup staffGroup, IPersistenceContext context)
        {
            StaffAssembler    staffAssembler    = new StaffAssembler();
            WorklistAssembler worklistAssembler = new WorklistAssembler();

            IList <Worklist> worklists = context.GetBroker <IWorklistBroker>().Find(staffGroup);

            return(new StaffGroupDetail(
                       staffGroup.GetRef(),
                       staffGroup.Name,
                       staffGroup.Description,
                       staffGroup.Elective,
                       CollectionUtils.Map <Staff, StaffSummary>(staffGroup.Members,
                                                                 delegate(Staff staff)
            {
                return staffAssembler.CreateStaffSummary(staff, context);
            }),
                       CollectionUtils.Map <Worklist, WorklistSummary>(worklists,
                                                                       delegate(Worklist worklist)
            {
                return worklistAssembler.GetWorklistSummary(worklist, context);
            }),
                       staffGroup.Deactivated
                       ));
        }
Example #2
0
 public StaffGroupSummary CreateSummary(StaffGroup staffGroup)
 {
     return(new StaffGroupSummary(
                staffGroup.GetRef(),
                staffGroup.Name,
                staffGroup.Description,
                staffGroup.Elective,
                staffGroup.Deactivated));
 }