Пример #1
0
 public Transaction(string id,Account accountfrom,Account accountto,string details,decimal Amount)
 {
     GTI = id;
     Comments = details;
     AccountFrom = accountfrom;
     AccountTo = accountto;
     TrasactionAmt = Amount;
 }
Пример #2
0
        public Account GetAccountFromFile(string CustID)
        {
            StreamReader file = new StreamReader(Path.Combine(BANK.BANKDATA, BANK.ACCOUNTINFO));
            string line;
            while ((line = file.ReadLine()) != null)
            {
                string[] CharArray = line.Split(';').ToArray<string>();
                if(CharArray.Contains(CustID))
                {

                    Account cust = new Account();
                    cust.ID = CharArray[0];
                    cust.AccountName = CharArray[1];
                    cust.Balance =Decimal.Parse(CharArray[2].Replace("$", ""));
                    return cust;
                }
            }

            return null;
        }
 public bool Add(string transindex,Account PayerAccount ,Account PayeeAccount,string details,decimal amount)
 {
     BnkQueue.Add(new Transaction(transindex,PayerAccount,PayeeAccount,details,amount));
     return true;
 }