예제 #1
0
        public Admin()
        {


            var versionstring = "100";

            version = double.Parse(versionstring);
            dc = new AlsiTMDataContext();
            mac = Utilities.GetMacAddress().First();
            CreateNewUserIfNotExist();
            UserID = dc.tblUsers.Where(z => z.USER_MACADRESS == mac).Select(z => z.ID).First();
            UserList = dc.tblUsers.ToList();
            var user = dc.tblUsers.Where(z => z.USER_MACADRESS == mac).First();
            if (GetNewVersionNumber(user) > version)
            {
                var u = new UpdateForm("https://www.dropbox.com/s/rcnhl5eab7f2ywp/WebNotify.zip");
                u.ShowDialog();
            }

            var log = new tblLog
            {
                LOG_TS = DateTime.UtcNow.AddHours(2),
                LOG_USER_ID = user.ID,
                LOG_VERSION = version.ToString(),
            };
            dc.tblLogs.InsertOnSubmit(log);
            dc.SubmitChanges();
        }
예제 #2
0
 partial void DeletetblLog(tblLog instance);
예제 #3
0
 partial void UpdatetblLog(tblLog instance);
예제 #4
0
 partial void InserttblLog(tblLog instance);
 partial void DeletetblLog(tblLog instance);
 partial void UpdatetblLog(tblLog instance);
 partial void InserttblLog(tblLog instance);