private void SalvaStato() { Fascicolo fascicolo = UIManager.ProjectManager.getProjectInSession(); bool statoFinale = this.controllaStatoFinale(); DiagrammiManager.salvaModificaStatoFasc(fascicolo.systemID, this.SelectedState.SYSTEM_ID.ToString(), this.StateDiagram, UserManager.GetInfoUser().userId, UserManager.GetInfoUser(), string.Empty); if (statoFinale) { this.chiudiFascicolo(fascicolo, UserManager.GetInfoUser(), RoleManager.GetRoleInSession()); } //if (this.PnlStateDiagram.Visible && !string.IsNullOrEmpty(this.DocumentStateDiagramDataValue.Text) && fascicolo.template.SYSTEM_ID != null) //{ // DiagrammiManager.salvaDataScadenzaFasc(fascicolo.systemID, this.DocumentStateDiagramDataValue.Text, fascicolo.template.SYSTEM_ID.ToString()); // fascicolo.dtaScadenza = this.DocumentStateDiagramDataValue.Text; // UIManager.ProjectManager.setProjectInSession(fascicolo); //} //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; } } } } } }
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) { } }