I have a problem with assigning value to declared collection in razor in view.

decimal? bonus=null;
string tmpSklep = null;
ICollection<marketPromocji.Models.rozliczenia> rozliczenia = null;

ViewBag.Title = "UserPromotions";
@tmpSklep=shop.nr_abc_sklepu.Substring(0,12); @*here and in line under is problem*@

@rozliczenia=promotion.promocje.rozliczenia.Where(x => x.identyfikator_promocji == promotion.ref_promocja).ToList();
                                @foreach(marketPromocji.Models.rozliczenia r in rozliczenia)
                                        @String.Format("{0:0.00}", r.naleznyBonus)<text> zł</text>

The problem is that values are not assigning to variable tmpSklep and rozliczenia. In my View I am getting something what should not be there problem

Related posts

Recent Viewed