Esempio n. 1
0
        public CardVisibilityManager(string sGuidCard, string strConnection)
        {
            Guid oCardId;

            if (sGuidCard.Length > 12)                             // set the guid of the card
            {
                oCardId = new Guid("64556990-b196-425c-a0b9-" + int.Parse(sGuidCard.Substring(24, 12)).ToString("000000000000"));
            }
            else
            {
                oCardId = new Guid("64556990-b196-425c-a0b9-" + int.Parse(sGuidCard).ToString("000000000000"));
            }
            SVAOLLib.Card oCard = new SVAOLLib.Card();
            oCard.GUIDconnect = strConnection;
            oCard.GuidCard    = oCardId.ToString();
            oCard.LoadFromGuid();
            sVisibilityXml = oCard.GetVisibilityAsXML();
            sVisibilityXml = sVisibilityXml.Substring(0, sVisibilityXml.Length - 1);
            using (XmlReader xmlReader = XmlReader.Create(new StringReader(sVisibilityXml)))
            {
                XmlSerializer serializer            = new XmlSerializer(typeof(SENDOBJECT));
                SENDOBJECT    deserializedVisEntity = serializer.Deserialize(xmlReader) as SENDOBJECT;
                oUsersInArchiveTypeDoc = (from item in deserializedVisEntity.Items
                                          where item.GetType().ToString() == "Siav.APFlibrary.Model.SENDOBJECTSENDENTITIES"
                                          let cardsdoctypes = item as SENDOBJECTSENDENTITIES
                                                              from docType in cardsdoctypes.SENDENTITY
                                                              select docType).ToList();
            }
        }
Esempio n. 2
0
        public List <dynamic> GetIndiciScheda(string stGuidConnect, string sGuidCard)
        {
            List <dynamic> oModelCard = new List <dynamic>();
            dynamic        index      = "";

            index = new DynamicDictionary();
            SVAOLLib.Card oCard;

            oCard = new SVAOLLib.Card();
            SVAOLLib.Session oSession = new SVAOLLib.Session();
            oSession.GUIDconnect = stGuidConnect;
            oCard.GUIDconnect    = stGuidConnect;
            oCard.GuidCard       = _Logger.FormatID(sGuidCard);
            oCard.LoadFromGuid();

            List <string> IndiciScheda = new List <string>();

            string[] buffer = new string[21];
            IndiciScheda = buffer.ToList();
            foreach (SVAOLLib.Field oField in (SVAOLLib.Fields)oCard.Fields)
            {
                index.id          = oField.Id;
                index.description = oField.Description;
                if (oField.Value != null)
                {
                    index.value = oField.Value.ToString();
                }
                else
                {
                    index.value = "";
                }
                oModelCard.Add(index);
            }
            return(oModelCard);
        }
Esempio n. 3
0
 public SVAOLLib.Card GetCardFromId(string GuidConnect, string CardId)
 {
     SVAOLLib.Card oCard = new SVAOLLib.Card();
     oCard.GUIDconnect = GuidConnect;
     oCard.GuidCard    = _Logger.FormatID(CardId);
     oCard.LoadFromGuid();
     return(oCard);
 }
Esempio n. 4
0
        /// <summary>

        /// Costruisce il link alla scheda documentale per il progressivo assoluto specificato.

        /// E' importante che nel fileXml1 venga impostata la variabile ROOT_URL con l'indirizzo

        /// dell'ambiente Archiflow Web, e.g. http://eslq77:81/archiflow/

        /// </summary>

        /// <param name="stGuidConnect">GUID connection per la session SVAOL</param>

        /// <param name="CardAbsId">Il progressivo assoluto della scheda di interesse</param>

        /// <param name="LogId">Nome del file di log</param>

        /// <returns>HyperLink alla scheda documentale</returns>
        ///


        public static SVAOLLib.Card SendCardFromId(string CardId, string GuidConnect, SVAOLLib.Offices oOffices, SVAOLLib.Groups oGroups, SVAOLLib.Users oUsers, string SAnnotation, string sMessage, SVAOLLib.Offices oMailOffices = null, SVAOLLib.Groups oMailGroups = null, SVAOLLib.Users oMailUsers = null)
        {
            int  iStateWf        = 0;
            bool bWorkflowActice = false;

            if (oMailOffices == null)
            {
                oMailOffices = new SVAOLLib.Offices();
            }
            if (oMailGroups == null)
            {
                oMailGroups = new SVAOLLib.Groups();
            }
            if (oMailUsers == null)
            {
                oMailUsers = new SVAOLLib.Users();
            }
            SVAOLLib.Card card = new SVAOLLib.Card();

            card.GUIDconnect = GuidConnect;
            Guid oCardId;

            if (CardId.Length > 12)                             // set the guid of the card
            {
                oCardId = new Guid("64556990-b196-425c-a0b9-" + int.Parse(CardId.Substring(24, 12)).ToString("000000000000"));
            }
            else
            {
                oCardId = new Guid("64556990-b196-425c-a0b9-" + int.Parse(CardId).ToString("000000000000"));
            }
            card.GuidCard = oCardId.ToString();
            card.LoadFromGuid();
            if (card.ProcWF != 0)
            {
                iStateWf = (int)card.ProcWF;
                card.ModifyProcWf(SVAOLLib.svProcWF.svPWFNothing);
                bWorkflowActice = true;
            }
            card.Offices = oOffices;
            card.Users   = oUsers;
            card.Groups  = oGroups;

            card.Send(oMailOffices, oMailGroups, oMailUsers, SAnnotation, sMessage);
            if (bWorkflowActice)
            {
                card.ModifyProcWf((SVAOLLib.svProcWF)iStateWf);
            }
            return(card);
        }
Esempio n. 5
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;
            }
        }
Esempio n. 6
0
        public CardManager(Logger oLogger, string card = "", string connection = "")
        {
            if (oLogger != null)
            {
                logger = oLogger;
            }

            if (card != "" && connection != "")
            {
                SVAOLLib.Card sampleCard = new SVAOLLib.Card();
                sampleCard.GUIDconnect = connection;
                sampleCard.GuidCard    = card;
                sampleCard.LoadFromGuid();
                thisCard = sampleCard;
            }
        }
Esempio n. 7
0
        public Boolean SetInternalAttach(string stGuidConnect, string stguidCardTo, string sGUIDAttachment, string note, string internalNote, bool bBiunivoc)
        {
            //Controllo se non è stato aperto già un File di Log

            //è la variabile da ritornare
            Boolean SetCirAtt = false;

            try
            {                //controllo se sono già connesso, in cvaso contrario mi connetto e ritorno la stringa di connessione
                if (stGuidConnect.Length != 0)
                {
                    stguidCardTo = _Logger.FormatID(stguidCardTo);

                    SVAOLLib.Card oCard = new SVAOLLib.Card();;
                    oCard.GUIDconnect = stGuidConnect;
                    oCard.GuidCard    = stguidCardTo;
                    oCard.LoadFromGuid();
                    string sNumProt = this.GetSingleFieldValue(stGuidConnect, sGUIDAttachment, 0).ToString();
                    SVAOLLib.Attachment oAttachmentTo;
                    // Se la GUIDCard non è formattata lo faccio ora
                    sGUIDAttachment = _Logger.FormatID(sGUIDAttachment);
                    // Imposto l'allegato della scheda
                    oAttachmentTo                = new SVAOLLib.Attachment();
                    oAttachmentTo.Archive        = oCard.Archive;
                    oAttachmentTo.GuidCard       = stguidCardTo;
                    oAttachmentTo.GUIDconnect    = stGuidConnect;
                    oAttachmentTo.GUIDAttachment = sGUIDAttachment;
                    oAttachmentTo.Note           = note;
                    oAttachmentTo.InternalNote   = internalNote;
                    oAttachmentTo.IsInternal     = 1;
                    oAttachmentTo.Name           = sNumProt;
                    int iBiunivoc = bBiunivoc ? 1 : 0;
                    oAttachmentTo.InsertInternal(iBiunivoc);
                    SetCirAtt = true;
                }
            }
            catch (Exception e)
            {
                throw new Exception(String.Format("{0}>>{1}>>{2}", "ERRORE : SetInternalAttach: " + e.StackTrace, e.Source, e.Message), e);
            }
            finally
            {
            }

            return(SetCirAtt);
        }
Esempio n. 8
0
        public static SVAOLLib.Card GetCardFromId(string GuidConnect, string CardId)
        {
            SVAOLLib.Card card = new SVAOLLib.Card();
            card.GUIDconnect = GuidConnect;
            Guid oCardId;

            if (CardId.Length > 12)                             // set the guid of the card
            {
                oCardId = new Guid("64556990-b196-425c-a0b9-" + int.Parse(CardId.Substring(24, 12)).ToString("000000000000"));
            }
            else
            {
                oCardId = new Guid("64556990-b196-425c-a0b9-" + int.Parse(CardId).ToString("000000000000"));
            }
            card.GuidCard = oCardId.ToString();
            card.LoadFromGuid();
            return(card);
        }