public List<WebPortal.Model.TaiNguyen> GetListTaiNguyenAttached() { WebPortal.TaiNguyen_TinTuc taiNguyenTT = new TaiNguyen_TinTuc(); List<WebPortal.Model.TaiNguyen_TinTuc> listTNTT = taiNguyenTT.GetFollowIDTinTuc(Convert.ToInt32(Request.QueryString["idNews"])); WebPortal.TaiNguyen taiNguyen = new TaiNguyen(); List<WebPortal.Model.TaiNguyen> listTaiNguyen = new List<Model.TaiNguyen>(); foreach (WebPortal.Model.TaiNguyen_TinTuc tnTT in listTNTT) { foreach (WebPortal.Model.TaiNguyen tn in taiNguyen.All()) { if (tnTT.IDTaiNguyen == tn.IDTaiNguyen) listTaiNguyen.Add(tn); } } return listTaiNguyen; }
public List<WebPortal.Model.TaiNguyen> GetAll() { WebPortal.TaiNguyen taiNguyen = new TaiNguyen(); return taiNguyen.All(); }