private void CreateTrTipNamirnice(int id, StringBuilder sb)
 {
     foreach (var item in repoNamirnica.GetIngredientForMeal(id))
     {
         sb.Append("<tr>");
         sb.Append($"<td style='padding:0;'>{item.TipNamirnice} </td>");
         sb.Append("</tr>");
     }
 }
        public List <KreiraniObrok> GetCreatedMealListByDate(string datum)
        {
            INamirnica           repo      = RepoFactory.GetNamirnicaRepo();
            List <KreiraniObrok> kolekcija = new List <KreiraniObrok>();

            var meals = FilterMealByDate(datum);

            foreach (var item in meals)
            {
                KreiraniObrok obrok = new KreiraniObrok();
                obrok.IDObrok        = item.IDObrok;
                obrok.DatumIzrade    = item.DatumIzrade;
                obrok.NazivObroka    = item.NazivObroka;
                obrok.ListaNamirnica = repo.GetIngredientForMeal(item.IDObrok);
                kolekcija.Add(obrok);
            }

            return(kolekcija);
        }
        public List <KreiraniObrok> GetMealsForUserById(int idKorisnik)
        {
            INamirnica repo = RepoFactory.GetNamirnicaRepo();

            ds = SqlHelper.ExecuteDataset(cs, "GetMealsForUser", idKorisnik);
            List <KreiraniObrok> kolekcija = new List <KreiraniObrok>();

            foreach (DataRow row in ds.Tables[0].Rows)
            {
                KreiraniObrok o = new KreiraniObrok();
                o.IDObrok        = (int)row["IDObrok"];
                o.NazivObroka    = (string)row["NazivObroka"];
                o.DatumIzrade    = (DateTime)row["DatumIzrade"];
                o.ListaNamirnica = repo.GetIngredientForMeal(o.IDObrok); //????
                kolekcija.Add(o);
            }

            return(kolekcija);
        }