Exemplo n.º 1
0
 /// <summary>
 /// Crea una struttura SQueryBlockCollection contenente un solo criterio di filtro.
 /// </summary>
 /// <param name="sQuery">Criterio di filtro</param>
 public SQueryBlockCollection(SQuery sQuery) : base()
 {
     SQueryCollection sQueryColl = new SQueryCollection(LogicalOperator.And);
     sQueryColl.Add(sQuery);
     if (sQuery.Valore != null && sQuery.Valore != string.Empty && sQuery.ValoreObject == null)
         sQuery.ValoreObject = sQuery.Valore;
     this.Add(sQueryColl);
 }
Exemplo n.º 2
0
		/// <summary>
		/// Restituisce l'oggetto SQuery in base all'indice
		/// </summary>
		/// <param name="index">Indice dell'oggetto</param>
		/// <returns>Oggetto SQuery restituito</returns>
//		public SQuery Item(int index)
//		{
//			return (SQuery) List[index];
//		}

		/// <summary>
		/// Converte la collection in vettore
		/// </summary>
		/// <returns>Vettore di strutture SQuery</returns>
		public SQuery[] ToArray()
		{
			SQuery[] sQueryArray = new SQuery[List.Count];
			for(int i=0; i < List.Count; i++)
			{
				sQueryArray[i] = (SQuery) List[i];
			}

//			if(sQueryArray.Length > 0)
//				sQueryArray[0].ExternalOperator = LogicalOperator.Nothing;
	
			return sQueryArray;
		}
Exemplo n.º 3
0
        //private IDaoFactory _daoFactory = (IDaoFactory)Gipasoft.Windsor.Utils.WindsorUtils.Instance.WindsorContainer[typeof(IDaoFactory)];

        #endregion Private Members

        #region Constructors

        public SceltaStabile()
        {
            InitializeComponent();
            inizializza();

            SQuery sQueryCodice = new SQuery("Codice", "=");
            sQueryCodice.Table = "Stabile";
            codice.Tag = sQueryCodice;

            SQuery sQueryDescrizione = new SQuery("Descrizione", "LIKE");
            sQueryDescrizione.Table = "Stabile";
            descrizione.Tag = sQueryDescrizione;

            SQuery sQueryComune = new SQuery("Descrizione", "LIKE");
            sQueryComune.Table = "Indirizzo.Comune";
            comune.Tag = sQueryComune;

            SQuery sQueryProvince = new SQuery("ProvinciaAppartenenza.Codice", "=");
            sQueryProvince.Table = "Indirizzo.Comune";
            province.Tag = sQueryProvince;
        }
Exemplo n.º 4
0
		/// <summary>
		/// Duplica l'istanza corrente dell'oggetto
		/// </summary>
		/// <returns>Oggetto duplicato</returns>
		public object Clone()
		{
			SQuery sQuery = new SQuery();
			sQuery.NomeCampo = this.NomeCampo;
			sQuery.Operatore = this.Operatore;
			sQuery.Table = this.Table;
			sQuery.Valore = this.Valore;
			sQuery.Type =this.Type;
			sQuery.ExternalOperator = this.ExternalOperator;
			
			return sQuery;
		}
Exemplo n.º 5
0
		/// <summary>
		/// Metodo per aggiungere una struttura SQuery alla collection
		/// </summary>
		/// <param name="ordine">Oggetto <c>SQuery</c> che si vuole aggiungere</param>
		public void Add(SQuery squery)
		{
			List.Add(squery);
		}