///////////////////////////////////////////////////////////////////////////////////////////
        ///////////////////////////////////////////////////////////////////////////////////////////
        ///////////////////////////////////////////////////////////////////////////////////////////


        internal void profitPerItem_UserContolLoaded()
        {
            try {
                UIComboBox.categoriesForSelect(profitPerItem.comboBox_categoryId);
                UIComboBox.companiesForCategory(profitPerItem.comboBox_companyId, Convert.ToInt32(profitPerItem.comboBox_categoryId.SelectedValue));

                profitPerItem.DataTable = new DataTable();
                profitPerItem.DataTable.Columns.Add("a", typeof(int));
                profitPerItem.DataTable.Columns.Add("ID", typeof(String));
                profitPerItem.DataTable.Columns.Add("Category", typeof(String));
                profitPerItem.DataTable.Columns.Add("Company", typeof(String));
                profitPerItem.DataTable.Columns.Add("Item", typeof(String));
                profitPerItem.DataTable.Columns.Add("Profit", typeof(String));

                profitPerItem.DataGridFooter   = new DataGridFooter();
                profitPerItem.dataGrid.IFooter = profitPerItem.DataGridFooter;
                profitPerItem.grid_footer.Children.Add(profitPerItem.DataGridFooter);
                profitPerItem.dataGrid.DataContext = profitPerItem.DataTable.DefaultView;

                profitPerItem.Pagination        = new Pagination();
                profitPerItem.Pagination.Filter = profitPerItem;
                profitPerItem.grid_pagination.Children.Add(profitPerItem.Pagination);
                setProfitPerItemRowsCount();
            } catch (Exception) {
            }
        }
Esempio n. 2
0
 private void comboBox_category_selectItem_SelectionChanged(object sender, SelectionChangedEventArgs e)
 {
     try {
         UIComboBox.companiesForCategory(comboBox_company_selectItem, comboBox_category_selectItem.Value);
         if (textBoxCategory != null)
         {
             textBoxCategory.Text = Convert.ToString(comboBox_category_selectItem.SelectedValue);
         }
     } catch (Exception) {
     }
 }