public ActionResult Notify() { ThongBaoService _thongbao = new ThongBaoService(); IEnumerable <ThongBao> ds = _thongbao.FindList().Where(x => x.NguoiNhanThongBaoId == User.Identity.GetUserLogin().Userid && x.DaXem == false); return(PartialView("Notify", ds)); }
public ActionResult Notify_Count() { ThongBaoService _thongbao = new ThongBaoService(); IEnumerable <ThongBao> ds = _thongbao.FindList().Where(x => x.NguoiNhanThongBaoId == User.Identity.GetUserLogin().Userid && x.DaXem == false); if (Request.IsAjaxRequest()) { return(Json(ds.Count(), JsonRequestBehavior.AllowGet)); } return(PartialView("Notify", ds.Count())); }