Saturday, February 13, 2010

HOW TO PASS/USE MULTIPLE Parameters in BLL and DAL

public void AddUserLogs(int uid, string ip, string UserSessionID, string browser, string os)
{
try
{
DAL_Users.AddUserLogs(uid, ip, UserSessionID, browser, os);
}
catch (Exception ex)
{
ex = ex;
}
}

public static void AddUserLogs(int uid, string ip, string UserSessionID, string browser, string os)
{
try
{
string strCon = System.Configuration.ConfigurationSettings.AppSettings["ConnectionString"];
SqlConnection con = new SqlConnection();
con.ConnectionString = strCon;
SqlHelper.ExecuteNonQuery(con, CommandType.StoredProcedure, "360LMS_AddUserLoginLogs", new SqlParameter("@UserID", uid), new SqlParameter("@IP", ip), new SqlParameter("@Browser", browser), new SqlParameter("@OS", os), new SqlParameter("@SessionID", UserSessionID));
}
catch (Exception ex)
{
ex = ex;
}

}

No comments:

Post a Comment