Exemplo n.º 1
0
        public void FillList()
        {
            InventoryTable.Rows.Clear();
            List <object[]> IngList = FoodDB.GetIngredientList();

            foreach (var Ingredient in IngList)
            {
                int addedRow = InventoryTable.Rows.Add(Ingredient);
                if (InventoryTable.Rows[addedRow].Cells[2].Value.ToString().StartsWith("0"))
                {
                    InventoryTable.Rows[addedRow].DefaultCellStyle.BackColor = Color.Pink;
                }
            }
        }
Exemplo n.º 2
0
        private void FillListOfIngredients()
        {
            isFilling = true;

            chart.Series.Clear();
            List <object[]> ingredients = FoodDB.GetIngredientList();

            foreach (var ing in ingredients)
            {
                listOfIngredients.Items.Add(text: ing[1 /*name*/].ToString()).Tag = ing[0 /*id*/].ToString();
            }

            isFilling = false;
        }