Ejemplo n.º 1
0
 public static NotificationSystem.Notice Notification(NotificationSystem.Notice notice)
 {
     try
     {
         var db = AssetController.GetSetting(notice.Guid);
         var n  = new NotificationSystem.Notice().DeserializeFromXmlString <NotificationSystem.Notice>(db.XmlData);
         return(n);
     }
     catch { return(null); }
 }
Ejemplo n.º 2
0
 public static bool Notification(NotificationSystem.Notice notice)
 {
     try
     {
         SettingsDBData db = new SettingsDBData();
         db.Appname = notice.Guid;
         db.XmlData = notice.SerializeToXmlString(notice);
         return(AssetController.PushSetting(db));
     }
     catch { return(false); }
 }
Ejemplo n.º 3
0
 public static Task <bool> NotificationAsync(NotificationSystem.Notice notice)
 {
     return(Task.Run(() =>
     {
         try
         {
             SettingsDBData db = new SettingsDBData();
             db.Appname = notice.Guid;
             db.XmlData = notice.SerializeToXmlString(notice);
             return AssetController.PushSetting(db);
         }
         catch { return false; }
     }));
 }