Exemple #1
0
        private async void Border_MouseDownAsync(object sender, MouseButtonEventArgs e)
        {
            Border b = sender as Border;

            if (b.Name == "GeriBorder")
            {
                await this.AnimateOut();

                this.NavigationService.Navigate(new PersonelIslemleriPage());
            }
            else
            {
                IProductService productService = IocUtil.Resolve <IProductService>();
                Product         product        = UrunlerDataGrid.SelectedItem as Product;
                productService.UnAssignProduct(product);
                if (cbAtik.IsChecked == true)
                {
                    IWarehouseService    warehouseService    = IocUtil.Resolve <IWarehouseService>();
                    IWasteProductService wasteProductService = IocUtil.Resolve <IWasteProductService>();
                    wasteProductService.Add(product);
                    warehouseService.DeleteProduct(product);
                }
                Personal personal = PersonellerDataGrid.SelectedItem as Personal;
                fillUrunlerDataGrid(personal.Id);
            }
        }
Exemple #2
0
        public void MoveProductToWaste()
        {
            IWasteProductService wasteProductService = IocUtil.Resolve <IWasteProductService>();
            IWarehouseService    warehouseService    = IocUtil.Resolve <IWarehouseService>();

            Product product = warehouseService.GetProducts()[0];

            WasteProduct wasteProduct = new WasteProduct {
                Name = product.Name, Date = product.Date, AssignedByDate = product.AssignedByDate, AssignedById = product.AssignedById
            };

            warehouseService.DeleteProduct(product);
            wasteProductService.Add(product);

            Assert.AreEqual(1, wasteProductService.GetList().Count);
        }