public ActionResult UpdateInventory(VariationContent currentContent) { InventoryChange theChange = new InventoryChange() { CatalogEntryCode = currentContent.Code, WarehouseCode = "Nashua", PurchaseAvailableChange = 4, }; _inventoryService.Adjust(theChange); /*===*/ _inventoryService.Update(new[] { new InventoryRecord { CatalogEntryCode = currentContent.Code, PurchaseAvailableQuantity = 199, PurchaseAvailableUtc = DateTime.UtcNow, WarehouseCode = "Nashua" } }); return(RedirectToAction("Index", "Variation")); }
public void InventoryChange(string ChannelId, string ChannelRef, string TransactionId, InventoryChangeLineDoc aInventoryChangeLineDoc) { // transform external object to packaged object understandable by BizTalk InventoryChange part = new InventoryChange(); part.ChannelId = ChannelId; part.ChannelRef = ChannelRef; part.TransactionId = TransactionId; part.aInventoryChangeLineDoc = aInventoryChangeLineDoc; ArrayList inHeaders = null; ArrayList inoutHeaders = null; ArrayList inoutHeaderResponses = null; ArrayList outHeaderResponses = null; SoapUnknownHeader[] unknownHeaderResponses = null; // Parameter information object[] invokeParams = new object[] { part }; ParamInfo[] inParamInfos = new ParamInfo[] { new ParamInfo(typeof(InventoryChange), "part") }; ParamInfo[] outParamInfos = null; // Define the assembly (port) // NOTE! This line is only a sample, it needs to be modified to match your orchestration // at least regarding your project name and the public access token string bodyTypeAssemblyQualifiedName = "YOUR_ORCHESTRATION_PROJECT.FromWMSschema+InventoryChange, YOUR_ORCHESTRATION_PROJECT, Version=1.0.0.0, Culture=neutral, PublicKeyToken=" + "92267163d02e63da"; // BizTalk invocation // NOTE! This line is only a sample, it needs to be modified to match your orchestration // regarding the operation to call this.Invoke("Operation_1", invokeParams, inParamInfos, outParamInfos, 0, bodyTypeAssemblyQualifiedName, inHeaders, inoutHeaders, out inoutHeaderResponses, out outHeaderResponses, null, null, null, out unknownHeaderResponses, true, false); }
public ItemEfficiencyControl(InventoryChange inventoryChange) { InitializeComponent(); var productMasterItem = StaticInventoryTracker.ProductMasterList.FirstOrDefault(x => x.MasterID == inventoryChange.MasterId); if (productMasterItem != null) { NameTextBox.Text = productMasterItem.Description; } else { NameTextBox.Text = "Not Found"; } EfficiencyTextBox.Text = inventoryChange.Efficiency.ToString("P"); }
/// <summary> /// Gets the requested quantity change of line item in shipments /// </summary> /// <param name="lineItem">The line item.</param> /// <returns>The requested quantity change.</returns> private decimal GetLineItemRequestedQty(LineItem lineItem) { decimal lineItemRequestedQty = 0; OperationKeySerializer operationKeySerializer = new OperationKeySerializer(); var operationKeys = new List <string>(); var orderForm = lineItem.Parent; foreach (Shipment sh in orderForm.Shipments) { operationKeys.AddRange(sh.GetInventoryOperationKey(orderForm.LineItems.IndexOf(lineItem))); } InventoryRequestType requestType = default(InventoryRequestType); InventoryChange inventoryChange = null; foreach (string key in operationKeys) { operationKeySerializer.TryDeserialize(key, out requestType, out inventoryChange); switch (requestType) { case InventoryRequestType.Purchase: lineItemRequestedQty += inventoryChange.PurchaseRequestedChange; break; case InventoryRequestType.Backorder: lineItemRequestedQty += inventoryChange.BackorderRequestedChange; break; case InventoryRequestType.Preorder: lineItemRequestedQty += inventoryChange.PreorderRequestedChange; break; } } return(lineItemRequestedQty); }
protected virtual void OnInventoryChange(Player player, byte slot, Item itemStack) { InventoryChange?.Invoke(player, this, slot, itemStack); }
protected virtual void OnInventoryChange() { InventoryChange?.Invoke(this, EventArgs.Empty); }