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);
 }
Beispiel #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);
 }
 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,
     });
 }
Beispiel #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,
     });
 }
 public static Employee ReadFromDTO(Employee target, EmployeeDTO source)
 {
     target.PersonId = source.PersonId;
     PersonTX.ReadFromDTO(target.Person, source.Person);
     target.LoginId          = source.LoginId;
     target.JobTitle         = source.JobTitle;
     target.CurrentFlag      = source.CurrentFlag;
     target.HireDate         = source.HireDate;
     target.BirthDate        = source.BirthDate;
     target.Gender           = source.Gender;
     target.MaritalStatus    = source.MaritalStatus;
     target.NationalIDNumber = source.NationalIDNumber;
     target.SalariedFlag     = source.SalariedFlag;
     target.SickLeaveHours   = source.SickLeaveHours;
     target.VacationHours    = source.VacationHours;
     target.ModifiedDate     = source.ModifiedDate;
     return(target);
 }
 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,
     });
 }