Exemplo n.º 1
0
        public OpenCloseOrder(Employee empl)
        {
            employee = empl;
            products = new ObservableCollection <Product>();
            IRepController controller = new RepositoryController();

            products = controller.GetDBProducts();
            Requiers = controller.GetDBRequiersTo(employee.center);
            InitializeComponent();

            ProductsList.Items.Clear();
            RequiersTable.ItemsSource      = Requiers;
            ProductsList.ItemsSource       = products;
            ProductsList.DisplayMemberPath = "Name";
        }
Exemplo n.º 2
0
        public void Execute()
        {
            IRepController repository = new RepositoryController();
            Employee       employee   = EmployeeWindow.GetInstance().employe;
            ObservableCollection <ProductPosition> products = repository.GetStorageProducts(employee.center);

            foreach (ProductPosition product in products)
            {
                ProductsViewer.ProductsOnStorage.Add(new ViewerObject(product));
            }

            ObservableCollection <Require> requiersTo   = repository.GetDBRequiersTo(employee.center);
            ObservableCollection <Require> requiersFrom = repository.GetDBRequiersFrom(employee.center);

            foreach (ViewerObject viewObj in ProductsViewer.ProductsOnStorage)
            {
                viewObj.SetNumberFrom(requiersFrom);
                viewObj.SetNumberTo(requiersTo);
            }
        }