Example #1
0
        public static ToDoListElement buildInstance(Folder input)
        {
            ToDoListElement res = new ToDoListElement();

            res.Oggetto = input.descrizione;
            res.Id      = input.systemID;
            res.Tipo    = ElementType.FOLDER;
            return(res);
        }
Example #2
0
        public static ToDoListElement buildInstance(infoToDoList input, Trasmissione trasm, UserInfo userInfo)
        {
            ToDoListElement res = new ToDoListElement();

            res.Oggetto   = input.oggetto;
            res.DataDoc   = input.dataInvio;
            res.Note      = input.noteGenerali;
            res.Extension = input.cha_img;
            // modifica per vedere il mittente delegato in todolist
            if (!string.IsNullOrEmpty(input.ut_delegato))
            {
                res.Mittente = input.ut_delegato + " sostituto di " + input.utenteMittente;
            }
            else
            {
                res.Mittente = input.utenteMittente;
            }
            res.Ragione   = input.ragione;
            res.TipoProto = input.tipoProto;
            res.Segnatura = input.infoDoc;
            if (res.Segnatura.StartsWith("IdDoc:"))
            {
                res.Segnatura = null;
            }
            if (trasm != null)
            {
                foreach (TrasmissioneSingola temp in trasm.trasmissioniSingole)
                {
                    foreach (TrasmissioneUtente tempUt in temp.trasmissioneUtente)
                    {
                        if (tempUt.utente != null)
                        {
                            if (userInfo.UserId.Equals(tempUt.utente.userId))
                            {
                                if ("W".Equals(temp.ragione.tipo))
                                {
                                    res.HasWorkflow = true;
                                }
                            }
                        }
                    }
                }
            }
            if (!string.IsNullOrEmpty(input.sysIdFasc))
            {
                res.Id   = input.sysIdFasc;
                res.Tipo = ElementType.FASCICOLO;
            }
            else
            {
                res.Id   = input.sysIdDoc;
                res.Tipo = ElementType.DOCUMENTO;
            }
            res.IdTrasm = input.sysIdTrasm;
            return(res);
        }
Example #3
0
        public static ToDoListElement buildInstance(InfoDocumento input)
        {
            ToDoListElement res = new ToDoListElement();

            res.Oggetto   = input.oggetto;
            res.DataDoc   = input.dataApertura;
            res.Id        = input.idProfile;
            res.Tipo      = ElementType.DOCUMENTO;
            res.Mittente  = input.mittDoc;
            res.TipoProto = input.tipoProto;
            res.Segnatura = input.segnatura;
            return(res);
        }
Example #4
0
        public static ToDoListElement buildInstance(Notification.Notification input, string idTrasmissione)
        {
            ToDoListElement res = new ToDoListElement();

            res.Mittente  = input.PRODUCER;
            res.DataDoc   = input.DTA_EVENT.ToShortDateString();
            res.Ragione   = getLabelTypeEvent(input.TYPE_EVENT);
            res.Extension = (!string.IsNullOrEmpty(input.EXTENSION) ? input.EXTENSION : "-");
            res.Oggetto   = input.ITEMS.ITEM3;
            if (input.TYPE_EVENT.ToUpper().Contains("TRASM_"))
            {
                res.IdTrasm = idTrasmissione;
            }
            else
            {
                res.IdTrasm = string.Empty;
            }
            res.IdEvento = input.ID_EVENT;
            if (!string.IsNullOrEmpty(input.ITEMS.ITEM2))
            {
                res.Segnatura = input.ITEMS.ITEM2;
                string lblTipoProto = res.Segnatura.Substring(res.Segnatura.IndexOf("(") + 1, (res.Segnatura.IndexOf(")") - (res.Segnatura.IndexOf("(") + 1)));
                string tipoProto    = GetTipoProto(lblTipoProto);
                res.Segnatura = res.Segnatura.Replace("(" + lblTipoProto + ")", "");
                res.TipoProto = tipoProto;
            }
            else
            {
                res.Segnatura = null;
                res.TipoProto = "G";
            }
            res.Id = input.ID_OBJECT;
            if (input.DOMAINOBJECT.Equals("DOCUMENTO"))
            {
                res.Tipo = ElementType.DOCUMENTO;
            }
            else if (input.DOMAINOBJECT.Equals("FASCICOLO"))
            {
                res.Tipo = ElementType.FASCICOLO;
            }
            return(res);
        }