public async Task Delete()
        {
            try
            {
                await client.DeleteCategoryAsync(new CategoryModel { Id = SelectedObject.CategoryId.ToString(), Name = SelectedObject.Name, Description = SelectedObject.Description });

                GridCollection.Remove(SelectedObject);
                MessageBoxService.Show("Category record Deleted");
            }
            catch (Exception ex)
            {
                MessageBoxService.Show(ex.InnerException.Message);
            }
            finally
            {
                SelectedObject = new ItemCategory()
                {
                };
            }
        }
Exemplo n.º 2
0
        public async Task Delete()
        {
            try
            {
                await unitOfWork.ItemsRepository.SoftDeleteAsync(SelectedObject.ItemId);

                GridCollection.Remove(SelectedObject);
                MessageBoxService.Show("Category record Deleted");
            }
            catch (Exception ex)
            {
                MessageBoxService.Show(ex.Message);
            }
            finally
            {
                SelectedObject = new Item()
                {
                };
            }
        }
Exemplo n.º 3
0
        public async Task Delete()
        {
            try
            {
                await unitOfWork.SalesOutletRepository.DeleteAsync(SelectedObject.SalesOutletId);

                await unitOfWork.SaveAsync();

                GridCollection.Remove(SelectedObject);
                MessageBoxService.Show("Category record Deleted");
            }
            catch (Exception ex)
            {
                MessageBoxService.Show(ex.InnerException.Message);
            }
            finally
            {
                SelectedObject = new SalesOutlet()
                {
                };
            }
        }
Exemplo n.º 4
0
        public async Task Delete()
        {
            try
            {
                await unitOfWork.PaymentMethods.DeleteAsync(SelectedObject.ID);

                await unitOfWork.SaveAsync();

                GridCollection.Remove(SelectedObject);
                MessageBoxService.Show("Category record Deleted");
            }
            catch (Exception ex)
            {
                MessageBoxService.Show(ex.InnerException.Message);
            }
            finally
            {
                SelectedObject = new PaymentMethod()
                {
                };
            }
        }
Exemplo n.º 5
0
        public async Task Delete()
        {
            try
            {
                await unitOfWork.InventoryRepository.DeleteAsync(SelectedObject.InventoryId);

                await unitOfWork.SaveAsync();

                GridCollection.Remove(SelectedObject);
                MessageBoxService.Show("Category record Deleted");
            }
            catch (Exception ex)
            {
                MessageBoxService.Show(ex.InnerException.Message);
            }
            finally
            {
                SelectedObject = new ItemInventory()
                {
                    InventoryId = new Guid(), ItemId = ItemsData.FirstOrDefault().ItemId, CostCenterId = SalesOutletData.FirstOrDefault().SalesOutletId, Reference = "Opening stock", OtherDetails = "Remarks"
                };
            }
        }