|
@@ -131,26 +131,26 @@ namespace Comal.Classes
|
|
|
|
|
|
private void Job_PropertyChanged(object sender, PropertyChangedEventArgs e)
|
|
private void Job_PropertyChanged(object sender, PropertyChangedEventArgs e)
|
|
{
|
|
{
|
|
- if (string.Equals(e.PropertyName, "ID") && !Contact.IsValid())
|
|
|
|
- {
|
|
|
|
- var jobLink = sender as JobLink;
|
|
|
|
- CoreTable results = null;
|
|
|
|
- if (jobLink.IsValid())
|
|
|
|
- results = new Client<Job>().Query(
|
|
|
|
- new Filter<Job>(x => x.ID).IsEqualTo(jobLink.ID),
|
|
|
|
- new Columns<Job>(
|
|
|
|
- x => x.SiteAddress.Street,
|
|
|
|
- x => x.SiteAddress.City,
|
|
|
|
- x => x.SiteAddress.State,
|
|
|
|
- x => x.SiteAddress.PostCode
|
|
|
|
- )
|
|
|
|
- );
|
|
|
|
- var row = results?.Rows.FirstOrDefault();
|
|
|
|
- Address.Street = row != null ? row.Get<Job, string>(x => x.SiteAddress.Street) : "";
|
|
|
|
- Address.City = row != null ? row.Get<Job, string>(x => x.SiteAddress.City) : "";
|
|
|
|
- Address.State = row != null ? row.Get<Job, string>(x => x.SiteAddress.State) : "";
|
|
|
|
- Address.PostCode = row != null ? row.Get<Job, string>(x => x.SiteAddress.PostCode) : "";
|
|
|
|
- }
|
|
|
|
|
|
+ //if (string.Equals(e.PropertyName, "ID") && !Contact.IsValid())
|
|
|
|
+ //{
|
|
|
|
+ // var jobLink = sender as JobLink;
|
|
|
|
+ // CoreTable results = null;
|
|
|
|
+ // if (jobLink.IsValid())
|
|
|
|
+ // results = new Client<Job>().Query(
|
|
|
|
+ // new Filter<Job>(x => x.ID).IsEqualTo(jobLink.ID),
|
|
|
|
+ // new Columns<Job>(
|
|
|
|
+ // x => x.SiteAddress.Street,
|
|
|
|
+ // x => x.SiteAddress.City,
|
|
|
|
+ // x => x.SiteAddress.State,
|
|
|
|
+ // x => x.SiteAddress.PostCode
|
|
|
|
+ // )
|
|
|
|
+ // );
|
|
|
|
+ // var row = results?.Rows.FirstOrDefault();
|
|
|
|
+ // Address.Street = row != null ? row.Get<Job, string>(x => x.SiteAddress.Street) : "";
|
|
|
|
+ // Address.City = row != null ? row.Get<Job, string>(x => x.SiteAddress.City) : "";
|
|
|
|
+ // Address.State = row != null ? row.Get<Job, string>(x => x.SiteAddress.State) : "";
|
|
|
|
+ // Address.PostCode = row != null ? row.Get<Job, string>(x => x.SiteAddress.PostCode) : "";
|
|
|
|
+ //}
|
|
}
|
|
}
|
|
|
|
|
|
#region Move to Assignments?
|
|
#region Move to Assignments?
|