示例#1
0
        public virtual ActionResult Add(EventModel model)
        {
            if (ModelState.IsValid)
            {
                Status status;
                if (model.Add(out status))
                {
                    ModelState.AddModelError("Error", "Successfully added new system event");
                }
                else
                {
                    ModelState.AddModelError("Error", status.Message());
                }
            }
            else
            {
                ModelState.AddModelError("Error", "Please update the required fields");
            }

            return(View(model));
        }
示例#2
0
 public override void TraceData(TraceEventCache eventCache, string source, TraceEventType eventType, int id, params object[] data)
 => EventModel.Add(new EventModel(eventCache, source, eventType, id, null, data));
示例#3
0
 public override void TraceData(TraceEventCache eventCache, string source, TraceEventType eventType, int id, object data)
 => EventModel.Add(new EventModel(eventCache, source, eventType, id, null, new[] { data }));
示例#4
0
 public override void WriteLine(string message)
 => EventModel.Add(new EventModel(new TraceEventCache(), string.Empty, TraceEventType.Verbose, 0, message, null));
示例#5
0
 public override void TraceTransfer(TraceEventCache eventCache, string source, int id, string message, Guid relatedActivityId)
 => EventModel.Add(new EventModel(eventCache, source, TraceEventType.Transfer, id, message, new object[] { relatedActivityId }));
示例#6
0
 public override void TraceEvent(TraceEventCache eventCache, string source, TraceEventType eventType, int id, string format, params object[] args)
 => EventModel.Add(new EventModel(eventCache, source, eventType, id, format, args));
示例#7
0
 public override void TraceEvent(TraceEventCache eventCache, string source, TraceEventType eventType, int id, string message)
 => EventModel.Add(new EventModel(eventCache, source, eventType, id, message, null));