コード例 #1
0
 public string SetAmount(uint amount)    //String is passed to send the exception to Business Tier then to Presentation tier
 {
     try
     {
         iTransactionAccess.SetAmount(amount);   /* Handling no Transaction selected Exception */
         return("Sucessfull");
     }
     catch (Exception er) //General Exception class is used as only this exception is passed in all checked combinations
     {
         return("No Transaction Selected");
     }
 }
コード例 #2
0
        public void MakeTransaction(uint sID, uint rID, uint amount)
        {
            trans = myBank.GetTransactionInterface();
            uint transID = trans.CreateTransaction();

            trans.SelectTransaction(transID);
            trans.SetSendr(sID);
            trans.SetRecvr(rID);
            trans.SetAmount(amount);
            myBank.ProcessAllTransactions();
            myBank.SaveToDisk();
        }
コード例 #3
0
 public void SetAmount(uint amount)
 {
     ITransactionAccess.SetAmount(amount);
 }