Beispiel #1
0
 public static void InsertEvent(string msg, string type, string data = null, string dcase = null, string dstudy = null, string dseries = null)
 {
     try
     {
         Event e = new Event();
         e.Type      = type;
         e.Message   = msg;
         e.TimeStamp = DateTime.Now;
         e.Data      = data;
         if (dcase != null)
         {
             e.InternalId = dcase;
         }
         if (dstudy != null)
         {
             e.StudyUid = dstudy;
         }
         if (dseries != null)
         {
             e.SeriesUid = dseries;
         }
         APetaPoco.SetConnectionString("cn1");
         var bm = APetaPoco.PpInsert(e);
         if (!bm.Success)
         {
             LOG.Write(bm.Message);
         }
     }
     catch (Exception ex)
     {
         string errorString = "Error at :" + System.Reflection.MethodBase.GetCurrentMethod().Name;
         LOG.Write(errorString);
         LOG.Write(ex.Message);
     }
 }