示例#1
0
 public ScheduleCollection CollectScheduleForScreen()
 {
     InitDB();
     ScheduleCollection scheduleToReturn = new ScheduleCollection();
     scheduleToReturn.LoadAll();
     ScreenCollection sc = new ScreenCollection();
     sc.LoadAll();
     Console.WriteLine("LICENSING: " + sc.Count().ToString() + " OF 10 LICENSES ACTIVE");
     return scheduleToReturn;
 }
示例#2
0
 public ScreenCollection CollectScreens()
 {
     InitDB();
     ScreenCollection scrc = new ScreenCollection();
     scrc.LoadAll();
     return scrc;
 }
示例#3
0
 public string RegisterDisplayClientLogin(string screenid)
 {
     InitDB();
     string functionResult = "_none"; ;
     ScreenCollection screenCollection = new ScreenCollection();
     screenCollection.Query.Where(screenCollection.Query.Screenname.Equal(screenid));
     screenCollection.Query.Load();
     if (screenCollection.Count <= 0) //New
     {
         Screen newScreen = new Screen();
         newScreen.Screenname = screenid;
         newScreen.Description = "New";
         newScreen.Location = "Default";
         newScreen.Groupid = "Global";
         newScreen.Lastactive = (DateTime)DateTime.Now;
         functionResult = "_registered";
         try
         {
             newScreen.Save();
             functionResult = "_registered";
         }
         catch (Exception ex)
         {
             functionResult = "_error";
         }
     }
     else
     {
         foreach (Screen item in screenCollection)
         {
             item.Lastactive = (DateTime)DateTime.Now;
             functionResult = item.Groupid;
         }
         screenCollection.Save();
     }
     return functionResult;
 }