Exemplo n.º 1
0
        public void FindDetail(int LedgerId)
        {
            ReceiptDetail pod = RDetails.Where(x => x.LedgerId == LedgerId).FirstOrDefault();

            if (pod != null)
            {
                pod.toCopy <ReceiptDetail>(RDetail);
            }
        }
Exemplo n.º 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);
            }
        }
Exemplo n.º 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);
        }
Exemplo n.º 4
0
        public void ClearDetail()
        {
            ReceiptDetail pod = new ReceiptDetail();

            pod.toCopy <ReceiptDetail>(RDetail);
        }