partial void Converting(PurchaseOrder entity);
partial void Initiliazing(PurchaseOrder entity) { Constructing(entity); }
public virtual PurchaseOrder ToPurchaseOrder() { var entity = new PurchaseOrder(); entity.Id = Id; entity.PoNr = PoNr; entity.RefCode = RefCode; entity.CustomerRefNr = CustomerRefNr; entity.OrderDate = OrderDate; entity.DueDate = DueDate; entity.IsRepeat = IsRepeat; entity.ParentPoId = ParentPoId; entity.DesignerId = DesignerId; entity.Merchandiser1Id = Merchandiser1Id; entity.Merchandiser2Id = Merchandiser2Id; entity.Description = Description; entity.CustomerId = CustomerId; entity.CustomerDepartmentId = CustomerDepartmentId; entity.CustomerPoNr = CustomerPoNr; entity.LicensorId = LicensorId; entity.ProductId = ProductId; entity.SizingStandardId = SizingStandardId; entity.FabricComposition = FabricComposition; entity.Colour = Colour; entity.Print = Print; entity.ShipmentHangingFolded = ShipmentHangingFolded; entity.HangerSticker = HangerSticker; entity.Labelling = Labelling; entity.WovenLabel = WovenLabel; entity.WashingInstructions = WashingInstructions; entity.Quantity = Quantity; entity.DiscountRate = DiscountRate; entity.UnitPrice = UnitPrice; entity.SellingCurrencyId = SellingCurrencyId; entity.UnitPrice2 = UnitPrice2; entity.SellingCurrency2Id = SellingCurrency2Id; entity.LicensorPrice = LicensorPrice; entity.LicensorCurrencyId = LicensorCurrencyId; entity.BuyingPrice = BuyingPrice; entity.BuyingCurrencyId = BuyingCurrencyId; entity.BuyingPrice2 = BuyingPrice2; entity.BuyingCurrency2Id = BuyingCurrency2Id; entity.RoyaltyFee = RoyaltyFee; entity.RoyaltyCurrencyId = RoyaltyCurrencyId; entity.RetailPrice = RetailPrice; entity.RetailCurrencyId = RetailCurrencyId; entity.SizeRatioDivisor = SizeRatioDivisor; entity.FreightTermId = FreightTermId; entity.SupplierId = SupplierId; entity.SupplierDueDate = SupplierDueDate; entity.InitialComments = InitialComments; entity.Notes = Notes; entity.IsApproved = IsApproved; entity.ApproveDate = ApproveDate; entity.Cancelled = Cancelled; entity.CancelDate = CancelDate; entity.CancellationReason = CancellationReason; entity.Closed = Closed; entity.ClosedUserIp = ClosedUserIp; entity.ClosedUserId = ClosedUserId; Converting(entity); return(entity); }
partial void Initiliazing(PurchaseOrder entity);
public PurchaseOrderDTO(PurchaseOrder entity) { Id = entity.Id; PoNr = entity.PoNr; RefCode = entity.RefCode; CustomerRefNr = entity.CustomerRefNr; OrderDate = entity.OrderDate; DueDate = entity.DueDate; IsRepeat = entity.IsRepeat; ParentPoId = entity.ParentPoId; DesignerId = entity.DesignerId; Merchandiser1Id = entity.Merchandiser1Id; Merchandiser2Id = entity.Merchandiser2Id; Description = entity.Description; CustomerId = entity.CustomerId; CustomerDepartmentId = entity.CustomerDepartmentId; CustomerPoNr = entity.CustomerPoNr; LicensorId = entity.LicensorId; ProductId = entity.ProductId; SizingStandardId = entity.SizingStandardId; FabricComposition = entity.FabricComposition; Colour = entity.Colour; Print = entity.Print; ShipmentHangingFolded = entity.ShipmentHangingFolded; HangerSticker = entity.HangerSticker; Labelling = entity.Labelling; WovenLabel = entity.WovenLabel; WashingInstructions = entity.WashingInstructions; Quantity = entity.Quantity; DiscountRate = entity.DiscountRate; UnitPrice = entity.UnitPrice; SellingCurrencyId = entity.SellingCurrencyId; UnitPrice2 = entity.UnitPrice2; SellingCurrency2Id = entity.SellingCurrency2Id; LicensorPrice = entity.LicensorPrice; LicensorCurrencyId = entity.LicensorCurrencyId; BuyingPrice = entity.BuyingPrice; BuyingCurrencyId = entity.BuyingCurrencyId; BuyingPrice2 = entity.BuyingPrice2; BuyingCurrency2Id = entity.BuyingCurrency2Id; RoyaltyFee = entity.RoyaltyFee; RoyaltyCurrencyId = entity.RoyaltyCurrencyId; RetailPrice = entity.RetailPrice; RetailCurrencyId = entity.RetailCurrencyId; SizeRatioDivisor = entity.SizeRatioDivisor; FreightTermId = entity.FreightTermId; SupplierId = entity.SupplierId; SupplierDueDate = entity.SupplierDueDate; InitialComments = entity.InitialComments; Notes = entity.Notes; IsApproved = entity.IsApproved; ApproveDate = entity.ApproveDate; Cancelled = entity.Cancelled; CancelDate = entity.CancelDate; CancellationReason = entity.CancellationReason; Closed = entity.Closed; ClosedUserIp = entity.ClosedUserIp; ClosedUserId = entity.ClosedUserId; Initiliazing(entity); }
// Use below function in a partial class file (eg. PurchaseOrder.part.cs) // to add more complexity to clone partial void Cloning(PurchaseOrder clone);
/// <summary> /// Clones all properties in a new PurchaseOrder instance, /// except PrimaryKey(s) /// </summary> /// <returns>New PurchaseOrder instance</returns> public PurchaseOrder Clone() { var clone = new PurchaseOrder(); clone.PoNr = PoNr; clone.RefCode = RefCode; clone.CustomerRefNr = CustomerRefNr; clone.OrderDate = OrderDate; clone.DueDate = DueDate; clone.IsRepeat = IsRepeat; clone.ParentPoId = ParentPoId; clone.DesignerId = DesignerId; clone.Merchandiser1Id = Merchandiser1Id; clone.Merchandiser2Id = Merchandiser2Id; clone.Description = Description; clone.CustomerId = CustomerId; clone.CustomerDepartmentId = CustomerDepartmentId; clone.CustomerPoNr = CustomerPoNr; clone.LicensorId = LicensorId; clone.ProductId = ProductId; clone.SizingStandardId = SizingStandardId; clone.FabricComposition = FabricComposition; clone.Colour = Colour; clone.Print = Print; clone.ShipmentHangingFolded = ShipmentHangingFolded; clone.HangerSticker = HangerSticker; clone.Labelling = Labelling; clone.WovenLabel = WovenLabel; clone.WashingInstructions = WashingInstructions; clone.Quantity = Quantity; clone.DiscountRate = DiscountRate; clone.UnitPrice = UnitPrice; clone.SellingCurrencyId = SellingCurrencyId; clone.UnitPrice2 = UnitPrice2; clone.SellingCurrency2Id = SellingCurrency2Id; clone.LicensorPrice = LicensorPrice; clone.LicensorCurrencyId = LicensorCurrencyId; clone.BuyingPrice = BuyingPrice; clone.BuyingCurrencyId = BuyingCurrencyId; clone.BuyingPrice2 = BuyingPrice2; clone.BuyingCurrency2Id = BuyingCurrency2Id; clone.RoyaltyFee = RoyaltyFee; clone.RoyaltyCurrencyId = RoyaltyCurrencyId; clone.RetailPrice = RetailPrice; clone.RetailCurrencyId = RetailCurrencyId; clone.SizeRatioDivisor = SizeRatioDivisor; clone.FreightTermId = FreightTermId; clone.SupplierId = SupplierId; clone.SupplierDueDate = SupplierDueDate; clone.InitialComments = InitialComments; clone.Notes = Notes; clone.IsApproved = IsApproved; clone.ApproveDate = ApproveDate; clone.ApprovedUserId = ApprovedUserId; clone.ApprovedUserIp = ApprovedUserIp; clone.Cancelled = Cancelled; clone.CancelDate = CancelDate; clone.CancellationReason = CancellationReason; clone.CancelledUserId = CancelledUserId; clone.CancelledUserIp = CancelledUserIp; clone.Closed = Closed; clone.ClosedUserIp = ClosedUserIp; clone.ClosedUserId = ClosedUserId; clone.ModifyNr = ModifyNr; clone.ModifyDate = ModifyDate; clone.ModifierId = ModifierId; clone.ModifierIp = ModifierIp; clone.CreateDate = CreateDate; clone.CreatorId = CreatorId; clone.CreatorIp = CreatorIp; Cloning(clone); return(clone); }