Esempio n. 1
0
        /// <summary>
        /// Purpose: Grabs audit type information based on ID
        /// Accepts: Int
        /// Returns: Hashtable
        /// </summary>
        public Hashtable GetAuditTypeByID(int id)
        {
            AuditType obj = new AuditType();
            QuickStart_DBEntities dbContext;
            Hashtable hsh = new Hashtable();
            try
            {
                dbContext = new QuickStart_DBEntities();
                obj = dbContext.AuditTypes.FirstOrDefault(a => a.AuditTypeID == id);
                if (obj != null)
                {
                    hsh["audittypeid"] = obj.AuditTypeID;
                    hsh["description"] = obj.Description;
                    hsh["isadmin"] = obj.IsAdmin;
                }
            }
            catch (Exception ex)
            {
                ErrorLoggerData.ErrorRoutine(ex, "AuditTypeData", "GetAuditTypeByID");
            }

            return hsh;
        }
 /// <summary>
 /// Create a new AuditType object.
 /// </summary>
 /// <param name="auditTypeID">Initial value of the AuditTypeID property.</param>
 public static AuditType CreateAuditType(global::System.Int32 auditTypeID)
 {
     AuditType auditType = new AuditType();
     auditType.AuditTypeID = auditTypeID;
     return auditType;
 }
 /// <summary>
 /// Deprecated Method for adding a new object to the AuditTypes EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
 /// </summary>
 public void AddToAuditTypes(AuditType auditType)
 {
     base.AddObject("AuditTypes", auditType);
 }