private void GetListaRegistri(string idAmm, string idCorrGlob) { try { Manager.UtentiManager theManager = new Amministrazione.Manager.UtentiManager(); theManager.RegistriUtente(idCorrGlob, idAmm); if (theManager.getRegistriUtente() != null && theManager.getRegistriUtente().Count > 0) { InitializeDataSetRegistri(); DataRow row; foreach (SAAdminTool.DocsPaWR.OrgRegistro registro in theManager.getRegistriUtente()) { row = dsRegistri.Tables[0].NewRow(); row["IDRegistro"] = registro.IDRegistro; row["Codice"] = registro.Codice; row["Descrizione"] = registro.Descrizione; row["IDAmministrazione"] = idAmm; row["IDCorrGlob"] = idCorrGlob; if (registro.Associato != null && registro.Associato != String.Empty) { row["Sel"] = "true"; } else { row["Sel"] = "false"; } dsRegistri.Tables["REGISTRI"].Rows.Add(row); } DataView dv = dsRegistri.Tables["REGISTRI"].DefaultView; dv.Sort = "Descrizione ASC"; this.dg_registri.DataSource = dv; this.dg_registri.DataBind(); this.GUI("Ok"); } else { this.GUI("NoDataFound"); } } catch { this.GUI("Errore"); } }