public void AddItem(HoSoDoAn hoso, string yKien) { CartLine line = lineCollection.Where(p => p.HoSo.id == hoso.id).FirstOrDefault(); if (line == null) { lineCollection.Add(new CartLine { HoSo = hoso, yKien = yKien }); } else { line.yKien += "\n" + yKien; } }
public void RemoveLine(HoSoDoAn hoso) { lineCollection.RemoveAll(l => l.HoSo.id == hoso.id); }