internal IQueryJoinable From(QuerySources source, String alias) { this.Source = new LocalQuerySource(); this.Source.Source = source; this.Source.Alias = alias; return(this); }
/// <summary> /// Constructs the query that will execute the search. /// </summary> private IQueryConditionable ConstructSource(IQuerySourceable query) { String sourceName = this.SearchType.DatabaseView; String sourceEnum = sourceName.StartsWith("dbo.", StringComparison.OrdinalIgnoreCase) ? sourceName.Substring(4) : sourceName; QuerySources source = (QuerySources)Enum.Parse(typeof(QuerySources), sourceEnum); return(query.From(source) as IQueryConditionable); }
internal IQueryJoinableOn Join(QueryJoinTypes type, QuerySources source, String alias) { LocalQueryJoin join = new LocalQueryJoin(this); join.Type = type; join.Source = source; join.Alias = alias; join.Ordinal = this.Joins.Count + 1; this.Joins.Add(join); return(join); }
void OnSourceUpdated(Source src) { try { // Console.WriteLine ("LIST ON SOURCE UPDATE"); var showing = QuerySources.Any(s => s.Id == src.Id); if (showing) { RefreshMessages(); } } catch (Exception error) { Log.Error(error); } }
protected override void PopulateControl() { String filterColumn = null; String filterValue = null; QuerySources querysource = QuerySources.Memberships; if (this.DataSource is Person) { filterColumn = "PN_ID"; filterValue = (this.DataSource as Person).Id; } if (this.DataSource is Role) { filterColumn = "MEL_PROLE_ID"; filterValue = (this.DataSource as Role).Id; } if (this.DataSource is Organisation) { filterColumn = "MEL_ORG_ID"; filterValue = (this.DataSource as Organisation).Id; } this.MembershipListResult.Data = Query.Create() .Select("MEM_ID") .Select("MEP_ID") .Select("MEP_MEMBERSHIP_NAME", "MembershipName") .Select("MEM_REF", "Ref") .Select("PROD_NAME", "Name") .Select("MEP_STATUS", "Status") .Select("MEP_START", "StartDate") .Select("MEP_END", "EndDate") .Select("MEP_RENEWAL_DATE", "RenewDate") .Select("uri") .From(querysource) .Where(filterColumn, QueryConditionTypes.Equal, filterValue) .And("MEP_STATUS", QueryConditionTypes.DoesNotStartWith, "10") .And("MEP_STATUS", QueryConditionTypes.DoesNotStartWith, "90") .OrderBy("MEM_START", true); }
protected override void PopulateControl() { String ColumnName = null; String ColumnValue = null; QuerySources querysource = QuerySources.BookingCreditNotes; if (this.DataSource is Booking) { ColumnName = "INV_BOOK_ID"; ColumnValue = (this.DataSource as Booking).Id; } if (this.DataSource is Account) { ColumnName = "INV_ACC_ID"; ColumnValue = (this.DataSource as Account).Id; } this.CreditNoteList.Data = Query.Create() .Select("INV_ID") .Select("INV_DATE") .Select("INV_TYPE") .Select("INV_REF") .Select("INV_GROSS_TOTAL") .Select("INV_CURRENCY_TYPE") .Select("INV_BK_ORG_CUST_AC") .Select("INV_INV_ORG_NAME") .Select("INV_CONTACT_NAME") .Select("INV_PERSON_ID") .Select("INV_ORG_ID") .Select("InvoiceReference") .Select("InvoiceID") .Select("INV_ID2") .Select("uri") .From(querysource) .Where(ColumnName, QueryConditionTypes.Equal, ColumnValue) .OrderBy("INV_DATE", true); }
private void MarkForMaterialization(IQuerySource querySource) { RequiresMaterializationExpressionVisitor.HandleUnderlyingQuerySources(querySource, MarkForMaterialization); QuerySources.Add(querySource); }
IQueryJoinableOn IQueryJoinable.Join(QueryJoinTypes type, QuerySources source, String alias) { return(this.QueryModel.Join(type, source, alias)); }
IQueryJoinableOn IQueryJoinable.Join(QueryJoinTypes type, QuerySources source) { return(this.QueryModel.Join(type, source, null)); }
internal IQueryJoinable From(QuerySources source) { return(this.From(source, null)); }
IQueryJoinableOn IQueryJoinable.Join(QuerySources source, String alias) { return(this.Join(QueryJoinTypes.Inner, source, alias)); }
IQueryJoinableOn IQueryJoinable.Join(QuerySources source) { return(this.Join(QueryJoinTypes.Inner, source, null)); }
IQueryJoinable IQuerySourceable.From(QuerySources source, String alias) { return(this.From(source, alias)); }
IQueryJoinable IQuerySourceable.From(QuerySources source) { return(this.From(source)); }