Beispiel #1
0
 /// <summary>
 /// Insert new inventory.
 /// data manipulation for insertion of Inventory
 /// </summary>
 /// <param name="inventoryObject"></param>
 /// <returns></returns>
 private bool Insert(Inventory inventoryObject)
 {
     // new inventory
     using (InventoryDataAccess data = new InventoryDataAccess(ClientContext))
     {
         // insert to inventoryObject
         Int32 _Id = data.Insert(inventoryObject);
         // if successful, process
         if (_Id > 0)
         {
             inventoryObject.Id = _Id;
             return(true);
         }
         else
         {
             return(false);
         }
     }
 }