Exemple #1
0
 public CAccount(int id, int ownerID)
 {
     this.saldo     = 0;
     this.accountID = id;
     this.ownerID   = ownerID;
     this.history   = new CHistory();
 }
Exemple #2
0
        public string visit(CPayInRaport payinraport, CHistory history)
        {
            List <COperation> temp   = history.GetOperations();
            string            raport = "";

            foreach (COperation op in temp)
            {
                if (op.GetOperationType() == "PAYIN")
                {
                    raport += op.GetAmount() + "-";
                    raport += op.GetOperationType() + "...";
                }
            }
            return(raport.Substring(0, raport.Length - 3));
        }
Exemple #3
0
        public string visit(CTransferRaport transferraport, CHistory history)
        {
            List <COperation> temp   = history.GetOperations();
            string            raport = "";

            foreach (COperation op in temp)
            {
                if (op.GetOperationType() == "TRANSFER")
                {
                    raport += op.GetAmount() + "-";
                    raport += op.GetOperationType() + "...";
                }
            }
            return(raport.Substring(0, raport.Length - 3));
        }
Exemple #4
0
        public string visit(CMonthRaport monthraport, CHistory history)
        {
            List <COperation> temp   = history.GetOperations();
            string            raport = "";
            DateTime          dt     = DateTime.Now;
            int month = dt.Month;

            foreach (COperation op in temp)
            {
                if (month == op.GetDate().Month)
                {
                    raport += op.GetAmount() + "-";
                    raport += op.GetOperationType() + "...";
                }
            }
            return(raport.Substring(0, raport.Length - 3));
        }
Exemple #5
0
 public string accept(IRaportVisitor vis, CHistory history)
 {
     return(vis.visit(this, history));
 }