Click here to Skip to main content
15,903,856 members
Home / Discussions / WPF
   

WPF

 
GeneralRe: WPF: Customizing the appearence of a window n XAML Pin
Pew_new29-Aug-18 0:55
Pew_new29-Aug-18 0:55 
GeneralRe: WPF: Customizing the appearence of a window n XAML Pin
OriginalGriff29-Aug-18 1:04
mveOriginalGriff29-Aug-18 1:04 
GeneralRe: WPF: Customizing the appearence of a window n XAML Pin
Pew_new29-Aug-18 3:07
Pew_new29-Aug-18 3:07 
GeneralRe: WPF: Customizing the appearence of a window n XAML Pin
Richard Deeming29-Aug-18 3:52
mveRichard Deeming29-Aug-18 3:52 
GeneralRe: WPF: Customizing the appearence of a window n XAML Pin
Pew_new29-Aug-18 4:03
Pew_new29-Aug-18 4:03 
GeneralRe: WPF: Customizing the appearence of a window n XAML Pin
Richard Deeming29-Aug-18 4:09
mveRichard Deeming29-Aug-18 4:09 
GeneralRe: WPF: Customizing the appearence of a window n XAML Pin
Pew_new29-Aug-18 4:31
Pew_new29-Aug-18 4:31 
SuggestionRe: WPF: Customizing the appearence of a window n XAML Pin
Richard Deeming29-Aug-18 2:56
mveRichard Deeming29-Aug-18 2:56 
GeneralRe: WPF: Customizing the appearence of a window n XAML Pin
Pew_new29-Aug-18 3:12
Pew_new29-Aug-18 3:12 
QuestionWPF: Can't get what I need to do to get things right (responsive controls). Pin
Pew_new21-Aug-18 5:13
Pew_new21-Aug-18 5:13 
AnswerRe: WPF: Can't get what I need to do to get things right (responsive controls). Pin
Richard Deeming21-Aug-18 9:59
mveRichard Deeming21-Aug-18 9:59 
GeneralRe: WPF: Can't get what I need to do to get things right (responsive controls). Pin
Pew_new21-Aug-18 22:02
Pew_new21-Aug-18 22:02 
GeneralRe: WPF: Can't get what I need to do to get things right (responsive controls). Pin
Richard Deeming22-Aug-18 2:21
mveRichard Deeming22-Aug-18 2:21 
GeneralRe: WPF: Can't get what I need to do to get things right (responsive controls). Pin
Pew_new23-Aug-18 0:41
Pew_new23-Aug-18 0:41 
GeneralRe: WPF: Can't get what I need to do to get things right (responsive controls). Pin
Richard Deeming23-Aug-18 8:15
mveRichard Deeming23-Aug-18 8:15 
GeneralRe: WPF: Can't get what I need to do to get things right (responsive controls). Pin
Pew_new23-Aug-18 8:34
Pew_new23-Aug-18 8:34 
GeneralRe: WPF: Can't get what I need to do to get things right (responsive controls). Pin
Richard Deeming23-Aug-18 8:39
mveRichard Deeming23-Aug-18 8:39 
GeneralRe: WPF: Can't get what I need to do to get things right (responsive controls). Pin
Pew_new23-Aug-18 8:52
Pew_new23-Aug-18 8:52 
GeneralRe: WPF: Can't get what I need to do to get things right (responsive controls). Pin
Richard Deeming23-Aug-18 9:05
mveRichard Deeming23-Aug-18 9:05 
GeneralRe: WPF: Can't get what I need to do to get things right (responsive controls). Pin
Pew_new24-Aug-18 3:09
Pew_new24-Aug-18 3:09 
GeneralRe: WPF: Can't get what I need to do to get things right (responsive controls). Pin
Gerry Schmitz24-Aug-18 6:08
mveGerry Schmitz24-Aug-18 6:08 
GeneralRe: WPF: Can't get what I need to do to get things right (responsive controls). Pin
Pew_new25-Aug-18 7:36
Pew_new25-Aug-18 7:36 
QuestionScale items with ViewBox within an ItemsControl Pin
Kenneth Haugland7-Aug-18 6:07
mvaKenneth Haugland7-Aug-18 6:07 
AnswerRe: Scale items with ViewBox within an ItemsControl Pin
Kenneth Haugland8-Aug-18 3:56
mvaKenneth Haugland8-Aug-18 3:56 
QuestionPredicateBuilder Question Pin
Kevin Marois14-Jul-18 18:21
professionalKevin Marois14-Jul-18 18:21 
I'm querying 3 tables with Joins:
// List for returning results
List<PurchasingEntity> results = null;

// Query of all joined records 
IQueryable<PurchasingEntity> query = (from c in db.Companies
                                        join p in db.Projects on c.Id equals p.CompanyId
                                        join j in db.Jobs on p.Id equals j.ProjectId
                                        select new PurchasingEntity
                                        {
                                            CompanyId = c.Id,
                                            CompanyName = c.CompanyName,
                                            ProjectId = p.Id,
                                            ProjectName = p.ProjectName,
                                            ProjectStatusId = p.StatusId.HasValue ? p.StatusId : 0,
                                            JobId = j.Id,
                                            JobNumber = j.JobId,
                                            Phase = j.Phase,
                                            Quantity = j.Quantity.HasValue ? j.Quantity.Value : 0,
                                            StartDate = j.StartDate.HasValue ? j.StartDate : null,
                                            LumberVendorId = j.LumberVendorId,
                                            HardwareVendorId = j.HardwareVendorId,
                                            TrussVendorId = j.TrussVendorId
                                        });

// Create the PredicateBuilder
var predicate = PredicateBuilder.True<PurchasingEntity>();

// Add status Awarded filter
predicate = predicate.And(i => i.ProjectStatusId == awardedId);

// Add optional query parameters
if (companyId > 0)
{
    predicate = predicate.And(i => i.CompanyId == companyId);
}

if (projectId > 0)
{
    predicate = predicate.And(i => i.ProjectId == projectId);
}

if (startDate != null)
{
    predicate = predicate.And(i => i.StartDate >= startDate);
}

if (endDate != null)
{
    predicate = predicate.And(i => i.StartDate <= endDate);
}

// Set the query's WHERE clause to the predicate and call ToList
results = query.Where(predicate).ToList();

I doh't want to include an Companies, Projects, or Jobs if they are marked as deleted, which is DeletedDT.HasValue.

The problem is that the PredicateBuilder is working on type PurchasingEntity which is being formed via the join.

How do I filter these out???
If it's not broken, fix it until it is.
Everything makes sense in someone's mind.
Ya can't fix stupid.

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.