public static String getNumNots() { int nv = 0; if (new Calendrier().Session["idUser"] != null) { idUser = Int32.Parse(new Calendrier().Session["idUser"].ToString()); ActionsNotification actionsNotification = new ActionsNotification(); Utilisateur u = new ActionsUtilisateur().rechercheUtilisateurParId(idUser); List <Notification> nS = actionsNotification.listerNotificationUtilisateur(u); nv = 0; foreach (var n in nS) { if (n.Vu == 0) { nv++; } } } else { return("veuillez verifiez votre connection !"); } return(nv + ""); }
public static String getNotifications() { ActionsNotification actionsNotification = new ActionsNotification(); List <Notification> nS = actionsNotification.listerNotificationUtilisateur(new ActionsUtilisateur().rechercheUtilisateurParId(idUser)); String s = ""; foreach (var n in nS) { s += generateNotif(n); } return(s); }
public static String marquerVuNotif(String idNotif) { int idNot = Int32.Parse(idNotif); Notification n = new ActionsNotification().getNotificationByID(idNot); if (n.Vu == 0) { n.Vu = 1; new ActionsNotification().modifierNotification(n); } return(getNumNots()); }
public static String getNotifications() { ActionsNotification actionsNotification = new ActionsNotification(); List <Notification> nS = actionsNotification.listerTousNotification(); String s = ""; foreach (var n in nS) { s += generateNotif(n); } return(s); }
public static String getNumNots() { int nv = 0; if (new Calendrier().Session["idUser"] != null) { ActionsNotification actionsNotification = new ActionsNotification(); List <Notification> nS = actionsNotification.listerTousNotification(); nv = 0; foreach (var n in nS) { if (n.Vu == 0) { nv++; } } } else { return("veuillez verifiez votre connection !"); } return(nv + ""); }
public HangFireUtil(ActionsFichier actionsFichier) { this.actionsFichier = actionsFichier; this.actionsNotification = ActionsNotification.getInstance(); }