ChainStoreWeb.Pages.OrderForm.CreateExpectedShipment C# (CSharp) Method

CreateExpectedShipment() private method

private CreateExpectedShipment ( string supplier, string product, UInt16 quantity ) : void
supplier string
product string
quantity UInt16
return void
        private void CreateExpectedShipment(string supplier, string product, UInt16 quantity)
        {
            using (var clientContext = spContext.CreateUserClientContextForSPHost())
            {
                List expectedShipmentsList = clientContext.Web.Lists.GetByTitle("Expected Shipments");
                ListItemCreationInformation itemCreateInfo = new ListItemCreationInformation();
                ListItem newItem = expectedShipmentsList.AddItem(itemCreateInfo);
                newItem["Title"] = product;
                newItem["Supplier"] = supplier;
                newItem["Quantity"] = quantity;
                newItem.Update();
                clientContext.ExecuteQuery();
            }
        }