Example #1
0
        public void getData()
        {
            Models.NewsEntities db = new Models.NewsEntities();

            rpPost.DataSource = db.DanhMuc_SelectAll();
            rpPost.DataBind();

            rpNew.DataSource = db.ChiTiet_SelectNew();
            rpNew.DataBind();
        }
 public string getAnhDaiDien(int Idbv)
 {
     Models.NewsEntities db  = new Models.NewsEntities();
     Models.Media        obj = db.Media.FirstOrDefault(x => x.Id_Post == Idbv);
     if (obj == null)
     {
         return("");
     }
     else
     {
         return(obj.Url);
     }
 }