Пример #1
0
 public static CustomerDTO WriteToDTO(Customer source)
 {
     return(new CustomerDTO
     {
         CustomerId = source.CustomerId,
         SalesTerritoryId = source.SalesTerritoryId,
         SalesTerritory = SalesTerritoryTX.WriteToDTO(source.SalesTerritory),
         StoreId = source.StoreId,
         Store = StoreTX.WriteToDTO(source.Store),
         PersonId = source.PersonId,
         Person = PersonTX.WriteToDTO(source.Person),
         AccountNumber = source.AccountNumber,
         ModifiedDate = source.ModifiedDate,
     });
 }
Пример #2
0
 public static SalesPersonDTO WriteToDTO(SalesPerson source)
 {
     return(new SalesPersonDTO
     {
         EntityId = source.EntityId,
         Person = PersonTX.WriteToDTO(source.Person),
         SalesTerritory = SalesTerritoryTX.WriteToDTO(source.SalesTerritory),
         SalesTerritoryId = source.SalesTerritoryId,
         SalesQuota = source.SalesQuota,
         Bonus = source.Bonus,
         CommissionPct = source.CommissionPct,
         SalesYTD = source.SalesYTD,
         SalesLastYear = source.SalesLastYear,
         ModifiedDate = source.ModifiedDate,
     });
 }
Пример #3
0
 public static EmployeeDTO WriteToDTO(Employee source)
 {
     return(new EmployeeDTO
     {
         PersonId = source.PersonId,
         Person = PersonTX.WriteToDTO(source.Person),
         LoginId = source.LoginId,
         JobTitle = source.JobTitle,
         CurrentFlag = source.CurrentFlag,
         HireDate = source.HireDate,
         BirthDate = source.BirthDate,
         Gender = source.Gender,
         MaritalStatus = source.MaritalStatus,
         NationalIDNumber = source.NationalIDNumber,
         SalariedFlag = source.SalariedFlag,
         SickLeaveHours = source.SickLeaveHours,
         VacationHours = source.VacationHours,
         ModifiedDate = source.ModifiedDate,
     });
 }