protected void Page_Load(object sender, EventArgs e) { if (!this.IsPostBack) { this.InitializeLanguage(); this.InitializePage(); } else { if (!string.IsNullOrEmpty(this.HiddenSelectedState.Value)) { this.SelectedState = DiagrammiManager.GetStatoById(this.HiddenSelectedState.Value); this.HiddenSelectedState.Value = string.Empty; string msgConfirm = "WarningPhaseChangeStateDiagramm"; if (this.controllaStatoFinale()) { msgConfirm = "WarningPhaseChangeStateDiagramFinalState"; } ScriptManager.RegisterStartupScript(this, this.GetType(), "ajaxConfirmModal", "ajaxConfirmModal('" + msgConfirm.Replace("'", @"\'") + "', 'HiddenChangeStateDiagramm', '', '" + SelectedState.DESCRIZIONE + "');", true); return; } if (!string.IsNullOrEmpty(this.HiddenChangeStateDiagramm.Value)) { this.HiddenChangeStateDiagramm.Value = string.Empty; string retVal = this.SelectedState.SYSTEM_ID.ToString(); this.MissingRolesList = DiagrammiManager.ChangeStateGetMissingRoles(UIManager.ProjectManager.getProjectInSession().systemID, this.SelectedState.SYSTEM_ID.ToString()); if (this.MissingRolesList == null || this.MissingRolesList.Count == 0) { this.SalvaStato(); } ScriptManager.RegisterStartupScript(this, this.GetType(), "closeMask", "if (parent.fra_main) {parent.fra_main.closeAjaxModal('Phases', '" + retVal + "');} else {parent.closeAjaxModal('Phases', '" + retVal + "');};", true); this.SelectedState = null; } ScriptManager.RegisterStartupScript(this, this.GetType(), "reallowOp", "reallowOp();", true); } }
protected void Page_Load(object sender, EventArgs e) { try { if (!IsPostBack) { this.InitializeLabel(); //*************************************************************** //GIORDANO IACOZZILLI //17/07/2013 //Gestione dell'icona della copia del docuemnto/fascicolo in deposito. //*************************************************************** try { if (this.FlagCopyInArchive == "1") { this.phNeutro.Visible = true; this.cimgbttIsCopy.ToolTip = "Copia del fascicolo in archivio corrente"; } } catch { //Questo รจ per Veltri. } //*************************************************************** //FINE //*************************************************************** Fascicolo fascicolo = UIManager.ProjectManager.getProjectInSession(); if (fascicolo != null && !string.IsNullOrEmpty(fascicolo.systemID)) { this.viewLabel(true); this.projectLblIdGenerato.Text = fascicolo.systemID; this.projectLblCodiceGenerato.Text = fascicolo.codice; switch (fascicolo.stato) { case "A": { this.projectLblStatoGenerato.Text = Utils.Languages.GetLabelFromCode("prjectStatoRegistroAperto", UIManager.UserManager.GetUserLanguage()); this.projectLblStatoGenerato.CssClass = "open"; break; } case "C": { this.projectLblStatoGenerato.Text = Utils.Languages.GetLabelFromCode("prjectStatoRegistroChiuso", UIManager.UserManager.GetUserLanguage()); this.projectLblStatoGenerato.CssClass = "close"; break; } default: { this.projectLblStatoGenerato.Text = Utils.Languages.GetLabelFromCode("prjectStatoRegistroGiallo", UIManager.UserManager.GetUserLanguage()); this.projectLblStatoGenerato.CssClass = "giallo"; break; } } Registro registro = UIManager.RegistryManager.getRegistroBySistemId(fascicolo.idRegistroNodoTit); if (registro == null) { registro = UIManager.RegistryManager.getRegistroBySistemId(fascicolo.idRegistro); } if (registro != null) { this.projectLblRegistroGenerato.Text = registro.codRegistro; } OrgTitolario titolario = UIManager.ClassificationSchemeManager.getTitolario(fascicolo.idTitolario); string language = UIManager.UserManager.GetUserLanguage(); if (titolario != null) { switch (titolario.Stato) { case OrgStatiTitolarioEnum.Attivo: this.projectLblTitolarioGenerato.ToolTip = Utils.Languages.GetLabelFromCode("ProjectLblTitolarioAttivo", language).Replace("@@", titolario.DescrizioneLite); this.projectLblTitolarioGenerato.Text = ellipsis(projectLblTitolarioGenerato.ToolTip, 20); break; default: this.projectLblTitolarioGenerato.ToolTip = UIManager.ClassificationSchemeManager.getTitolario(fascicolo.idTitolario).Descrizione; this.projectLblTitolarioGenerato.Text = ellipsis(projectLblTitolarioGenerato.ToolTip, 20); break; } } Fascicolo _tempfascicolo = UIManager.ProjectManager.getClassificazioneById(fascicolo.idClassificazione); this.projectLblClassificaGenerato.ToolTip = _tempfascicolo.codice + " - " + _tempfascicolo.descrizione; this.projectLblClassificaGenerato.Text = ellipsis(projectLblClassificaGenerato.ToolTip, 50); this.projectImgConservazione.Enabled = true; this.projectImgStampaEtichette.Enabled = true; if (fascicolo.folderSelezionato == null) { fascicolo.folderSelezionato = UIManager.GridManager.GetFolderByIdFasc(UIManager.UserManager.GetInfoUser(), fascicolo); } UIManager.ProjectManager.setProjectInSession(fascicolo); if (fascicolo.template != null && !string.IsNullOrEmpty(fascicolo.template.SYSTEM_ID.ToString()) && fascicolo.template.SYSTEM_ID != 0) { this.ProjectLitTypeDocumentHead.Visible = true; this.ProjectLitTypeDocumentValue.Visible = true; this.ProjectLitTypeDocumentValue.Text = fascicolo.template.DESCRIZIONE.Length < 25 ? fascicolo.template.DESCRIZIONE: fascicolo.template.DESCRIZIONE.Substring(0, 25) + " ..."; this.ProjectLitTypeDocumentValue.ToolTip = fascicolo.template.DESCRIZIONE; } else { this.ProjectLitTypeDocumentHead.Visible = false; this.ProjectLitTypeDocumentValue.Visible = false; } } else { this.viewLabel(false); } this.LoadKeys(); this.VisibiltyRoleFunctions(); } else { if (!string.IsNullOrEmpty(this.HiddenFaseDiagramma.Value)) { this.SelectedPhaseId = this.HiddenFaseDiagramma.Value; this.HiddenFaseDiagramma.Value = string.Empty; ScriptManager.RegisterStartupScript(this.Page, this.GetType(), "ajaxModalPopupPhases", "ajaxModalPopupPhases();", true); } if (!string.IsNullOrEmpty(this.Phases.ReturnValue)) { ScriptManager.RegisterStartupScript(this.Page, this.GetType(), "setReturnValue", "SetRetValue('Phases','');", true); // Verifico se esistono ruoli mancanti //this.MissingRolesList = DiagrammiManager.ChangeStateGetMissingRoles(UIManager.ProjectManager.getProjectInSession().systemID, this.Phases.ReturnValue); this.SelectedState = DiagrammiManager.GetStatoById(this.Phases.ReturnValue); if (this.SelectedState != null && this.SelectedState.STATO_FINALE) { this.projectLblStatoGenerato.Text = Utils.Languages.GetLabelFromCode("prjectStatoRegistroChiuso", UIManager.UserManager.GetUserLanguage()); this.projectLblStatoGenerato.CssClass = "close"; } else { this.projectLblStatoGenerato.Text = Utils.Languages.GetLabelFromCode("prjectStatoRegistroAperto", UIManager.UserManager.GetUserLanguage()); this.projectLblStatoGenerato.CssClass = "open"; } if (this.MissingRolesList != null && this.MissingRolesList.Count > 0) { // Esistono ruoli mancanti this.SelectedState = DiagrammiManager.GetStatoById(this.Phases.ReturnValue); ScriptManager.RegisterStartupScript(this.Page, this.GetType(), "ajaxModalPopupMissingRoles", "ajaxModalPopupMissingRoles();", true); } else { // Non esistono ruoli mancanti // E' possibile inviare le trasmissioni salvate DiagrammiManager.ChangeStateSendTransmissions(this.Phases.ReturnValue); } this.UpHeaderProject.Update(); } } } catch (System.Exception ex) { UIManager.AdministrationManager.DiagnosticError(ex); return; } }