示例#1
0
        public List<ngFoodItem> GetFoodsInternal(ExcelTable excelTable)
        {
            List<ngFoodItem> res = new List<ngFoodItem>();
            List<ExcelRow> rows = excelTable.Rows;
            foreach (ExcelRow row in rows) {
                if (row.HasPrice && !string.IsNullOrEmpty(row.Name)) {
                    ngFoodItem item = new ngFoodItem();
                    Debug.Assert(!string.IsNullOrEmpty(row.Name));
                    item.Name = row.Name;
                    item.Description = row.Description;

                    item.isContainer = row.IsContainer();
                    item.isBigContainer = row.IsBigContainer();
                    item.isSmallContainer = row.IsSmallContainer();
                    item.isSalat = row.IsSalat();
                    item.isGarnir = row.IsGarnir();
                    item.isMeatOrFish = row.IsMeatOrFish();
                    item.isKvasolevaOrChanachi = row.IsKvasolevaOrChanachi();
                    item.isFirst = row.IsFirst();
                    item.IsByWeightItem = row.IsByWeightItem();
                    item.Price = row.Price;
                    item.FoodId = row.GetFoodId();
                    item.Category = row.Category;

                    res.Add(item);
                }
            }
            return res;
        }
示例#2
0
        public void Parse()
        {
            for (int i = 0; i < 5; ++i) {
                WorksheetEntry worksheetEntry = GetWorksheetEntry(_entry, i);

                ExcelTable table = new ExcelTable(i,this, worksheetEntry,_service);
                table.Title = worksheetEntry.Title.Text;
                this.Tables.Add(table);
                table.Parse();
            }
        }
示例#3
0
 public ExcelRow(ExcelTable table, uint row, List<CellEntry> entry)
 {
     _entry = entry;
     _table = table;
     Row = row;
 }