var ObjLst1 = from ls1 in objChkList1 //SUM by Claim_no dan Interest_id
group ls1 by new { ls1.claim_no, ls1.interest_id } into NoGroup
select new
{
claim_no = NoGroup.Key.claim_no,
interest_id = NoGroup.Key.interest_id,
Estimated_amount = NoGroup.Sum(x => x.Estimated_amount),
Claimable_Amount = 0,
};
var result1 = from a in objChkList2 //Dicari yg Claim_amount < estimasi_amoung by claim_no & interest_id
join c in ObjLst1 on new { a.claim_no, a.interest_id } equals new { c.claim_no, c.interest_id } into b_join
from c in b_join.DefaultIfEmpty()
where
a.Claimable_Amount < c.Estimated_amount //<
select new
{
a.claim_no,
a.interest_id,
a.InterestDescription,
c.Estimated_amount,
a.Claimable_Amount
};
group ls1 by new { ls1.claim_no, ls1.interest_id } into NoGroup
select new
{
claim_no = NoGroup.Key.claim_no,
interest_id = NoGroup.Key.interest_id,
Estimated_amount = NoGroup.Sum(x => x.Estimated_amount),
Claimable_Amount = 0,
};
var result1 = from a in objChkList2 //Dicari yg Claim_amount < estimasi_amoung by claim_no & interest_id
join c in ObjLst1 on new { a.claim_no, a.interest_id } equals new { c.claim_no, c.interest_id } into b_join
from c in b_join.DefaultIfEmpty()
where
a.Claimable_Amount < c.Estimated_amount //<
select new
{
a.claim_no,
a.interest_id,
a.InterestDescription,
c.Estimated_amount,
a.Claimable_Amount
};
Comments
Post a Comment