/// <summary> /// Create a new Location object. /// </summary> /// <param name="locationID">Initial value of the LocationID property.</param> /// <param name="name">Initial value of the Name property.</param> /// <param name="costRate">Initial value of the CostRate property.</param> /// <param name="availability">Initial value of the Availability property.</param> /// <param name="modifiedDate">Initial value of the ModifiedDate property.</param> public static Location CreateLocation(global::System.Int16 locationID, global::System.String name, global::System.Decimal costRate, global::System.Decimal availability, global::System.DateTime modifiedDate) { Location location = new Location(); location.LocationID = locationID; location.Name = name; location.CostRate = costRate; location.Availability = availability; location.ModifiedDate = modifiedDate; return location; }
public WorkOrderRouting AddNewRouting(Location loc) { var wor = Container.NewTransientInstance<WorkOrderRouting>(); wor.WorkOrder = this; wor.Location = loc; short highestSequence = 0; short increment = 1; if (WorkOrderRoutings.Count > 0) { highestSequence = WorkOrderRoutings.Max(n => n.OperationSequence); } highestSequence += increment; wor.OperationSequence = highestSequence; return wor; }
/// <summary> /// Deprecated Method for adding a new object to the Locations EntitySet. Consider using the .Add method of the associated ObjectSet<T> property instead. /// </summary> public void AddToLocations(Location location) { base.AddObject("Locations", location); }