日期:2014-05-20 浏览次数:20924 次
List<Query360UnitDataContract> list = (from RentalUnit in TempRentalUnitEntityList join RentalContract in TempRentalContractEntityList on RentalUnit.RentalID equals RentalContract.RentalID join Account in TempAccountEntityList on RentalContract.AccountID equals Account.AccountID join Unit in TempUnitEntityList on RentalUnit.RefRecordID equals Unit.UnitID join Company in TempCompanyEntityList on Unit.PropertyCompanyID equals Company.CompanyID select new Query360UnitDataContract { UnitID = Unit.UnitID, UnitNo = Unit.UnitNo, BuildUpArea = Unit.BuildUpArea, RecordStatus = Unit.RecordStatus, AccountName = Account.Name, CompanyName = Company.Name, Price = Unit.Price }).ToList<Query360UnitDataContract>()
SELECT Unit.UnitID,Unit.UnitNo,Unit.BuildUpArea, Unit.RecordStatus,Account.Name, Company.Name,Unit.Price FROM Lease.RT_RentalUnit as RentalUnit join Lease.RT_RentalContract as RentalContract on RentalUnit.RentalID = RentalContract.RentalID join Lease.CF_Account as Account on RentalContract.AccountID = Account.AccountID join Lease.MC_Unit as Unit on RentalUnit.RefRecordID = Unit.UnitID join lease.CF_Company as Company on Unit.PropertyCompanyID = Company.CompanyID