Exemplo n.º 1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            try {
                Response.Expires = -1;

                this.language = NttDataWA.UIManager.UserManager.GetUserLanguage();
                this.LoadTextLanguage();
                //if (!this.IsPostBack)
                //{
                string totalDocForSign = Languages.GetLabelFromCode("DigitalSignDialogTotalDocForSign", language);
                //this.lblDocumentCount.Text = string.Format("{0} " + totalDocForSign, this.GetSelectedDocuments().Count);

                DocsPaWR.Ruolo ruoloCorrente = NttDataWA.UIManager.RoleManager.GetRoleInSession();

                DocsPaWR.Funzione funzioneFirma256 = ruoloCorrente.funzioni.FirstOrDefault(itm => itm.codice == "DO_DOC_FIRMA_256");

                UserControl ctrl = null;

                //if (funzioneFirma256 != null)
                //{
                // Attivazione usercontrol smartclient
                ctrl = (UserControl)this.LoadControl("~/SmartClient/DigitalSignWrapper.ascx");
                //}

                this.Form.Controls.Add(ctrl);
            }
            catch (System.Exception ex)
            {
                UIManager.AdministrationManager.DiagnosticError(ex);
                return;
            }
        }
Exemplo n.º 2
0
        private void Page_Load(object sender, System.EventArgs e)
        {
            Response.Expires = -1;

            this.lblDocumentCount.Text = string.Format("{0} documenti da firmare", this.GetSelectedDocuments().Count);

            DocsPaWR.Ruolo ruoloCorrente = UserManager.getRuolo();

            DocsPaWR.Funzione funzioneFirma256 = ruoloCorrente.funzioni.FirstOrDefault(itm => itm.codice == "DO_DOC_FIRMA_256");

            System.Web.UI.UserControl ctrl = null;

            if (funzioneFirma256 != null)
            {
                // Attivazione usercontrol smartclient
                ctrl = (System.Web.UI.UserControl) this.LoadControl("~/SmartClient/DigitalSignWrapper.ascx");
            }
            else
            {
                // Attivazione usercontrol activex
                ctrl = (System.Web.UI.UserControl) this.LoadControl("~/ActivexWrappers/CapicomWrapper.ascx");
            }

            this.Form.Controls.Add(ctrl);

            if (!this.IsPostBack)
            {
                ScriptManager.RegisterStartupScript(this, this.GetType(), "init", "Initialize();", true);
                this.addJSOnConfermaButton("return ApplySign()");
                this.lblDocumentCount.Text = string.Format("{0} documenti da firmare", this.GetSelectedDocuments().Count);
            }
        }
Exemplo n.º 3
0
        private void Page_Load(object sender, System.EventArgs e)
        {
            Response.Expires = -1;

            //if (!this.IsPostBack)
            //{
            this.lblDocumentCount.Text = string.Format("{0} documenti da firmare", this.GetSelectedDocuments().Count);

            DocsPaWR.Ruolo ruoloCorrente = UserManager.getRuolo();

            DocsPaWR.Funzione funzioneFirma256 = ruoloCorrente.funzioni.FirstOrDefault(itm => itm.codice == "DO_DOC_FIRMA_256");

            System.Web.UI.UserControl ctrl = null;

            if (funzioneFirma256 != null)
            {
                // Attivazione usercontrol smartclient
                ctrl = (System.Web.UI.UserControl) this.LoadControl("~/SmartClient/DigitalSignWrapper.ascx");
            }
            else
            {
                // Attivazione usercontrol activex
                ctrl = (System.Web.UI.UserControl) this.LoadControl("~/ActivexWrappers/CapicomWrapper.ascx");
            }

            chkPades.Visible = false;

            if (signHash)
            {
                if (GetFileExtension().EndsWith("pdf"))
                {
                    chkPades.Visible = true;
                }
            }

            this.Form.Controls.Add(ctrl);
        }