Beispiel #1
0
        /// <summary>
        ///  THIS FUNCTION HAS NOT BEEN FULLY IMPLEMENTED
        ///  Designed to act as a reporting/notification module for users and admins
        /// </summary>



        /// <summary>
        ///  Searches for all Incidences created via IncidenceDAL.loadIncidentList();
        ///  returns list of IncidentModels
        /// </summary>
        public static List <IncidentModel> GetIncidentList()
        {
            List <IncidentModel> incidences = new List <IncidentModel>();

            incidences = IncidenceDAL.loadIncidentList();

            return(incidences);
        }
Beispiel #2
0
 /// <summary>
 /// Deletes all incidents associated with a building by buildingID via IncidenceDAL.incAllBuildingDelete(id);
 /// </summary>
 public static void passBuildingDelete(int id)
 {
     try
     {
         IncidenceDAL.incAllBuildingDelete(id);
     }
     catch
     {
     }
 }
Beispiel #3
0
 /// <summary>
 /// Deletes all incidents associated with a room by roomID via IncidenceDAL.incAllRoomDelete(id);
 /// </summary>
 public static void passRoomDelete(int id)
 {
     try
     {
         IncidenceDAL.incAllRoomDelete(id);
     }
     catch
     {
     }
 }
Beispiel #4
0
 /// <summary>
 /// Deletes all incidents associated with a table by tableID via IncidenceDAL.incAllTableDelete(id);
 /// </summary>
 public static void passTableDelete(int id)
 {
     try
     {
         IncidenceDAL.incAllTableDelete(id);
     }
     catch
     {
     }
 }
Beispiel #5
0
 /// <summary>
 /// Passes Incident Model to IncidenceDAL.AddNewIncidentTable(incident);
 /// Creates new Incident
 /// </summary>
 public static void datalayerpassadd(IncidentModel incident)
 {
     try
     {
         IncidenceDAL.AddNewIncidentTable(incident);
     }
     catch
     {
         // insulation
     }
 }
Beispiel #6
0
        /// <summary>
        /// Calls by user ID and User Email
        /// IncidenceDAL.incAllUserDelete(userID);
        /// BookingDAL.BookingAllUserDelete(user.Email);
        /// UserDAL.deleteUser(userID);
        /// to delete a user and all referances to the user in the database
        /// </summary>
        public static void userDelete(int userID)
        {
            UserModel user = new UserModel();

            /// access user delete function
            ///

            user = getUserByID(userID);

            IncidenceDAL.incAllUserDelete(userID);
            BookingDAL.BookingAllUserDelete(user.Email);
            UserDAL.deleteUser(userID);

            /*bool success;
             * try
             * {
             *
             *  return success = true;
             * }
             * catch
             * {
             *  return success = false;
             * }*/
        }
Beispiel #7
0
        /// <summary>
        /// Searches Incidence table by date and User ID usinf a incidence Model
        /// Via IncidenceDAL.searchviadateandUserID(user);
        ///
        /// </summary>
        public static IncidentModel searchviadateandUserID(IncidentModel user)
        {
            IncidentModel incident = IncidenceDAL.searchviadateandUserID(user);

            return(incident);
        }
Beispiel #8
0
 /// <summary>
 /// Updates status to the value of I (1 or 0)
 ///
 /// </summary>
 public static void EditStatus(int i)
 {
     IncidenceDAL.EditIncidentStatusByID(i);
 }
Beispiel #9
0
 /// <summary>
 /// Deletes incident by Incident ID via IncidenceDAL.DeleteIncidentByID(incID);
 /// </summary>
 public static void DeleteRow(int incID)
 {
     IncidenceDAL.DeleteIncidentByID(incID);
 }
        public static void incidentdeleter()
        {
            // calls a IncidentDAL method deleting all old incidents

            IncidenceDAL.incOldIncDelete();
        }