private InventoryItem TransferToInventoryItemRec(InventoryItemList IIList)
 {
     InventoryItem IIRec = new InventoryItem();
     //
     IIRec.ID = IIList.ID;
     IIRec.ItemCategory = IIList.ItemCategory;
     IIRec.ItemName = IIList.ItemName;
     IIRec.ItemNumber = IIList.ItemNumber;
     IIRec.ItemType = IIList.ItemType;
     IIRec.Manufacturer = IIList.Manufacturer;
     IIRec.Notes = IIList.Notes;
     IIRec.PurchaseDate = IIList.PurchaseDate;
     IIRec.PurchasePrice = IIList.PurchasePrice;
     IIRec.RetailPrice = IIList.RetailPrice;
     //
     return IIRec;
 }
 public int SaveItem(InventoryItem item)
 {
     lock (locker)
     {
         if (item.ID != 0)
         {
             database.Update(item);
             return item.ID;
         }
         else
         {
             return database.Insert(item);
         }
     }
 }