예제 #1
0
        public ActionResult DanhSachTinLienQuan(int pGroupId, int pNewsId)
        {
            V308CMSEntities mEntities      = new V308CMSEntities();
            NewsRepository  newsRepository = new NewsRepository(mEntities);
            List <News>     mList          = null;
            string          str            = "";

            try
            {
                //lay danh sach tin lien quan
                mList = newsRepository.LayDanhSachTinTheoGroupId(6, pGroupId);
                //tao HTML
                str = V308HTMLHELPER.TaoDanhSachNhomTinLienQuan(mList, pNewsId);
                return(View((object)str));
            }
            catch (Exception ex)
            {
                return(Content("<dx></dx>"));
            }
            finally
            {
                mEntities.Dispose();
                newsRepository.Dispose();
            }
        }