Example #1
0
 public static List<Notifications> GetNotifications(int userId)
 {
     var oNoti = new TMSDataLibrary.Notifications();
     var dt = oNoti.GetNotifications(userId);
     var lstNotifications = (from DataRow row in dt.Rows
                             select new Notifications()
                             {
                                 NotificationId = Convert.ToInt32(row["NotificationId"]),
                                 Title = row["Title"].ToString(),
                                 Message = row["Message"].ToString(),
                                 IsRead = Convert.ToInt32(row["IsRead"])
                             }).ToList();
     return lstNotifications;
 }