///<summary> /// Returns a Typed VSalesPersonBase Entity ///</summary> public virtual VSalesPersonBase Copy() { //shallow copy entity VSalesPerson copy = new VSalesPerson(); copy.SalesPersonId = this.SalesPersonId; copy.Title = this.Title; copy.FirstName = this.FirstName; copy.MiddleName = this.MiddleName; copy.LastName = this.LastName; copy.Suffix = this.Suffix; copy.JobTitle = this.JobTitle; copy.Phone = this.Phone; copy.EmailAddress = this.EmailAddress; copy.EmailPromotion = this.EmailPromotion; copy.AddressLine1 = this.AddressLine1; copy.AddressLine2 = this.AddressLine2; copy.City = this.City; copy.StateProvinceName = this.StateProvinceName; copy.PostalCode = this.PostalCode; copy.CountryRegionName = this.CountryRegionName; copy.TerritoryName = this.TerritoryName; copy.TerritoryGroup = this.TerritoryGroup; copy.SalesQuota = this.SalesQuota; copy.SalesYtd = this.SalesYtd; copy.SalesLastYear = this.SalesLastYear; copy.AcceptChanges(); return (VSalesPerson)copy; }
/// <summary> /// Convert a nettiers collection to the ws proxy collection. /// </summary> public static VSalesPerson Convert(WsProxy.VSalesPerson item) { VSalesPerson outItem = new VSalesPerson(); outItem.SalesPersonId = item.SalesPersonId; outItem.Title = item.Title; outItem.FirstName = item.FirstName; outItem.MiddleName = item.MiddleName; outItem.LastName = item.LastName; outItem.Suffix = item.Suffix; outItem.JobTitle = item.JobTitle; outItem.Phone = item.Phone; outItem.EmailAddress = item.EmailAddress; outItem.EmailPromotion = item.EmailPromotion; outItem.AddressLine1 = item.AddressLine1; outItem.AddressLine2 = item.AddressLine2; outItem.City = item.City; outItem.StateProvinceName = item.StateProvinceName; outItem.PostalCode = item.PostalCode; outItem.CountryRegionName = item.CountryRegionName; outItem.TerritoryName = item.TerritoryName; outItem.TerritoryGroup = item.TerritoryGroup; outItem.SalesQuota = item.SalesQuota; outItem.SalesYtd = item.SalesYtd; outItem.SalesLastYear = item.SalesLastYear; outItem.AcceptChanges(); return outItem; }