コード例 #1
0
ファイル: DatabaseJobAdapter.cs プロジェクト: ynzenu/Blog
        private static Control RowFor(AuditLogEntry entry)
        {
            var row = new HtmlGenericControl("tr");

            row.Controls.Add(CellContaining(FormatDateTime(entry.Timestamp)));
            row.Controls.Add(CellContaining(entry.Action.ToDescriptionString()));
            row.Controls.Add(CellContaining(entry.Username));
            row.Controls.Add(CellContaining(entry.Email));
            row.Controls.Add(CellContaining(entry.Message));
            return(row);
        }
コード例 #2
0
ファイル: DatabaseJobAdapter.cs プロジェクト: ynzenu/Blog
        private void AddLogEntry(JobAction action, string messageAmendment = null)
        {
            var entry = new AuditLogEntry
            {
                PluginId = PluginId,
                Action   = action,
                Message  = messageAmendment == null ?
                           Reason :
                           string.Format("{0}<br />{1}", Reason, messageAmendment)
            };
            var store = typeof(AuditLogEntry).GetStore();

            store.Save(entry);
        }
コード例 #3
0
 private void AddLogEntry(JobAction action, string messageAmendment = null)
 {
     var entry = new AuditLogEntry
     {
         PluginId = PluginId,
         Action = action,
         Message = messageAmendment == null ?
                         Reason :
                         string.Format("{0}<br />{1}", Reason, messageAmendment)
     };
     var store = typeof(AuditLogEntry).GetStore();
     store.Save(entry);
 }
コード例 #4
0
 private static Control RowFor(AuditLogEntry entry)
 {
     var row = new HtmlGenericControl("tr");
     row.Controls.Add(CellContaining(FormatDateTime(entry.Timestamp)));
     row.Controls.Add(CellContaining(entry.Action.ToDescriptionString()));
     row.Controls.Add(CellContaining(entry.Username));
     row.Controls.Add(CellContaining(entry.Email));
     row.Controls.Add(CellContaining(entry.Message));
     return row;
 }