/// <summary> /// deletes all cached session values in the database. /// </summary> /// <returns></returns> public bool DeleteAllSessionValues() { //status info long lStatusCode = -1; string strStatusComment = ""; //create a new parameter list CDataParameterList pList = new CDataParameterList(); //add params for the DB call // //in paramaters //these will always be passed in to all sp calls pList.AddParameter("pi_vSessionID", DBSessionID, ParameterDirection.Input); pList.AddParameter("pi_vSessionClientIP", ClientIP, ParameterDirection.Input); pList.AddParameter("pi_nUserID", FXUserID, ParameterDirection.Input); //execute the stored procedure DBConn.ExecuteOracleSP("PCK_FX_SEC.DeleteAllSessionValues", pList, out lStatusCode, out strStatusComment); // 0 = success if strStatus is populated it will show on the screen // 1 to n are errors and we always show errors if (lStatusCode == 0) { return(true); } return(false); }
/// <summary> /// gets a cached session value from the database. /// stored encrypted and more secure then an asp.net session var /// </summary> /// <param name="strKey"></param> /// <param name="strKeyValue"></param> /// <returns></returns> public bool GetSessionValue(string strKey, out string strKeyValue) { strKeyValue = ""; //status info long lStatusCode = -1; string strStatusComment = ""; //create a new parameter list CDataParameterList pList = new CDataParameterList(); //in paramaters //these will always be passed in to all sp calls pList.AddParameter("pi_vDBSessionID", DBSessionID, ParameterDirection.Input); pList.AddParameter("pi_vWebSessionID", ASPSessionID, ParameterDirection.Input); pList.AddParameter("pi_vSessionClientIP", ClientIP, ParameterDirection.Input); pList.AddParameter("pi_nUserID", FXUserID, ParameterDirection.Input); // pList.AddParameter("pi_vKey", strKey, ParameterDirection.Input); pList.AddParameter("po_vKeyValue", strKeyValue, ParameterDirection.Output); // //execute the stored procedure DBConn.ExecuteOracleSP("PCK_FX_SEC.GetSessionValue", pList, out lStatusCode, out strStatusComment); // 0 = success if strStatus is populated it will show on the screen // 1 to n are errors and we always show errors if (lStatusCode == 0) { CDataParameter paramValue = pList.GetItemByName("po_vKeyValue"); strKeyValue = paramValue.StringParameterValue; return(true); } strKeyValue = ""; return(false); }