Exemple #1
0
        /// <summary>
        /// Purpose: Grabs all audit types
        /// Accepts: Nothing
        /// Returns: List<AuditType>
        /// </summary>
        public List<AuditType> GetAllAuditTypes()
        {
            List<AuditType> audittypes = new List<AuditType>();
            try
            {
                AuditTypeData data = new AuditTypeData();
                List<QSRDataObjects.AuditType> dataAudits = data.GetAllAuditTypes();

                foreach (QSRDataObjects.AuditType at in dataAudits)
                {
                    AuditType audittype = new AuditType();
                    audittype.AuditTypeID = Convert.ToInt32(at.AuditTypeID);
                    audittype.Description = at.Description;
                    audittype.IsAdmin = at.IsAdmin;
                    audittypes.Add(audittype);
                }
            }
            catch (Exception ex)
            {
                ErrorRoutine(ex, "AuditType", "GetAllAuditTypes");
            }
            return audittypes;
        }
Exemple #2
0
        /// <summary>
        /// Purpose: Grabs audit type information based on ID
        /// Accepts: Int
        /// Returns: Nothing
        /// </summary>
        public void GetAuditTypeByID(int id)
        {
            try
            {
                AuditTypeData data = new AuditTypeData();
                Hashtable hsh = new Hashtable();

                hsh = data.GetAuditTypeByID(id);

                AuditTypeID = id;
                Description = hsh["description"];
                IsAdmin = hsh["isadmin"];
            }
            catch (Exception ex)
            {
                ErrorRoutine(ex, "AuditType", "GetAuditTypeByID");
            }
        }