Esempio n. 1
0
        /// <summary>
        /// 登录日志
        /// </summary>
        /// <param name="dat">人员信息</param>
        /// <param name="logicGuid">日志配对标识</param>
        /// <param name="hostIP">localhost地址</param>
        /// <param name="url">RM系统地址</param>
        /// <param name="timeOut">Session过期时间</param>
        /// <param name="type">T:Login F:LogOff</param>
        public void Loger(UserData dat, string logicGuid, string hostIP, string url, int timeOut, bool type)
        {
            T_EmployeeLoginOutLog empLog = new T_EmployeeLoginOutLog
            {
                EmployeeFullName = dat.LoginFullName,
                EmployeeGUID     = dat.GUID,
                EmployeeNumber   = dat.LoginName,
                GUID             = Guid.NewGuid().ToString(),
                LogicGUID        = logicGuid,
                Time             = DateTime.Now,
                TimeUTC          = DateTime.UtcNow,
                Type             = type,
                SessionTimeOut   = type ? timeOut : 0,
                LoginAddressIP   = hostIP
            };

            new UserVerify(url).CreateLog(empLog);
        }
Esempio n. 2
0
 /// <summary>
 /// 插入日志
 /// </summary>
 /// <param name="log">日志对象</param>
 /// <param name="strIP">IP地址</param>
 /// <HttpMethod>POST</HttpMethod>
 /// <returns></returns>
 public bool CreateLog(T_EmployeeLoginOutLog log)
 {
     log.SystemID = originSystemID;
     return(APIRequest <bool>("/api/ApiLog/InsertLoginOutLog?accountid=" + accID, log, HttpMethod.Post.Method));
 }