public void Insert(UserLogs objUserLogs) { string sqlQuery = InsertUserLogs; try { conn.Open(); SqlCommand cmd = new SqlCommand(sqlQuery, conn); cmd.Parameters.Add(new SqlParameter("Content", objUserLogs.Content)); cmd.Parameters.Add(new SqlParameter("ControlType", objUserLogs.ControlType)); cmd.Parameters.Add(new SqlParameter("ControlUsageCount", objUserLogs.ControlUsageCount)); cmd.Parameters.Add(new SqlParameter("Hostname", objUserLogs.Hostname)); cmd.Parameters.Add(new SqlParameter("Pagename", objUserLogs.Pagename)); cmd.Parameters.Add(new SqlParameter("PageUsageTime", objUserLogs.PageUsageTime)); cmd.Parameters.Add(new SqlParameter("UserEnter", objUserLogs.UserEnter)); cmd.Parameters.Add(new SqlParameter("UserExit", objUserLogs.UserExit)); cmd.Parameters.Add(new SqlParameter("UserIp", objUserLogs.UserIp)); cmd.Parameters.Add(new SqlParameter("UserAgent", objUserLogs.UserAgent)); cmd.ExecuteNonQuery(); conn.Close(); } catch (Exception ex) { } }
public void PostUserActivities(UserLogs objUserLogs) { objUserLogs.Content = "TestContent"; objUserLogs.ControlType = "TestControl"; objUserLogs.ControlUsageCount = 2; objUserLogs.Hostname = "TestHostName"; objUserLogs.Pagename = "TestPage"; objUserLogs.PageUsageTime = 20; objUserLogs.UserAgent = "TestAgent"; objUserLogs.UserEnter = DateTime.Now; objUserLogs.UserExit = DateTime.Now; objUserLogs.UserIp = "Test"; _bUserInteractions.Insert(objUserLogs); }
public void Insert(UserLogs objUserLogs) { _dUserInteractions.Insert(objUserLogs); }