Code: Select all
partial class OplHistory {
public string ModifiedByName { get; set; }
public string ModifiedBySite { get; set; }
}
Code: Select all
using System.Linq;
using Devart.Data.Oracle;
usig System.Data.Common;
public List<OplHistory> GetWoHistory(long dealNum, long jobNum, long cycleNum) {
var query = from hist in DB.OplHistories
join emp in DB.Employees on hist.ModifyEmpId equals emp.EmployeeId
join site in DB.Sites on hist.ModifySiteId equals site.SiteId
where hist.DealNumber == dealNum &&
hist.JobNumber == jobNum &&
hist.CycleNumber == cycleNum
select new OplHistory {
ModifyColumn = hist.ModifyColumn,
OldValue = hist.OldValue,
NewValue = hist.NewValue,
ModifiedByName = emp.NameFirst + " " + emp.NameLast,
ModifiedBySite = site.NameShort
};
return query.ToList();
}
Code: Select all
UnmappedClassMember OplHistory, ModifiedByName. source: Devart.Data.Linq