예제 #1
0
        public void FindDetail(int LedgerId)
        {
            JournalDetail pod = JDetails.Where(x => x.LedgerId == LedgerId).FirstOrDefault();

            if (pod != null)
            {
                pod.toCopy <JournalDetail>(JDetail);
            }
        }
예제 #2
0
        public void DeleteDetail(int LedgerId)
        {
            JournalDetail pod = JDetails.Where(x => x.LedgerId == LedgerId).FirstOrDefault();

            if (pod != null)
            {
                JDetails.Remove(pod);
                Amount = JDetails.Sum(x => x.DrAmt) - JDetails.Sum(x => x.CrAmt);
            }
        }
예제 #3
0
        public void SaveDetail()
        {
            JournalDetail pod = JDetails.Where(x => x.LedgerId == JDetail.LedgerId).FirstOrDefault();

            if (pod == null)
            {
                pod = new JournalDetail();
                JDetails.Add(pod);
            }

            JDetail.toCopy <JournalDetail>(pod);
            ClearDetail();
            Amount = JDetails.Sum(x => x.DrAmt) - JDetails.Sum(x => x.CrAmt);
        }