public JsonResult MarcarComoFavorita(int IdNotificacion) { Notificaciones bll = new Notificaciones(); var response = bll.AddFavorite(IdNotificacion); return(Json(response, JsonRequestBehavior.AllowGet)); }
public JsonResult AgregarFavoritas(int[] notificaciones) { Notificaciones bll = new Notificaciones(); var updated = new List <int>(); foreach (var id in notificaciones) { var response = bll.AddFavorite(id); if (response) { updated.Add(id); } } return(Json(updated, JsonRequestBehavior.AllowGet)); }
//public JsonResult GetLatest(DateTime date) //{ // Notificacion.BLL.Notificaciones bd = new Notificacion.BLL.Notificaciones(); // var list = bd.GetLatest(date); // foreach(var item in list) // { // item.image = ControlUsuario.GetProfilePictureOfUser(item.IdUsuario); // } // return Json(list, JsonRequestBehavior.AllowGet); //} public void AddFavorite(int id) { Notificacion.BLL.Notificaciones n = new Notificacion.BLL.Notificaciones(); n.AddFavorite(id); }