public virtual void CloseSession(int nIdSession) { C2iSessionWeb session = GetSessionWeb(nIdSession); if (session != null) { session.Close(); } }
protected static C2iSessionWeb GetSessionWeb(int nIdSession) { C2iSessionWeb session = ( C2iSessionWeb )m_tableSessionsWeb[nIdSession]; if (session != null) //Augment la durée de vie de 5 minutes { session.DatePeremption = DateTime.Now.AddMinutes(10); } return(session); }
private static void StaticCloseSession(int nIdSessionPDA) { C2iSessionWeb session = GetSessionWeb(nIdSessionPDA); if (session == null) { return; } m_tableSessionsWeb.Remove(nIdSessionPDA); session.Close(); }
protected CResultAErreur PrivateOpenSession(C2iSessionWeb session) { CResultAErreur result = session.OpenSession(); if (result) { m_tableSessionsWeb[session.IdSessionWeb] = session; session.DatePeremption = DateTime.Now.AddMinutes(1); } return(result); }