Beispiel #1
0
 public void LogTrace(string trace)
 {
     if (null != trace) {
         ngTraceModel lTrace = new ngTraceModel();
         lTrace.Date = DateTime.Now;
         lTrace.Message = trace;
         ngUserModel ngUserModel = ApiUtils.GetLoggedInUser();
         lTrace.UserName = ngUserModel != null ? ngUserModel.Name : "";
         List<ngTraceModel> lTraces = GetTraces();
         lTraces.Add(lTrace);
         Save(lTraces);
     }
 }
Beispiel #2
0
 private void requestGetTraces()
 {
     jQuery.ajax(new AjaxSettings {
         type = "GET",
         dataType = "json",
         url = jsUtils.inst.getLocation() + "/api/trace",
         success = delegate(object o, JsString s, jqXHR arg3) {
             ngTraceModel res = o.As<ngTraceModel>();
             this.ngTraceModel = res;
             _scope.apply();
         }
     });
 }