private async void ExecuteAddItemCommand()
        {
            var errorList = ValidateInputParameters();

            if (errorList.Count > 0)
            {
                MessageBox.Show("Error encountered in adding new item.\n" + string.Join(Environment.NewLine, errorList));
                return;
            }

            var item = new ItemDbModel()
            {
                Barcode            = Barcode,
                BrandName          = BrandName,
                DosageForm         = DosageForm,
                DosageStrength     = DosageStrength,
                GenericName        = GenericName,
                Manufacturer       = Manufacturer,
                Price              = (int)(UnitPrice * 100),
                TherapeuticClassId = SelectedTherapeuticClass.TherapeuticClassId
            };

            var resultsChanged = await _itemProcessor.AddItem(item);

            if (resultsChanged == 0)
            {
                throw new Exception("Failed to add item");
            }

            var newItem = (await _itemProcessor.GetItems(item.GenericName, item.BrandName, item.Manufacturer,
                                                         item.Barcode, SelectedTherapeuticClass)).FirstOrDefault();

            var inventoryItem = new InventoryDbModel()
            {
                ItemId            = newItem.ItemId,
                BatchNumber       = BatchNumber,
                LotNumber         = LotNumber,
                ExpiryDate        = ExpiryDate.Date,
                ManufacturingDate = ManufacturingDate.Date,
                Quantity          = Quantity
            };

            resultsChanged = await _inventoryProcessor.AddInventoryItem(inventoryItem);

            DisplayAddItemResult(resultsChanged > 0);
            InitializeValues();
        }
        private async void ExecuteAddInventoryItemCommand()
        {
            var newInventory = new InventoryDbModel()
            {
                InventoryId       = InventorySelectedItem.InventoryModel.InventoryId,
                ItemId            = InventorySelectedItem.ItemModel.ItemId,
                BatchNumber       = InventorySelectedItem.InventoryModel.BatchNumber,
                LotNumber         = InventorySelectedItem.InventoryModel.LotNumber,
                ExpiryDate        = InventorySelectedItem.InventoryModel.ExpiryDate,
                ManufacturingDate = InventorySelectedItem.InventoryModel.ManufacturingDate,
                Quantity          = InventorySelectedItem.InventoryModel.Quantity + AddInventoryQuantity
            };

            var resultsChanged = await _inventoryProcessor.AddInventoryItem(newInventory);

            //Creates a visual indication for the update result
            DisplayAddInventoryResult(resultsChanged > 0);

            //Clears UI
            ClearAddInventoryControls();

            //Updates search results
            UpdateItemsSearchResults();
        }