Exemplo n.º 1
0
        protected void AddNewProcessSave_Click(object sender, EventArgs e)
        {
            try
            {
                string msg = string.Empty;
                if (string.IsNullOrEmpty(this.txt_processName.Text))
                {
                    msg = "WarningRequiredFieldNameProcess";
                    ScriptManager.RegisterStartupScript(this, this.GetType(), "ajaxDialogModal", "if (parent.fra_main) {parent.fra_main.ajaxDialogModal('" + msg.Replace("'", @"\'") + "', 'warning', '');} else {parent.ajaxDialogModal('" + msg.Replace("'", @"\'") + "', 'warning', '');}", true);
                    return;
                }
                ResultProcessoFirma result   = ResultProcessoFirma.OK;
                ProcessoFirma       processo = SignatureProcessesManager.DuplicaProcessoFirma(this.ProcessoDiFirmaSelected.idProcesso, this.txt_processName.Text, this.cbxCopiaVisibilita.Checked, out result);
                switch (result)
                {
                case ResultProcessoFirma.OK:
                    ProcessoDiFirmaSelected = processo;
                    ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "closeAJM", "parent.closeAjaxModal('AddNewProcess','up');", true);
                    break;

                case ResultProcessoFirma.KO:
                    msg = "ErrorCreationProcess";
                    ScriptManager.RegisterStartupScript(this, this.GetType(), "ajaxDialogModal", "if (parent.fra_main) {parent.fra_main.ajaxDialogModal('" + msg.Replace("'", @"\'") + "', 'error', '');} else {parent.ajaxDialogModal('" + msg.Replace("'", @"\'") + "', 'error', '');}", true);
                    break;

                case ResultProcessoFirma.EXISTING_PROCESS_NAME:
                    msg = "WarningSignatureProcessUniqueProcessName";
                    ScriptManager.RegisterStartupScript(this, this.GetType(), "ajaxDialogModal", "if (parent.fra_main) {parent.fra_main.ajaxDialogModal('" + msg.Replace("'", @"\'") + "', 'warning', '');} else {parent.ajaxDialogModal('" + msg.Replace("'", @"\'") + "', 'warning', '');}", true);
                    break;
                }
            }
            catch (Exception ex)
            {
                string msg = "ErrorSignatureProcess";
                ScriptManager.RegisterStartupScript(this, this.GetType(), "ajaxDialogModal", "if (parent.fra_main) {parent.fra_main.ajaxDialogModal('" + msg.Replace("'", @"\'") + "', 'error', '');} else {parent.ajaxDialogModal('" + msg.Replace("'", @"\'") + "', 'error', '');}", true);
                return;
            }
        }
Exemplo n.º 2
0
 /// <summary>
 /// Duplica il processo di firma
 /// </summary>
 /// <param name="processoBase"></param>
 /// <param name="nomeNuovoProcesso"></param>
 /// <param name="result"></param>
 /// <returns></returns>
 public static ProcessoFirma DuplicaProcessoFirma(string idProcessoOld, string nomeNuovoProcesso, bool copiaVisibilita, out ResultProcessoFirma result)
 {
     result = ResultProcessoFirma.OK;
     try
     {
         return(docsPaWS.DuplicaProcessoFirma(idProcessoOld, nomeNuovoProcesso, copiaVisibilita, UserManager.GetInfoUser(), out result));
     }
     catch (System.Exception ex)
     {
         return(null);
     }
 }
Exemplo n.º 3
0
 /// <summary>
 /// Creazione del processo di firma
 /// </summary>
 /// <param name="processoDiFirma"></param>
 /// <returns></returns>
 public static ProcessoFirma InsertProcessoDiFirma(ProcessoFirma processoDiFirma, out ResultProcessoFirma result)
 {
     result = ResultProcessoFirma.OK;
     try
     {
         return(docsPaWS.InsertProcessoDiFirma(processoDiFirma, UserManager.GetInfoUser(), out result));
     }
     catch (System.Exception ex)
     {
         return(null);
     }
 }