Exemple #1
0
        public DocManager(LOLIB Logger, string sLogId)
        {
            resourceFileManager = ResourceFileManager.Instance;
            resourceFileManager.SetResources();

            _sLogId = sLogId;
            _Logger = Logger;
        }
Exemple #2
0
        public CardManager(LOLIB Logger, string sLogId, string card = "", string connection = "")
        {
            resourceFileManager = ResourceFileManager.Instance;
            resourceFileManager.SetResources();

            _sLogId = sLogId;
            _Logger = Logger;
            if (card != "" && connection != "")
            {
                SVAOLLib.Card sampleCard = new SVAOLLib.Card();
                sampleCard.GUIDconnect = connection;
                sampleCard.GuidCard    = card;
                sampleCard.LoadFromGuid();
                thisCard = sampleCard;
            }
        }
Exemple #3
0
        public Int16 GetIdArchiveByName(string stGuidConnect, string stName)
        {
            //Controllo se non è stato aperto già un File di Log
            Int16 iResult = 0;

            //istanzio l'oggetto SvAol.Session
            SVAOLLib.Session oSession = new SVAOLLib.Session();
            try
            {
                ResourceFileManager resourceFileManager = ResourceFileManager.Instance;
                resourceFileManager.SetResources();
                string sValueFromKey = "";
                if (string.IsNullOrEmpty(sValueFromKey))
                {
                    //controllo se sono già connesso, in caso contrario mi connetto e ritorno la stringa di connessione
                    oSession.GUIDconnect = stGuidConnect;

                    //Inizializzo gli oggetti SvAol necessari
                    SVAOLLib.Archives oArchives = new SVAOLLib.Archives();

                    //Recupero tutti i Tipi documento.
                    oArchives = (SVAOLLib.Archives)oSession.GetArchives(0, 0); //il secondo 0 sta per false

                    //Cerco il Tipo Documento con nome #stName#.
                    foreach (SVAOLLib.Archive oArc in oArchives)
                    {
                        // ERU modifica // if (oDoc.Description.ToUpper() == stName)
                        if (oArc.Description.ToUpper() == stName.ToUpper())
                        {
                            iResult = oArc.Id;
                            break;
                        }
                    }
                }
                else
                {
                    iResult = Int16.Parse(sValueFromKey);
                }
            }
            catch (Exception e)
            {
                throw new Exception(String.Format("{0}>>{1}>>{2}", "ERRORE : GetIdArchiveByName", e.Source, e.Message), e);
            }
            return(iResult);
        }