}//end constructor //Utils public static List <NotificationUsers> GetAllNotificationUsers() { //local var List <NotificationUsers> NList = new List <NotificationUsers>(); DataSet ds = new DataSet(); //get dataset of invoice by id ds = NotificationUsersDB.GetAllNotificationUsers(); //check for null DataSet if (ds != null) { if (ds.Tables[0].Rows.Count > 0) { foreach (DataRow dr in ds.Tables[0].Rows) { //localvar NotificationUsers NU = new NotificationUsers (int.Parse(dr["NotificationUserID"].ToString()), int.Parse(dr["BillSent"].ToString()), int.Parse(dr["BillTimer"].ToString()), dr["TUID"].ToString()); //add to list NList.Add(NU); }//end foreach //return list return(NList); } //end if inner } //end if outter return(null); } //end GetAllNotificationUsers
private static List <NotificationUsers> GetCheckedUsersList(List <NotificationUsers> NList) { Console.WriteLine("Reducing Notification List..."); NList = NotificationUsers.GetUsersWithTimeOutNotificationChecked(NList); //Reduce NList to Users that have timed out notifications checked Console.WriteLine("List Reduced"); return(NList); }
private static List <NotificationUsers> GetUserNotificationList() { List <NotificationUsers> NList; Console.WriteLine("Attempting to get User Notification Settings..."); NList = NotificationUsers.GetAllNotificationUsers(); if (NList != null) { Console.WriteLine("User Notification Settings = SUCCESS"); }//end if else { Console.WriteLine("User Notification Settings = FAILED"); }//end else return(NList); }