protected void RemoveFilter_Click(object sender, EventArgs e) { FilterQueryCollection existingQueries = new FilterQueryCollection(hidFilterQueries.Value); FilterQuery fq = new FilterQuery(((LinkButton)sender).CommandArgument); existingQueries.Remove(fq); UpdateFilters(existingQueries); }
protected void AddFilter_Click(object sender, EventArgs e) { FilterQuery fq = new FilterQuery(((LinkButton)sender).CommandArgument); FilterQueryCollection existingQueries = new FilterQueryCollection(hidFilterQueries.Value); existingQueries.Add(fq); Query(null, 0, hidLoggingId.Value, existingQueries); }
/// <summary> /// Determines whether two specified <see cref="FilterQuery"/> objects have the same value. /// </summary> /// <param name="obj">The object to compare to this instance</param> /// <returns>True if the two objects match, or false if not.</returns> public override bool Equals(object obj) { if (obj is FilterQuery) { // Implement value equality for our class FilterQuery other = (FilterQuery)obj; return(this.Field == other.Field && this.Value == other.Value); } return(base.Equals(obj)); }