Example #1
0
 public Boolean InsertCSScreen(CSScreen screen)
 {
     InitDB();
     User newUser = new User();
     CSScreen newScreen = new CSScreen();
     newScreen.Computername = screen.Computername;
     newScreen.Computerlocation = screen.Computerlocation;
     newScreen.Hardwareid = screen.Hardwareid;
     newScreen.Isdirectional = screen.Isdirectional;
     newScreen.Screenlocation = screen.Screenlocation;
     newScreen.Screennumber = screen.Screennumber;
     newScreen.Thumbnail = screen.Thumbnail;
     newScreen.Thumbnaildatetime = screen.Thumbnaildatetime;
     newScreen.Defaulttemplate = screen.Defaulttemplate;
     Boolean functionResult = false;
     try
     {
         newScreen.Save();
         functionResult = true;
     }
     catch (Exception ex)
     {
         functionResult = false;
     }
     return functionResult;
 }
Example #2
0
        public Boolean ChangeCSScreen(CSScreen screen)
        {
            InitDB();
            CSScreen newScreen = new CSScreen();

            newScreen.LoadByPrimaryKey((long)screen.Id);
            newScreen.Computerlocation = screen.Computerlocation;
            newScreen.Computername = screen.Computername;
            newScreen.Hardwareid = screen.Hardwareid;
            newScreen.Isdirectional = screen.Isdirectional;
            newScreen.Lastqueriedcore = screen.Lastqueriedcore;
            newScreen.Screenlocation = screen.Screenlocation;
            newScreen.Screennumber = screen.Screennumber;
            newScreen.Thumbnail = screen.Thumbnail;
            newScreen.Thumbnaildatetime = screen.Thumbnaildatetime;

            Boolean functionResult = false;
            try
            {
                newScreen.Save();
                functionResult = true;
            }
            catch (Exception ex)
            {
                functionResult = false;
            }
            return functionResult;
        }
Example #3
0
 public Boolean RemoveCSScreen(CSScreen screen)
 {
     InitDB();
     try
     {
         screen.MarkAsDeleted();
         screen.Save();
         Console.WriteLine(DateTime.Now.ToShortTimeString()+"  "+"Display deleted ok");
     }
     catch (Exception ex)
     {
         Console.WriteLine(DateTime.Now.ToShortTimeString()+"  "+"Error deleting display");
         return false;
     }
     return true;
 }