Exemplo n.º 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;
 }
Exemplo n.º 2
0
 public static DataTable Connect(string userName)
 {
     var oNoti = new TMSDataLibrary.Notifications();
     return oNoti.Connect(userName);
 }
Exemplo n.º 3
0
 public static int AddNotification(Notifications oNotification)
 {
     var oNoti = new TMSDataLibrary.Notifications();
     return oNoti.AddNotification(oNotification.Title, oNotification.Message, oNotification.FromUserId,
         oNotification.ToUserId);
 }