/// <summary> /// 用于向 HAWBItem EntitySet 添加新对象的方法,已弃用。请考虑改用关联的 ObjectSet<T> 属性的 .Add 方法。 /// </summary> public void AddToHAWBItem(HAWBItem hAWBItem) { base.AddObject("HAWBItem", hAWBItem); }
/// <summary> /// 创建新的 HAWBItem 对象。 /// </summary> /// <param name="itemID">ItemID 属性的初始值。</param> /// <param name="name">Name 属性的初始值。</param> /// <param name="piece">Piece 属性的初始值。</param> /// <param name="unitAmount">UnitAmount 属性的初始值。</param> /// <param name="totalAmount">TotalAmount 属性的初始值。</param> public static HAWBItem CreateHAWBItem(global::System.Guid itemID, global::System.String name, global::System.Int32 piece, global::System.Decimal unitAmount, global::System.Decimal totalAmount) { HAWBItem hAWBItem = new HAWBItem(); hAWBItem.ItemID = itemID; hAWBItem.Name = name; hAWBItem.Piece = piece; hAWBItem.UnitAmount = unitAmount; hAWBItem.TotalAmount = totalAmount; return hAWBItem; }