Exemple #1
0
        private async Task <int> DeleteWooCategoryLink(WooCategoryMap deleteWooCategoryMap)
        {
            int _result = 0;
            IAppRepository <WooCategoryMap> _wooCategoryMapRepo = _AppUnitOfWork.Repository <WooCategoryMap>();

            _result = await _wooCategoryMapRepo.DeleteByIdAsync(deleteWooCategoryMap.WooCategoryMapId);

            return(_result);
        }
        private async Task <int> DeleteWooAttributeVarietyLink(WooProductAttributeTermMap deleteWooProductAttributeTermMap)
        {
            int _result = 0;
            IAppRepository <WooProductAttributeTermMap> _wooProductAttributeTermMapRepo = _AppUnitOfWork.Repository <WooProductAttributeTermMap>();

            _result = await _wooProductAttributeTermMapRepo.DeleteByIdAsync(deleteWooProductAttributeTermMap.WooProductAttributeTermMapId);

            return(_result);
        }
Exemple #3
0
        public override async Task DeleteRowAsync(ItemCategoryLookupView deleteViewEntity)
        {
            IAppRepository <ItemCategoryLookup> _itemCategoryLookupRepository = _AppUnitOfWork.Repository <ItemCategoryLookup>();

            var _recsDelete = await _itemCategoryLookupRepository.DeleteByIdAsync(deleteViewEntity.ItemCategoryLookupId);     //DeleteByAsync(icl => icl.ItemCategoryLookupId == SelectedItemCategoryLookup.ItemCategoryLookupId);

            if (_recsDelete == AppUnitOfWork.CONST_WASERROR)
            {
                _GridSettings.PopUpRef.ShowNotification(PopUpAndLogNotification.NotificationType.Error, $"Category: {deleteViewEntity.CategoryName} is no longer found, was it deleted?");
            }
            else
            {
                _GridSettings.PopUpRef.ShowNotification(PopUpAndLogNotification.NotificationType.Success, $"Category: {deleteViewEntity.CategoryName} was it deleted?");
            }
        }
        public override async Task DeleteRowAsync(ItemView deleteViewEntity)
        {
            IAppRepository <Item> _itemRepository = _AppUnitOfWork.Repository <Item>();

            var _recsDelete = await _itemRepository.DeleteByIdAsync(deleteViewEntity.ItemId);

            if (_recsDelete == AppUnitOfWork.CONST_WASERROR)
            {
                _GridSettings.PopUpRef.ShowNotification(PopUpAndLogNotification.NotificationType.Error, $"Item: {deleteViewEntity.ItemName} is no longer found, was it deleted?");
            }
            else
            {
                _GridSettings.PopUpRef.ShowNotification(PopUpAndLogNotification.NotificationType.Success, $"Item: {deleteViewEntity.ItemName} was it deleted?");
            }
        }
        public override async Task DeleteRowAsync(ItemAttributeVarietyLookupView deleteViewEntity)
        {
            IAppRepository <ItemAttributeVarietyLookup> _itemAttributeVarietyLookupRepository = _AppUnitOfWork.Repository <ItemAttributeVarietyLookup>();

            //var ignore = await Task.Run(() => deleteViewEntity.BGColour);   // rubbish code so we don't do Async - Async Delete causing issues.
            //var _recsDelete = _itemAttributeVarietyLookupRepository.DeleteById(deleteViewEntity.ItemAttributeVarietyLookupId);   // await   DeleteByIdAsync(deleteViewEntity.ItemAttributeVarietyLookupId);     //DeleteByAsync(iavl => iavl.ItemAttributeVarietyLookupId == SelectedItemAttributeVarietyLookup.ItemAttributeVarietyLookupId);
            var _recsDelete = await _itemAttributeVarietyLookupRepository.DeleteByIdAsync(deleteViewEntity.ItemAttributeVarietyLookupId);   // await   DeleteByIdAsync(deleteViewEntity.ItemAttributeVarietyLookupId);     //DeleteByAsync(iavl => iavl.ItemAttributeVarietyLookupId == SelectedItemAttributeVarietyLookup.ItemAttributeVarietyLookupId);

            if (_recsDelete == AppUnitOfWork.CONST_WASERROR)
            {
                _GridSettings.PopUpRef.ShowNotification(PopUpAndLogNotification.NotificationType.Error, $"Attribute Variety: {deleteViewEntity.VarietyName} is no longer found, was it deleted?");
            }
            else
            {
                _GridSettings.PopUpRef.ShowNotification(PopUpAndLogNotification.NotificationType.Success, $"Attribute Variety: {deleteViewEntity.VarietyName} was it deleted?");
            }
        }
Exemple #6
0
        private async Task <int> DeleteWooProductMap(WooProductMap currWooProductMap)
        {
            IAppRepository <WooProductMap> _wooProductMapRepository = _AppUnitOfWork.Repository <WooProductMap>();

            return(await _wooProductMapRepository.DeleteByIdAsync(currWooProductMap.WooProductMapId));
        }