Пример #1
0
        /// <summary>
        /// Reperimento descrizione dell'utente creatore della nota
        /// </summary>
        /// <param name="nota"></param>
        /// <returns></returns>
        protected string GetDescrizioneUtenteCreatore(DocsPaWR.InfoNota nota)
        {
            string retValue = string.Empty;

            if (nota != null && nota.UtenteCreatore != null)
            {
                if (!string.IsNullOrEmpty(nota.UtenteCreatore.DescrizioneUtente))
                {
                    retValue = nota.UtenteCreatore.DescrizioneUtente;
                }

                if (retValue != string.Empty && !string.IsNullOrEmpty(nota.UtenteCreatore.DescrizioneRuolo))
                {
                    retValue = string.Concat(retValue, "<br />(", nota.UtenteCreatore.DescrizioneRuolo, ")");
                }

                if (!string.IsNullOrEmpty(nota.DescrPeopleDelegato))
                {
                    string temp = nota.DescrPeopleDelegato + "<br />" + Utils.Languages.GetLabelFromCode("DocumentNoteAuthorDelegatedBy", UIManager.UserManager.GetUserLanguage()) + " " + retValue;
                    retValue = temp;
                }
            }

            return(retValue);
        }
Пример #2
0
        /// <summary>
        /// Reperimento descrizione dell'utente creatore della nota
        /// </summary>
        /// <param name="nota"></param>
        /// <returns></returns>
        protected string GetDescrizioneUtenteCreatore(DocsPaWR.InfoNota nota)
        {
            string retValue = string.Empty;

            if (nota != null && nota.UtenteCreatore != null)
            {
                if (!string.IsNullOrEmpty(nota.UtenteCreatore.DescrizioneUtente))
                {
                    retValue = nota.UtenteCreatore.DescrizioneUtente;
                }

                if (retValue != string.Empty && !string.IsNullOrEmpty(nota.UtenteCreatore.DescrizioneRuolo))
                {
                    retValue = string.Concat(retValue, "<BR />(", nota.UtenteCreatore.DescrizioneRuolo, ")");
                }

                if (!string.IsNullOrEmpty(nota.DescrPeopleDelegato))
                {
                    string temp = nota.DescrPeopleDelegato + "<br>Delegato da " + retValue;
                    retValue = temp;
                }
            }

            return(retValue);
        }
Пример #3
0
        /// <summary>
        /// Verifica se è possibile rimuovere la nota richiesta
        /// </summary>
        /// <param name="nota"></param>
        /// <returns></returns>
        protected bool CanDeleteNota(DocsPaWR.InfoNota nota)
        {
            bool canDelete = (this.Enabled && !nota.SolaLettura && !this.AbortDocument);

            if (canDelete && this.IsNoteReadOnly)
            {
                canDelete = (nota.TipoVisibilita != TipiVisibilitaNotaEnum.Tutti);
            }

            return(canDelete);
        }
Пример #4
0
        /// <summary>
        /// Verifica se è possibile rimuovere la nota richiesta
        /// </summary>
        /// <param name="nota"></param>
        /// <returns></returns>
        protected bool CanDeleteNota(DocsPaWR.InfoNota nota)
        {
            bool canDelete = (this.Enabled && this.NoteManager.CanDeleteNota(nota));

            if (canDelete && this.ReadOnly)
            {
                canDelete = (nota.TipoVisibilita != TipiVisibilitaNotaEnum.Tutti);
            }

            return(canDelete);
        }
Пример #5
0
        /// <summary>
        ///
        /// </summary>
        protected virtual void UpdateItemCommand()
        {
            string idNota = this.GetId(this.SelectedItem);

            DocsPaWR.InfoNota nota = NoteManager.GetNota(idNota);
            nota.TipoVisibilita = this.TipoVisibilita;
            nota.Testo          = this.Testo;
            nota = NoteManager.UpdateNota(nota);

            this.Bind();

            this.SelectItemCommand(this.SelectedItem);
        }
Пример #6
0
        protected virtual void UpdateItemCommand()
        {
            string idNota = this.GetId(this.SelectedItem);

            DocsPaWR.InfoNota nota = this.GetNota(idNota);
            nota.TipoVisibilita = this.TipoVisibilita;
            nota.Testo          = this.TxtNote.Text;
            if (this.rblTipiVisibilita.SelectedValue == "RF")
            {
                nota.IdRfAssociato = this.ddlNoteRF.SelectedValue;
            }
            nota = this.UpdateNota(nota);

            this.Bind();

            this.SelectItemCommand(this.SelectedItem);
        }