예제 #1
0
        //---------------------------------------------------------------------------
        public System.Data.DataSet GetServerDesc(int nIdSession)
        {
            CInfoSessionTiag.RenouvelleSession(nIdSession);
            CResultDataSet result = new CResultDataSet(new DataSet());

            result.Data = "This server makes the different objects managed by TIMOS/SMT availiable";
            return(result);
        }
예제 #2
0
        //---------------------------------------------------------------------------
        public System.Data.DataSet GetServerKey(int nIdSession)
        {
            CInfoSessionTiag.RenouvelleSession(nIdSession);
            CResultDataSet result = new CResultDataSet(new DataSet());

            result.Data = CModificateurElementsTiag.c_strServerKey;
            return(result);
        }
예제 #3
0
            //---------------------------------------------------
            public static void RenouvelleSession(int nIdSession)
            {
                CInfoSessionTiag info = null;

                if (m_listeSessions.TryGetValue(nIdSession, out info))
                {
                    info.m_dateTimeSuppression = DateTime.Now.AddMinutes(10);
                }
            }
예제 #4
0
 //---------------------------------------------------
 private static void StaticCloseSession(CInfoSessionTiag info)
 {
     try
     {
         info.SessionClient.CloseSession();
     }
     catch
     {
     }
     if (m_listeSessions.ContainsValue(info))
     {
         m_listeSessions.Remove(info.m_nIdSession);
     }
 }
예제 #5
0
        //---------------------------------------------------------------------------
        public System.Data.DataSet OpenSession()
        {
            CSessionClient session = CSessionClient.CreateInstance();
            CResultAErreur result  = session.OpenSession(new CAuthentificationSessionSousSession(0), "Tiag", ETypeApplicationCliente.Service);

            if (!result)
            {
                return(GetResultDS(result));
            }
            CResultDataSet resDS = new CResultDataSet();

            CInfoSessionTiag.OnCreateSession(session);
            resDS.Data = session.IdSession;
            return(resDS);
        }
예제 #6
0
        //---------------------------------------------------------------------------
        public void CloseSession(int nIdSession)
        {
            CInfoSessionTiag.OnCloseSession(nIdSession);
            CResultDataSet result = new CResultDataSet();
            CUtilTimosTiag util   = CUtilTimosTiag.GetUtilTiagForSession(nIdSession);

            if (util != null)
            {
                util.OnCloseSession();
            }
            CSessionClient session = GetSession(nIdSession, result);

            if (session != null)
            {
                session.CloseSession();
            }
        }
예제 #7
0
        //---------------------------------------------------------------------------
        public System.Data.DataSet RollbackTrans(int nIdSession)
        {
            CInfoSessionTiag.RenouvelleSession(nIdSession);
            CResultDataSet result    = new CResultDataSet();
            CResultAErreur resErreur = new CResultAErreur();
            CSessionClient session   = GetSession(nIdSession, result);

            if (session == null)
            {
                return(result);
            }
            resErreur = session.BeginTrans();
            if (!resErreur)
            {
                return(GetResultDS(resErreur));
            }
            return(result);
        }
예제 #8
0
        //---------------------------------------------------------------------------
        private CSessionClient GetSession(int nIdSession, CResultDataSet result)
        {
            CSessionClient session = CSessionClient.GetSessionForIdSession(nIdSession);

            if (session == null)
            {
                result.EmpileErreur(
                    CodeErreur.AppliErreur,
                    CModificateurElementsTiag.c_strServerKey,
                    I.T("Unknown session @1|20000", nIdSession.ToString()),
                    "",
                    null,
                    (int)Gravite.Indeterminee
                    );
            }
            CInfoSessionTiag.RenouvelleSession(nIdSession);

            return(session);
        }
예제 #9
0
 //---------------------------------------------------
 public static void OnCreateSession(CSessionClient session)
 {
     CInfoSessionTiag info = new CInfoSessionTiag(session);
 }
예제 #10
0
 //---------------------------------------------------------------------------
 public System.Data.DataSet SetParametre(int nIdSession, string strNomParametre, string strValeurParametre)
 {
     CInfoSessionTiag.RenouvelleSession(nIdSession);
     return(CUtilTimosTiag.GetUtilTiagForSession(nIdSession).SetParametre(strNomParametre, strValeurParametre));
 }
예제 #11
0
 //---------------------------------------------------------------------------
 public System.Data.DataSet GetParametersDescription(int nIdSession)
 {
     CInfoSessionTiag.RenouvelleSession(nIdSession);
     return(CUtilTimosTiag.GetUtilTiagForSession(nIdSession).GetParametersDescription());
 }
예제 #12
0
 //---------------------------------------------------------------------------
 public System.Data.DataSet GetKeysEntityFromSearch(int nIdSession, string strType, string[] strChamps, object[] valeurs)
 {
     CInfoSessionTiag.RenouvelleSession(nIdSession);
     return(CUtilTimosTiag.GetUtilTiagForSession(nIdSession).GetKeysEntityFromSearch(strType, strChamps, valeurs));
 }
예제 #13
0
 //---------------------------------------------------------------------------
 public System.Data.DataSet GetEntityFromKeys(int nIdSession, string strType, object[] keys)
 {
     CInfoSessionTiag.RenouvelleSession(nIdSession);
     return(CUtilTimosTiag.GetUtilTiagForSession(nIdSession).GetEntityFromKeys(strType, keys));
 }
예제 #14
0
 //---------------------------------------------------------------------------
 public System.Data.DataSet GetDataStructure(int nIdSession)
 {
     CInfoSessionTiag.RenouvelleSession(nIdSession);
     return(CUtilTimosTiag.GetUtilTiagForSession(nIdSession).GetStructureDonnees());
 }
예제 #15
0
 //---------------------------------------------------------------------------
 public System.Data.DataSet ChangeData(int nIdSession, System.Data.DataSet Donnees)
 {
     CInfoSessionTiag.RenouvelleSession(nIdSession);
     return(CUtilTimosTiag.GetUtilTiagForSession(nIdSession).ChangeData(Donnees));
 }