コード例 #1
0
        public DivisionReportModel(Guid divisionId, string divisionName, Guid branchId, IEnumerable <StaffModel> branchStaff) : this()
        {
            DivisionId   = divisionId;
            DivisionName = divisionName;
            BranchId     = branchId;

            DivisionStaff = branchStaff.ToList().ConvertAll(m => new StaffReportModel(
                                                                m.StaffId, m.StaffFullName, m.DivisionId, m.StaffCallRecords));

            //StaffMember = branchStaff.
            TotalCallCost = DivisionStaff.Select(m => m.TotalCallCost).Sum();
        }
コード例 #2
0
        public DivisionLeaveReportModel(Guid divisionId, string divisionName, Guid branchId, IEnumerable <StaffModel> branchStaff, string startdate, string enddate, string leavetype)
            : this()
        {
            DivisionId   = divisionId;
            DivisionName = divisionName;
            BranchId     = branchId;

            DivisionStaff = branchStaff
                            .ToList()
                            .ConvertAll(
                m => new StaffLeaveReportModel(
                    m.StaffId,
                    m.StaffFullName,
                    m.DivisionId,
                    m.StaffLeaveData, startdate, enddate, leavetype));
            DivisionTotal = DivisionStaff.Select(x => x.DynamicRunningTotal).Sum().Round(2);
        }