示例#1
0
        public static bool AssignChequeNo(Context context, Cheque cheque)
        {
            if (null == cheque)
            {
                return(false);
            }
            if (null == cheque.BankAccount)
            {
                cheque.ChequeNo = "Bank account is not specified";
                return(false);
            }
            IList <ChequeBatch> batches = ChequeBatch.FindAvailable(context, cheque.BankAccount);

            if (batches.Count > 0)
            {
                return(batches[0].TryGetChequeNo(cheque));
            }

            cheque.ChequeNo = "No available cheque book";
            return(false);
        }
示例#2
0
 public ChequeBatchItem(ChequeBatch chequeBatch, string chequeNo)
 {
     this.isClean     = false;
     this.chequeBatch = chequeBatch;
     this.chequeNo    = chequeNo;
 }