public void FindDetail(int LedgerId) { ReceiptDetail pod = RDetails.Where(x => x.LedgerId == LedgerId).FirstOrDefault(); if (pod != null) { pod.toCopy <ReceiptDetail>(RDetail); } }
public void DeleteDetail(int LedgerId) { ReceiptDetail pod = RDetails.Where(x => x.LedgerId == LedgerId).FirstOrDefault(); if (pod != null) { RDetails.Remove(pod); Amount = RDetails.Sum(x => x.Amount); } }
public void SaveDetail() { ReceiptDetail pod = RDetails.Where(x => x.LedgerId == RDetail.LedgerId).FirstOrDefault(); if (pod == null) { pod = new ReceiptDetail(); RDetails.Add(pod); } RDetail.toCopy <ReceiptDetail>(pod); ClearDetail(); Amount = RDetails.Sum(x => x.Amount); }
public void ClearDetail() { ReceiptDetail pod = new ReceiptDetail(); pod.toCopy <ReceiptDetail>(RDetail); }