示例#1
0
        public void FindDetail(int LedgerId)
        {
            ReceiptDetail pod = RDetails.Where(x => x.LedgerId == LedgerId).FirstOrDefault();

            if (pod != null)
            {
                pod.toCopy <ReceiptDetail>(RDetail);
            }
        }
示例#2
0
        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);
            }
        }
示例#3
0
        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);
        }
示例#4
0
        public void ClearDetail()
        {
            ReceiptDetail pod = new ReceiptDetail();

            pod.toCopy <ReceiptDetail>(RDetail);
        }