//////////////////////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////////////////////// internal void stockTransferHistoryLoaded() { try { stockTransferHistory.DataTable = new DataTable(); stockTransferHistory.DataTable.Columns.Add("ID", typeof(int)); stockTransferHistory.DataTable.Columns.Add("Stock Location From", typeof(String)); stockTransferHistory.DataTable.Columns.Add("Stock Location To", typeof(String)); stockTransferHistory.DataTable.Columns.Add("Date", typeof(String)); stockTransferHistory.DataTable.Columns.Add("Carrier", typeof(String)); stockTransferHistory.DataTable.Columns.Add("Details", typeof(String)); stockTransferHistory.dataGrid_stockTransferHistory.DataContext = stockTransferHistory.DataTable.DefaultView; UIComboBox.loadStocksForFilter(stockTransferHistory.comboBox_stockLocationFrom_filter); UIComboBox.loadStocksForFilter(stockTransferHistory.comboBox_stockLocationTo_filter); stockTransferHistory.comboBox_stockLocationFrom_filter.SelectedValue = -1; stockTransferHistory.comboBox_stockLocationTo_filter.SelectedValue = -1; stockTransferHistory.Pagination = new Pagination(); stockTransferHistory.Pagination.Filter = stockTransferHistory; stockTransferHistory.grid_pagination.Children.Add(stockTransferHistory.Pagination); setRowsCount(); } catch (Exception) { } }
///////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////// internal void UserControl_Loaded() { try { UIComboBox.loadStocksForFilter(stockManager.comboBox_stockLocation); UIComboBox.categoriesForSelect(stockManager.comboBox_category); UIComboBox.companiesForSelect(stockManager.comboBox_company); if (Session.Meta["isActiveMultipleStocks"] == 0) { stockManager.comboBox_stockLocation.SelectedValue = 1; stockManager.comboBox_stockLocation.IsEnabled = false; } stockManager.DataTable = new DataTable(); stockManager.DataTable.Columns.Add("ID", typeof(int)); stockManager.DataTable.Columns.Add("Stock Location", typeof(String)); stockManager.DataTable.Columns.Add("Category", typeof(String)); stockManager.DataTable.Columns.Add("Company", typeof(String)); stockManager.DataTable.Columns.Add("Item Name", typeof(String)); stockManager.DataTable.Columns.Add("Quantity", typeof(double)); stockManager.DataTable.Columns.Add("Re-Order Level", typeof(String)); stockManager.DataTable.Columns.Add("Value", typeof(String)); stockManager.DataGridFooter = new DataGridFooter(); stockManager.dataGrid_stockItems.IFooter = stockManager.DataGridFooter; stockManager.grid_footer.Children.Add(stockManager.DataGridFooter); stockManager.dataGrid_stockItems.DataContext = stockManager.DataTable.DefaultView; stockManager.Pagination = new Pagination(); stockManager.Pagination.Filter = stockManager; stockManager.grid_pagination.Children.Add(stockManager.Pagination); setRowsCount(); } catch (Exception) { } }