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