Ejemplo n.º 1
0
        /// <summary>
        /// Purpose: Grabs audit information based on ID
        /// Accepts: Int
        /// Returns: Hashtable
        /// </summary>
        public Hashtable GetAuditByID(int id)
        {
            Audit obj = new Audit();
            QuickStart_DBEntities dbContext;
            Hashtable hsh = new Hashtable();
            try
            {
                dbContext = new QuickStart_DBEntities();
                obj = dbContext.Audits.FirstOrDefault(a => a.AuditID == id);
                if (obj != null)
                {
                    hsh["auditid"] = obj.AuditID;
                    hsh["audittypeid"] = obj.AuditTypeID;
                    hsh["userid"] = obj.UserID;
                    hsh["adminid"] = obj.AdminID;
                    hsh["notes"] = obj.Notes;
                    hsh["created"] = obj.Created;
                }
            }
            catch (Exception ex)
            {
                ErrorLoggerData.ErrorRoutine(ex, "AuditData", "GetAuditByID");
            }

            return hsh;
        }
Ejemplo n.º 2
0
 /// <summary>
 /// Create a new Audit object.
 /// </summary>
 /// <param name="auditID">Initial value of the AuditID property.</param>
 public static Audit CreateAudit(global::System.Int32 auditID)
 {
     Audit audit = new Audit();
     audit.AuditID = auditID;
     return audit;
 }
Ejemplo n.º 3
0
 /// <summary>
 /// Deprecated Method for adding a new object to the Audits EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
 /// </summary>
 public void AddToAudits(Audit audit)
 {
     base.AddObject("Audits", audit);
 }