public void Prepare()
 {
     prodRef = new ProductReference.ProductClient();
     catRef  = new CategoryReference.CategoryClient();
     prods   = new List <ProductReference.TProduct>(prodRef.ReadAll());
     cats    = new List <CategoryReference.TCategory>(catRef.ReadAll());
 }
        void prepareComboBoxes()
        {
            //newCategoryComboBox.DataSource = categoryRef.ReadAll();
            //categoryComboBox.DataSource = categoryRef.ReadAll();
            List <TCategory> cats = new List <TCategory>(categoryRef.ReadAll());

            foreach (TCategory cat in cats)
            {
                newCategoryComboBox.Items.Add(cat);
                categoryComboBox.Items.Add(cat);
            }
        }
Example #3
0
 private void refreshButton_Click(object sender, EventArgs e)
 {
     categoriesBox.DataSource = null;
     categoriesBox.Items.Clear();
     categoriesBox.DataSource = categoryRef.ReadAll();
 }