예제 #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);
 }
예제 #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);
 }
예제 #3
0
 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);
 }