Ejemplo n.º 1
0
 public StockView(int workerRole)
 {
     InitializeComponent();
     PopulateDepartments(Department.GetAllDepartments());
     populateStocks(Stock.GetAllStocks());
     if (workerRole == (int)ProfileRoles.EMPLOYEE)
     {
         this.Width = 580;
     }
 }
Ejemplo n.º 2
0
        public RequestStock()
        {
            InitializeComponent();

            this.StartPosition = FormStartPosition.CenterScreen;
            this.FormBorderStyle = FormBorderStyle.FixedDialog;
            this.MaximizeBox = false;

            PopulateStocks(Stock.GetAllStocks());
        }
Ejemplo n.º 3
0
 private void RefreshStocks()
 {
     if (departmentsCmbbxStockView.SelectedIndex > -1 || stockNameTbx.Text != "Stock name")
     {
         int          departmentId = ((DepartmentComboBoxItem)departmentsCmbbxStockView.SelectedItem).Id;
         string       productName  = (stockNameTbx.Text != "Stock name" ? stockNameTbx.Text : null);
         List <Stock> stocks       = Stock.FilterStocks(departmentId, productName);
         populateStocks(stocks);
     }
     else
     {
         populateStocks(Stock.GetAllStocks());
     }
 }