コード例 #1
0
        /// <summary>
        /// Fills the entry list with entrys
        /// </summary>
        public void FillEntryTable()
        {
            TableDay.Items.Clear();
            TableDay.Items.Refresh();
            Db.Clear(); //Database to Fill the Table
            foreach (Day d in CurrWeek.DaysInWeek)
            {
                int counter = 0;
                if (d.Name == CurrDay)
                {
                    foreach (Entry e in d.Entrys)
                    {
                        counter++;
                        DataBoxForGrid data = new DataBoxForGrid(e.ProductForEntry.Id, e.ProductForEntry.Name, e.Amount,
                                                                 e.AmountOnTheHouse, e.ProductForEntry.Price, e.Price, counter, CurrDay,
                                                                 e.ProductForEntry.Amount,
                                                                 e.ProductForEntry.KindOfAmount); //Makes a new Object to add to the table
                        TableDay.Items.Add(data);
                        Db.Add(data);
                    }

                    break;
                }
            }
        }
コード例 #2
0
        public void FillEntrys()
        {
            TableDay.Items.Clear();
            TableDay.Items.Refresh();
            db.Clear();
            int counter;

            foreach (Day d in currWeek.DaysInWeek)
            {
                counter = 0;
                if (d.Name == currDay)
                {
                    foreach (Entry e in d.Entrys)
                    {
                        counter++;
                        var data = new DataBoxForGrid(e.ProductForEntry.ID, e.ProductForEntry.Name, e.Amount, e.AmountOnTheHouse, e.ProductForEntry.Price, e.Price, counter, currDay, e.ProductForEntry.Amount, e.ProductForEntry.KindOfAmount);
                        db.Add(data);
                        TableDay.Items.Add(data);
                    }
                    break;
                }
            }
        }