protected void CreateDataGridHistoryStato() { string language = UIManager.UserManager.GetUserLanguage(); Fascicolo Project = UIManager.ProjectManager.getProjectInSession(); if (Project != null && !string.IsNullOrEmpty(Project.systemID)) { System.Data.DataSet ds = DiagrammiManager.getDiagrammaStoricoFasc(Project.systemID); if (ds != null && ds.Tables != null && ds.Tables.Count > 0 && ds.Tables[0] != null && ds.Tables[0].Rows.Count > 0) { this.GridViewStoricoStati.DataSource = ds; this.DatagridStoricoStati.Visible = true; this.GridViewDocHistoryPnl.Visible = false; //this.lblDettagliStato.Visible = false; this.lblDettagli.Visible = false; this.GridViewStoricoStati.DataBind(); this.GridViewStoricoStati.HeaderRow.Cells[0].Text = Utils.Languages.GetLabelFromCode("HistoryHeaderGrid1", language); this.GridViewStoricoStati.HeaderRow.Cells[1].Text = Utils.Languages.GetLabelFromCode("HistoryHeaderGrid2", language); this.GridViewStoricoStati.HeaderRow.Cells[2].Text = Utils.Languages.GetLabelFromCode("HistoryHeaderGrid0", language); this.GridViewStoricoStati.HeaderRow.Cells[3].Text = Utils.Languages.GetLabelFromCode("HistoryHeaderGrid3", language); } else { //this.lblDettagliStato.Text = Utils.Languages.GetLabelFromCode("HistoryLblDettagliNoMod", language); //this.lblDettagliStato.Visible = true; this.lblDettagli.Text = Utils.Languages.GetLabelFromCode("HistoryLblDettagliNoMod", language); this.lblDettagli.Visible = true; return; } } else { //this.lblDettagliStato.Text = Utils.Languages.GetLabelFromCode("HistoryLblDettagliNoMod", language); //this.lblDettagliStato.Visible = true; this.lblDettagli.Text = Utils.Languages.GetLabelFromCode("HistoryLblDettagliNoMod", language); this.lblDettagli.Visible = true; return; } }
protected void CreateDataGridHistoryStato(string tipoOggetto) { string language = UIManager.UserManager.GetUserLanguage(); if (DocumentManager.getSelectedRecord().docNumber != null) { DataSet ds = DiagrammiManager.getDiagrammaStoricoDoc(DocumentManager.getSelectedRecord().docNumber); if (ds != null && ds.Tables != null && ds.Tables.Count > 0 && ds.Tables[0] != null && ds.Tables[0].Rows.Count > 0) { this.GridViewStoricoStati.DataSource = ds; this.DatagridStoricoStati.Visible = true; this.GridViewDocHistoryPnl.Visible = false; //this.lblDettagliStato.Visible = false; this.lblDettagli.Visible = false; this.GridViewStoricoStati.DataBind(); this.GridViewStoricoStati.HeaderRow.Cells[0].Text = Utils.Languages.GetLabelFromCode("HistoryHeaderGrid1", language); this.GridViewStoricoStati.HeaderRow.Cells[1].Text = Utils.Languages.GetLabelFromCode("HistoryHeaderGrid2", language); this.GridViewStoricoStati.HeaderRow.Cells[2].Text = Utils.Languages.GetLabelFromCode("HistoryHeaderGrid0", language); this.GridViewStoricoStati.HeaderRow.Cells[3].Text = Utils.Languages.GetLabelFromCode("HistoryHeaderGrid3", language); } else { //this.lblDettagliStato.Text = Utils.Languages.GetLabelFromCode("HistoryLblDettagliNoMod", language); //this.lblDettagliStato.Visible = true; this.lblDettagli.Text = Utils.Languages.GetLabelFromCode("HistoryLblDettagliNoMod", language); this.lblDettagli.Visible = true; return; } } else { //this.lblDettagliStato.Text = Utils.Languages.GetLabelFromCode("HistoryLblDettagliNoMod", language); //this.lblDettagliStato.Visible = true; this.lblDettagli.Text = Utils.Languages.GetLabelFromCode("HistoryLblDettagliNoMod", language); this.lblDettagli.Visible = true; return; } }
protected void MissingRolesBtnTransmit_Click(object sender, EventArgs e) { ScriptManager.RegisterStartupScript(this, this.GetType(), "reallowOp", "reallowOp();", true); ArrayList roleReasonsList = new ArrayList(); // Check data foreach (Control ctrl in this.PnlCorrespondent.Controls) { if (ctrl is UserControls.CorrespondentCustom) { UserControls.CorrespondentCustom corr = (UserControls.CorrespondentCustom)ctrl; if (!string.IsNullOrEmpty(corr.TxtCodeCorrespondentCustom) && !string.IsNullOrEmpty(corr.TxtDescriptionCorrespondentCustom)) { DropDownList ddl = (DropDownList)PnlCorrespondent.FindControl("ddlReason_" + corr.ID); string reason = corr.TxtEtiCustomCorrespondent.Split('(')[1]; if (ddl != null) { reason = ddl.SelectedItem.Text + "§" + reason; } roleReasonsList.Add(corr.TxtCodeCorrespondentCustom + " (" + reason); } else { string msg = "WarningMissingRolesRequired"; ScriptManager.RegisterStartupScript(this, this.GetType(), "ajaxDialogModal", "ajaxDialogModal('" + msg + "', 'warning', '');", true); break; } } } if (roleReasonsList.Count > 0) { // Creo le trasmissioni ai corrispondenti selezionati DiagrammiManager.CreateTransmissionsMissingRoles((string[])roleReasonsList.ToArray(typeof(string)), this.SelectedState.SYSTEM_ID.ToString()); this.SalvaStato(); this.SelectedState = null; this.CloseMask(); } }
private void SalvaStato() { try { Fascicolo fascicolo = UIManager.ProjectManager.getProjectInSession(); DiagrammiManager.salvaModificaStatoFasc(fascicolo.systemID, this.SelectedState.SYSTEM_ID.ToString(), this.StateDiagram, UserManager.GetInfoUser().userId, UserManager.GetInfoUser(), string.Empty); //Verifico se effettuare una tramsissione automatica assegnata allo stato if (fascicolo.template != null && fascicolo.template.SYSTEM_ID != 0) { ArrayList modelli = new ArrayList(DiagrammiManager.isStatoTrasmAutoFasc(UserManager.GetInfoUser().idAmministrazione, this.SelectedState.SYSTEM_ID.ToString(), fascicolo.template.SYSTEM_ID.ToString())); for (int i = 0; i < modelli.Count; i++) { DocsPaWR.ModelloTrasmissione mod = (DocsPaWR.ModelloTrasmissione)modelli[i]; if (mod.SINGLE == "1") { TrasmManager.effettuaTrasmissioneFascDaModello(mod, this.SelectedState.SYSTEM_ID.ToString(), fascicolo, this); } else { for (int k = 0; k < mod.MITTENTE.Length; k++) { if (mod.MITTENTE[k].ID_CORR_GLOBALI.ToString() == RoleManager.GetRoleInSession().systemId) { TrasmManager.effettuaTrasmissioneFascDaModello(mod, this.SelectedState.SYSTEM_ID.ToString(), fascicolo, this); break; } } } } } } catch (Exception ex) { } }
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); } }
private void btn_salva_Click(object sender, System.EventArgs e) { if (txt_descrizione.Text == "") { //RegisterStartupScript("nomeDiagramma","<script>alert('Descrizione Diagramma vuota !');</script>"); ClientScript.RegisterStartupScript(this.GetType(), "nomeDiagramma", "<script>alert('Descrizione Diagramma vuota !');</script>"); return; } if (lbl_statiIniziali.Text == "") { //RegisterStartupScript("statiIniziali","<script>alert('Il Diagramma non può non avere STATI INIZIALI !');</script>"); ClientScript.RegisterStartupScript(this.GetType(), "statiIniziali", "<script>alert('Il Diagramma non può non avere STATI INIZIALI !');</script>"); return; } if (((SAAdminTool.DocsPaWR.DiagrammaStato)Session["DiagrammaStato"]).PASSI == null || ((SAAdminTool.DocsPaWR.DiagrammaStato)Session["DiagrammaStato"]).PASSI.Length == 0) { //RegisterStartupScript("passi", "<script>alert('Il Diagramma non può non avere PASSI !');</script>"); ClientScript.RegisterStartupScript(this.GetType(), "passi", "<script>alert('Il Diagramma non può non avere PASSI !');</script>"); return; } if (controllaStatiInizialiFinali((SAAdminTool.DocsPaWR.DiagrammaStato)Session["DiagrammaStato"])) { //RegisterStartupScript("passi", "<script>alert('Stati INIZIALI e stati FINALI non possono coincidere !');</script>"); ClientScript.RegisterStartupScript(this.GetType(), "statiInizialiFinali", "<script>alert('Stati INIZIALI e stati FINALI non possono coincidere !');</script>"); return; } //Verifico se è da effettuare una modifica di diagramma o un salvatagggio di un nuovo diagramma //Salvataggio nuovo diagramma if (((SAAdminTool.DocsPaWR.DiagrammaStato)Session["DiagrammaStato"]).SYSTEM_ID == 0) { if (!DiagrammiManager.isUniqueNameDiagramma(txt_descrizione.Text, this)) { RegisterStartupScript("statiSuccessivi", "<script>alert('Descrizione Diagramma già esistente !');</script>"); return; } ((SAAdminTool.DocsPaWR.DiagrammaStato)Session["DiagrammaStato"]).ID_AMM = Convert.ToInt32(idAmministrazione); ((SAAdminTool.DocsPaWR.DiagrammaStato)Session["DiagrammaStato"]).DESCRIZIONE = txt_descrizione.Text; DiagrammiManager.salvaDiagramma((SAAdminTool.DocsPaWR.DiagrammaStato)Session["DiagrammaStato"], idAmministrazione, this); listaDiagrammi = DiagrammiManager.getDiagrammi(idAmministrazione, this); Panel_GestioneStati.Visible = false; Panel_ListaPassi.Visible = false; caricaDgListaDiagrammi(); dg_listaDiagrammi.SelectedIndex = -1; Panel_ListaDiagrammi.Visible = true; btn_salva.Visible = false; btn_nuovoDiagr.Visible = true; } //Modifica diagramma esistente else { if (((SAAdminTool.DocsPaWR.DiagrammaStato)Session["DiagrammaStato"]).DESCRIZIONE != txt_descrizione.Text) { if (!DiagrammiManager.isUniqueNameDiagramma(txt_descrizione.Text, this)) { RegisterStartupScript("statiSuccessivi", "<script>alert('Descrizione Diagramma già esistente !');</script>"); return; } } ((SAAdminTool.DocsPaWR.DiagrammaStato)Session["DiagrammaStato"]).DESCRIZIONE = txt_descrizione.Text; DiagrammiManager.updateDiagramma((SAAdminTool.DocsPaWR.DiagrammaStato)Session["DiagrammaStato"], this); listaDiagrammi = DiagrammiManager.getDiagrammi(idAmministrazione, this); Panel_GestioneStati.Visible = false; Panel_ListaPassi.Visible = false; caricaDgListaDiagrammi(); dg_listaDiagrammi.SelectedIndex = -1; Panel_ListaDiagrammi.Visible = true; btn_salva.Visible = false; btn_nuovoDiagr.Visible = true; } lbl_titolo.Text = "Lista Diagrammi di stato"; }
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; } }
/// <summary> /// Aggiornamento abilitazione / disabilitazione funzioni di checkin - checkout /// </summary> public void RefreshButtons() { this.DisableAllButtons(); DocsPaWR.SchedaDocumento currentScheda = this.CurrentSchedaDocumento; Boolean canContinue = (!string.IsNullOrEmpty(UIManager.DocumentManager.getSelectedAttachId())) || (this.getCaller() != "ATTACHMENTS"); if (currentScheda != null && canContinue) { //FileRequest selectedFile =(UIManager.DocumentManager.getSelectedAttachId() != null) ? // UIManager.FileManager.GetFileRequest(UIManager.DocumentManager.getSelectedAttachId()) : // UIManager.FileManager.GetFileRequest(); FileRequest selectedFile = null; if (UIManager.DocumentManager.getSelectedAttachId() != null) { selectedFile = FileManager.GetFileRequest(UIManager.DocumentManager.getSelectedAttachId()); } else { String selectedVersionId = null; if (DocumentManager.getSelectedNumberVersion() != null && DocumentManager.ListDocVersions != null) { selectedVersionId = (from v in DocumentManager.ListDocVersions where v.version.Equals(DocumentManager.getSelectedNumberVersion()) select v.versionId).FirstOrDefault(); } selectedFile = FileManager.GetFileRequest(selectedVersionId); } // Verifica stato consolidamento del documento (solo se non consolidato, si può fare checkout) if (currentScheda.ConsolidationState == null || (currentScheda.ConsolidationState != null && currentScheda.ConsolidationState.State == DocsPaWR.DocumentConsolidationStateEnum.None)) { if (!string.IsNullOrEmpty(currentScheda.systemId) && (currentScheda.tipoProto != "R" && currentScheda.tipoProto != "C")) { // NB: Nei casi in cui l'utente non è abilitato per l'utilizzo della funzione di checkin / checkout, // le uniche funzionalità non disponibili saranno quelle relative al checkin e all'undocheckout. // In ogni caso potrà vedere lo stato del documento e chi l'ha posto in checkout. // Verifica se il documento non è né cestinato né annullato if (!this.IsDocumentoInCestino && !this.IsDocumentoAnnullato) { CheckOutStatus status = CheckInOutServices.GetCheckOutDocumentStatus(); if (status != null) { // Il documento risulta bloccato, reperimento del proprietario del blocco string ownerUser = status.UserName.ToUpper(); bool isOwnerCheckOut = (ownerUser == UIManager.UserManager.GetInfoUser().userId.ToUpper()); if (this.UserEnabled && isOwnerCheckOut) { // Documento bloccato dall'utente corrente: funzioni di rilascio abilitate this.btnCheckIn.Enabled = true; this.btnOpenCheckedOutFile.Enabled = true; this.btnUndoCheckOut.Enabled = true; if (UIManager.UserManager.isFiltroAooEnabled()) { //DocsPaWR.Registro[] userRegistri = UIManager.UserManager.getListaRegistri(this.Page); DocsPaWR.Registro[] userRegistri = RoleManager.GetRoleInSession().registri; this.btnCheckIn.Enabled = UIManager.UserManager.verifyRegNoAOO(currentScheda, userRegistri); this.btnOpenCheckedOutFile.Enabled = UIManager.UserManager.verifyRegNoAOO(currentScheda, userRegistri); this.btnUndoCheckOut.Enabled = UIManager.UserManager.verifyRegNoAOO(currentScheda, userRegistri); } } string language = UIManager.UserManager.GetUserLanguage(); this.btnShowCheckOutStatus.Enabled = true; this.btnShowCheckOutStatus.Visible = true; this.btnShowCheckOutStatus.ToolTip = Utils.Languages.GetLabelFromCode("DocumentImgLockTooltip", language) + ownerUser; //Verifico che il documento è bloccato per una richiesta di conversione pdf lato server //In caso affermativo disabilito l'apertura del file ed il rilascia sen if (status.InConversionePdf) { this.btnOpenCheckedOutFile.Enabled = false; this.btnCheckIn.Enabled = false; // Se il documento è in stato di conversione pdf, // il pulsante di annullamento è abilitato solo se l'owner // del blocco è l'utente stesso //this.btnUndoCheckOut.Enabled = isOwnerCheckOut; this.btnUndoCheckOut.Enabled = false; } } else { //modifica NttDataWA.DocsPaWR.DocsPaWebService ws = new NttDataWA.DocsPaWR.DocsPaWebService(); //string idAmm = UIManager.UserManager.GetInfoUser().idAmministrazione; ////NttDataWA.DocsPaWR.CacheConfig info = ws.getConfigurazioneCache(idAmm); //if (ws.isActiveCache(idAmm)) //{ // bool inCache = ws.inCache(currentScheda.docNumber, currentScheda.documenti[currentScheda.documenti.Length - 1].versionId, idAmm); // if (inCache) // { // string pathComponents = ws.recuperaPathComponents(currentScheda.docNumber, currentScheda.documenti[currentScheda.documenti.Length - 1].versionId); // if (string.IsNullOrEmpty(pathComponents)) // this.btnCheckOut.Enabled = false; // else // this.btnCheckOut.Enabled = true; // } //} //else //fine mofidica if (Session["docInRisposta"] == null && Session["docInRisposta2"] == null) { if (!this.IsEnabledProfilazioneAllegati && this.IsSelectedTabAllegati && selectedFile.GetType() == typeof(DocsPaWR.Allegato)) { // La funzione di checkout esplicita da tab allegati è disabilitata se la profilazione allegati è disabilitata this.btnCheckOut.Enabled = false; } else { if (DocumentManager.getSelectedRecord() != null && !string.IsNullOrEmpty(DocumentManager.getSelectedRecord().systemId)) { if (!UIManager.UserManager.disabilitaButtHMDiritti(DocumentManager.getSelectedRecord().accessRights)) { this.btnCheckOut.Enabled = this.UserEnabled; } else { this.btnCheckOut.Enabled = false; } } else { this.btnCheckOut.Enabled = this.UserEnabled; } if (UIManager.UserManager.isFiltroAooEnabled()) { if (btnCheckOut.Enabled) { //DocsPaWR.Registro[] userRegistri = UIManager.UserManager.getListaRegistri(this.Page); DocsPaWR.Registro[] userRegistri = RoleManager.GetRoleInSession().registri; btnCheckOut.Enabled = UIManager.UserManager.verifyRegNoAOO(currentScheda, userRegistri); } } } } else { this.btnCheckOut.Enabled = false; if (Session["docInRisposta"] != null) { Session.Remove("docInRisposta"); } else if (Session["docInRisposta2"] != null) { Session.Remove("docInRisposta2"); } } } } } } // Abilitazione / disabilitazione pulsante salva file, // che viene comunque abilitato (se file presente) // indipendentemente dalle regole di abilitazione del checkin / checkout int size; //Prendo la versione del documento attualmente selezionata /* Emanuela 07-07-2014: Commentato perchè il filerequest è stato già preso con il selectedFile * FileRequest fileReq; * if (UIManager.DocumentManager.getSelectedAttachId() != null) * { * fileReq = FileManager.GetFileRequest(UIManager.DocumentManager.getSelectedAttachId()); * } * else * { * String selectedVersionId = null; * if (DocumentManager.getSelectedNumberVersion() != null && DocumentManager.ListDocVersions != null) * selectedVersionId = (from v in DocumentManager.ListDocVersions where v.version.Equals(DocumentManager.getSelectedNumberVersion()) select v.versionId).FirstOrDefault(); * * fileReq = FileManager.GetFileRequest(selectedVersionId); * } * */ /* * if (DocumentManager.getSelectedNumberVersion() != null && DocumentManager.ListDocVersions != null) * { * fileReq = (from v in DocumentManager.ListDocVersions where v.version.Equals(DocumentManager.getSelectedNumberVersion()) select v).FirstOrDefault(); * } */ if (selectedFile != null && Int32.TryParse(selectedFile.fileSize, out size)) { this.btnSave.Enabled = (size > 0) && !selectedFile.inLibroFirma;// && (CheckInOutServices.UserEnabledSaveLocal); this.Refresh(currentScheda.systemId, selectedFile.docNumber); } if (DocumentManager.IsDocumentCheckedOut() || CheckInOut.CheckInOutServices.IsCheckedOutDocument(DocumentManager.getSelectedRecord().docNumber, DocumentManager.getSelectedRecord().docNumber, UserManager.GetInfoUser(), true, DocumentManager.getSelectedRecord()) || DiagrammiManager.IsDocumentInFinalState() || (selectedFile != null && selectedFile.inLibroFirma)) { this.btnCheckOut.Enabled = false; } } else { if (canContinue) { FileRequest fileReq; int size; if (UIManager.DocumentManager.getSelectedAttachId() != null) { fileReq = FileManager.GetFileRequest(UIManager.DocumentManager.getSelectedAttachId()); } else { String selectedVersionId = null; if (DocumentManager.getSelectedNumberVersion() != null && DocumentManager.ListDocVersions != null) { selectedVersionId = (from v in DocumentManager.ListDocVersions where v.version.Equals(DocumentManager.getSelectedNumberVersion()) select v.versionId).FirstOrDefault(); } fileReq = FileManager.GetFileRequest(selectedVersionId); } if (fileReq != null && Int32.TryParse(fileReq.fileSize, out size)) { this.btnSave.Enabled = (size > 0) && !fileReq.inLibroFirma; // && (CheckInOutServices.UserEnabled); } } } }
private void impostaTitolo() { DocsPaWR.DiagrammaStato diagramma = DiagrammiManager.getDiagrammaById(idDiagramma, this.Page); lbl_titolo.Text = "Diagramma : - " + diagramma.DESCRIZIONE + " - STATO : " + (from s in diagramma.STATI where s.SYSTEM_ID.ToString().Equals(idStato) select s.DESCRIZIONE).First(); }