public DataRow[] allnivel() { DataTable dt = obj_nivel.get_nivel(); DataRow[] rows = null; if (dt.Rows.Count > 0) { rows = new DataRow[dt.Rows.Count]; for (int i = 0; i < dt.Rows.Count; i++) { rows[i] = dt.Rows[i]; } } return(rows); }