//Operation log public void InsertOperationLog(int userId, int operationId) { var operationLog = new OperationLog { UserId = userId, OperationId = operationId, LogDateTime = DateTime.Now, IpAddress = ClientInfoHelper.GetHostIp() }; _commonDataAccess.InsertOperationLog(operationLog); }
public virtual Counter GetCounter() { var ipAddress = ClientInfoHelper.GetHostIp(); var counterList = _commonDataAccess.GetCounterByIp(ipAddress); if (counterList == null) { return(null); } if (counterList.Count == 0) { ipAddress = ClientInfoHelper.GetHostName(); counterList = _commonDataAccess.GetCounterByIp(ipAddress); } if (counterList.Count == 0) { return(null); } return(counterList[0] as Counter); }