Example #1
0
	    /// <summary>
	    /// Imposta una intera tabella. Se giĆ  esiste una tabella con la stessa chiave quest'ultima viene sostituito
	    /// </summary>
	    /// <param name="codiceTabella">Codice della tabella</param>
	    /// <param name="tabella"></param>
	    public void SetTable(string codiceTabella, BindableHashtable tabella)
		{
			SetItem(codiceTabella, tabella);
		}
Example #2
0
	    /// <summary>
	    /// Ricerca in un file XML tutti gli elementi di una tabella
	    /// </summary>
	    /// <param name="codiceTabella">Codice della tabella</param>
	    /// <param name="iter"></param>
	    /// <param name="nav"></param>
	    /// <returns>Elemento Tabella trovato</returns>
	    private BindableHashtable LoadTabella(string codiceTabella, XPathNodeIterator iter, XPathNavigator nav)
		{
			var tabelle = new BindableHashtable();

			while(iter.MoveNext())
			{
				var continua = true;
				var codiceElemento = iter.Current.GetAttribute("codice", nav.NamespaceURI);
				while(codiceElemento == "" && continua)
				{
					continua = iter.MoveNext();
					codiceElemento = iter.Current.GetAttribute("codice", nav.NamespaceURI);
				}

				if(continua) tabelle.SetItem(codiceElemento, loadElemento(codiceTabella, codiceElemento, iter.Current.SelectDescendants(XPathNodeType.Element, false)));
			}

			return tabelle;
		}