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)); }
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));
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 }));
public override void WriteLine(string message) => EventModel.Add(new EventModel(new TraceEventCache(), string.Empty, TraceEventType.Verbose, 0, message, null));
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 }));
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));
public override void TraceEvent(TraceEventCache eventCache, string source, TraceEventType eventType, int id, string message) => EventModel.Add(new EventModel(eventCache, source, eventType, id, message, null));