예제 #1
0
        }//end method

        public override void ReadTransFileRecord(ref TransRecord ctTrans)
        {
            try {
                ctTrans.acctNum   = transRecords.ReadInt32();
                ctTrans.dollarAmt = transRecords.ReadDecimal();
            }
            catch (ArgumentException) {
                ctTrans = null;
            }
            catch (NullReferenceException) {
                ctTrans = null;
            }catch (EndOfStreamException) {
                ctTrans = null;
            }
        }//end method
        }//end method

        public override void ReadTransFileRecord(ref TransRecord ctTrans)
        {
            try {
                String[] toks = transRecords.ReadLine().Split(' ');

                ctTrans.acctNum   = Convert.ToInt32(toks[0]);
                ctTrans.dollarAmt = Convert.ToDecimal(toks[1]);

                this.LineNum++;
            }
            catch (ArgumentException) {
                ctTrans = null;
            }
            catch (NullReferenceException) {
                ctTrans = null;
            }
        }//end method
        public override void ReadTransFileRecord(ref TransRecord ctTrans)
        {
            try {
                String[] toks = transRecords.ReadLine().Split(' ');

                ctTrans.acctNum = Convert.ToInt32(toks[0]);
                ctTrans.dollarAmt = Convert.ToDecimal(toks[1]);

                this.LineNum++;
            }
            catch (ArgumentException) {
                ctTrans = null;
            }
            catch (NullReferenceException) {
                ctTrans = null;
            }
        }
예제 #4
0
 //Reads one transaction file record from the transaction file
 //Should keep track of the line numbers for error logging to the screen
 public abstract void ReadTransFileRecord(ref TransRecord ctTrans);
 //Reads one transaction file record from the transaction file
 //Should keep track of the line numbers for error logging to the screen
 public abstract void ReadTransFileRecord(ref TransRecord ctTrans);
 public override void ReadTransFileRecord(ref TransRecord ctTrans)
 {
     try {
         ctTrans.acctNum = transRecords.ReadInt32();
         ctTrans.dollarAmt = transRecords.ReadDecimal();
     }
     catch (ArgumentException) {
         ctTrans = null;
     }
     catch (NullReferenceException) {
         ctTrans = null;
     }catch(EndOfStreamException){
         ctTrans = null;
     }
 }