public ViewStockPage(AdminwsOfCloudAPWH unitofwork, List <Stock> stockList) { _unitofwork = unitofwork; InitializeComponent(); lvItem.ItemsSource = stockList; }
public CreateStockPage(AdminwsOfCloudAPWH unitofwork, List <Stock> stockList) { _unitofwork = unitofwork; InitializeComponent(); _stockList = stockList; lvStock.ItemsSource = _stockList; initComboBox(); }
public StockOutPage(AdminwsOfCloudAPWH unitofwork, List <Stock> stockList) { _unitofwork = unitofwork; InitializeComponent(); _stockList = stockList; lvDataStock.ItemsSource = _stockList; _stockOutDetailsList = new List <StockOutDetails>(); _currentStockOut = new StockOut() { Adid = (App.Current.Properties["AdLogin"] as AdminRe).AdId, StockOutDetails = _stockOutDetailsList }; lvDataStockOut.ItemsSource = _stockOutDetailsList; LoadStockOutData(); }
public APWareHouseWindow() { InitializeComponent(); try { _unitofwork = new AdminwsOfCloudAPWH(); StockList = _unitofwork.StockRepository .Get(c => c.Deleted.Equals(0), includeProperties: "APWareHouse").ToList(); _viewStockPage = new ViewStockPage(_unitofwork, StockList); if (App.Current.Properties["AdLogin"] != null) { AdminRe getAdmin = App.Current.Properties["AdLogin"] as AdminRe; List <AdminRe> adList = _unitofwork.AdminreRepository.Get().ToList(); curAdmin = adList.FirstOrDefault(x => x.Username.Equals(getAdmin.Username) && x.DecryptedPass.Equals(getAdmin.DecryptedPass)); CUserChip.Content = curAdmin.Name; _createStockPage = new CreateStockPage(_unitofwork, StockList); _stockInPage = new StockInPage(_unitofwork, StockList); _stockOutPage = new StockOutPage(_unitofwork, StockList); } DispatcherTimer RefreshTimer = new DispatcherTimer(); RefreshTimer.Tick += Refresh_Tick; RefreshTimer.Interval = new TimeSpan(0, 1, 0); RefreshTimer.Start(); } catch (Exception ex) { MessageBox.Show("Something went wrong: \n" + ex.Message); AppLog.Error(ex); } }