Exemplo n.º 1
0
 public static Customer ReadFromDTO(Customer target, CustomerDTO source)
 {
     target.CustomerId       = source.CustomerId;
     target.SalesTerritoryId = source.SalesTerritoryId;
     SalesTerritoryTX.ReadFromDTO(target.SalesTerritory, source.SalesTerritory);
     target.StoreId = source.StoreId;
     StoreTX.ReadFromDTO(target.Store, source.Store);
     target.PersonId = source.PersonId;
     PersonTX.ReadFromDTO(target.Person, source.Person);
     target.AccountNumber = source.AccountNumber;
     target.ModifiedDate  = source.ModifiedDate;
     return(target);
 }
Exemplo n.º 2
0
 public static SalesPerson ReadFromDTO(SalesPerson target, SalesPersonDTO source)
 {
     target.EntityId = source.EntityId;
     PersonTX.ReadFromDTO(target.Person, source.Person);
     SalesTerritoryTX.ReadFromDTO(target.SalesTerritory, source.SalesTerritory);
     target.SalesTerritoryId = source.SalesTerritoryId;
     target.SalesQuota       = source.SalesQuota;
     target.Bonus            = source.Bonus;
     target.CommissionPct    = source.CommissionPct;
     target.SalesYTD         = source.SalesYTD;
     target.SalesLastYear    = source.SalesLastYear;
     target.ModifiedDate     = source.ModifiedDate;
     return(target);
 }
Exemplo n.º 3
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,
     });
 }
Exemplo n.º 4
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,
     });
 }