Пример #1
0
 private void bnPurge_Click(object sender, EventArgs e)
 {
     if (PurgeRequested != null)
     {
         AuditTrailPurgeEventArgs eventargs = new AuditTrailPurgeEventArgs(PurgeDate);
         PurgeRequested(this, eventargs);
     }
 }
Пример #2
0
        /// <summary>
        /// Called when we are to purge the database of audit trail entries
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        void purgeControl_PurgeRequested(object sender, AuditTrailPurgeEventArgs e)
        {
            AuditTrailDAO lwDataAccess = new AuditTrailDAO();
            int           purgeCount   = lwDataAccess.AuditTrailPurge(e.PurgeDate);

            if (purgeCount == 0)
            {
                MessageBox.Show("No audit trail entries were purged", "No Items Purged");
            }
            else if (purgeCount == 1)
            {
                MessageBox.Show("1 audit trail entry was", "Item Purged");
            }
            else
            {
                MessageBox.Show(String.Format("{0} audit trail entries were purged", purgeCount), "Items Purged");
            }
        }