Exemple #1
0
        public bool Add(string UserName, string SystemID)
        {
            AUTH_LOGIN_LOG LoginLog = new AUTH_LOGIN_LOG();

            LoginLog.LOG_ID           = LoginLogRepository.GetNewID("AUTH_LOGIN_LOG", "LOG_ID");
            LoginLog.LOGIN_PC         = System.Net.Dns.Resolve(System.Net.Dns.GetHostName()).AddressList[0].ToString();
            LoginLog.LOGIN_TIME       = DateTime.Now.ToString("yyyy/MM/dd HH:mm:ss");
            LoginLog.SYSTEM_SYSTEM_ID = SystemID;
            LoginLog.USER_USER_ID     = UserRepository.GetSingle(i => i.USER_NAME == UserName).USER_ID;

            LoginLogRepository.Add(LoginLog);
            LoginLogRepository.SaveChanges();
            return(true);
        }