Пример #1
0
        private void savelog()
        {
            try
            {
                DataClasses1DataContext db1 = new DataClasses1DataContext();
                var log = new userlog();
                log.hostname = Dns.GetHostName();

                IPHostEntry MyEntry   = Dns.GetHostByName(Dns.GetHostName());
                IPAddress   MyAddress = new IPAddress(MyEntry.AddressList[0].Address);
                log.IP       = MyAddress.ToString();
                log.name     = "sys";
                log.userlog1 = "restarttomcat";
                log.realname = "sys";
                db1.userlog.InsertOnSubmit(log);
                db1.SubmitChanges();
            }
            catch { }
        }
 partial void Deleteuserlog(userlog instance);
 partial void Updateuserlog(userlog instance);
 partial void Insertuserlog(userlog instance);