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; }
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(); } }
public ExcelRow(ExcelTable table, uint row, List<CellEntry> entry) { _entry = entry; _table = table; Row = row; }