Example #1
0
        public void DeleteVerification(int no)
        {
            using (var core = new StandardBusinessLayer(this))
            {
                core.Connect();

                Verification verification = Verifications.FirstOrDefault(v => v.No == no);

                if (verification != null)
                {
                    core.DeleteVerification(no);
                    Verifications.Remove(verification);
                }
            }
        }
Example #2
0
        public void DeleteCashBookTransaction(int no)
        {
            using (var core = new StandardBusinessLayer(this))
            {
                core.Connect();

                var transaction = CashBookTransactions.FirstOrDefault(t => t.No == no);

                if (transaction != null)
                {
                    Verification verification = Verifications.FirstOrDefault(v => v.No == transaction.VerificationNo);

                    core.DeleteCashBookTransaction(no);
                    CashBookTransactions.Remove(transaction);

                    FillVerification(verification);
                }
            }
        }
Example #3
0
        public void DeleteCashBookTransactionsByVerificationNo(int verificationNo)
        {
            using (var core = new StandardBusinessLayer(this))
            {
                core.Connect();

                var transactions = CashBookTransactions.Where(t => t.VerificationNo == verificationNo).ToList();

                if (transactions.Count() > 0)
                {
                    var verification = Verifications.FirstOrDefault(v => v.No == transactions[0].VerificationNo);

                    core.DeleteCashBookTransactionsByVerificationNo(verificationNo);

                    foreach (var transaction in transactions)
                    {
                        CashBookTransactions.Remove(transaction);
                    }

                    FillVerification(verification);
                }
            }
        }
Example #4
0
 public Verification GetVerification(int no)
 {
     return(Verifications.FirstOrDefault(v => v.No == no));
 }