35 lines
924 B
C#
35 lines
924 B
C#
|
|
using System;
|
|||
|
|
using System.Collections.Generic;
|
|||
|
|
using System.Linq;
|
|||
|
|
using BeWo.Data.Access;
|
|||
|
|
using BeWo.Data.Entities;
|
|||
|
|
using BeWo.Service.DCEntityMapper;
|
|||
|
|
using BS.Shared.Core;
|
|||
|
|
|
|||
|
|
namespace BeWo.Report.ReportObjects
|
|||
|
|
{
|
|||
|
|
public class CustomerListRO : AbstractBeWoReportObject<CustomerListRO>
|
|||
|
|
{
|
|||
|
|
public List<CustomerDataRO> CustomerList { get; set; }
|
|||
|
|
|
|||
|
|
public static CustomerListRO Create(List<long> oids)
|
|||
|
|
{
|
|||
|
|
var ro = new CustomerListRO();
|
|||
|
|
ro.CustomerList = new List<CustomerDataRO>();
|
|||
|
|
|
|||
|
|
var customers = DAOFactory.GenericDAO.LoadByIDs<Customer>(oids);
|
|||
|
|
var dclist = MapperFactory.CustomerDC_Customer.MapToNewDCs(customers);
|
|||
|
|
|
|||
|
|
foreach (var item in dclist)
|
|||
|
|
{
|
|||
|
|
var customerRO = CustomerDataRO.Create(item);
|
|||
|
|
ro.CustomerList.Add(customerRO);
|
|||
|
|
}
|
|||
|
|
return ro;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
}
|