예제 #1
0
파일: Business.cs 프로젝트: meitarc/Bank
        public override void Calculate(int index, BankMannager manager)
        //calculate the acount money as instructed in the specification file:adds to each saing program 3% and another 0.1% for each click.
        //if balance is positive it gets another 3% and if the balance is negative then 4% is substruced from the balance.
        {
            int counterMounth = 0;

            for (int i = 0; i < manager[index].NumOfSavings.Count; i++)
            {
                manager[index].NumOfSavings[i].Amount += (manager[index].NumOfSavings[i].Amount / 100) * 3
                                                         + (counterMounth * (savingPrograms[i].Amount / 1000));
                TotalAmount += manager[index].NumOfSavings[i].Amount;
            }

            if (TotalAmount > 0)
            {
                Balance     += 3 * (Balance / 100);
                totalAmount += 3 * (Balance / 100);
            }

            else
            {
                Balance     += 4 * (Balance / 100);
                totalAmount += 4 * (Balance / 100);
            }
            counterMounth++;
        }
예제 #2
0
        public virtual void Calculate(int index, BankMannager manager)
        //calculate the acount money as instructed in the specification file:adds to each saing program 1% and another 0.1% for each click.
        //if balance is positive it gets another 1% and if the balance is negative then 7% is substruced from the balance.
        {
            for (int i = 0; i < manager[index].NumOfSavings.Count; i++)
            {
                manager[index].NumOfSavings[i].Amount += manager[index].NumOfSavings[i].Amount / 100
                                                         + (counterMounth * (savingPrograms[i].Amount / 1000));
                totalAmount += manager[index].NumOfSavings[i].Amount;
            }

            if (balance > 0)
            {
                balance     += balance / 100;
                totalAmount += balance / 100;
            }

            else
            {
                balance     += 7 * (balance / 100);
                totalAmount += 7 * (balance / 100);
            }
            counterMounth++;
        }
예제 #3
0
 public ShowDetails(BankMannager manager)// inharits the acount data list.
 {
     this.manager = manager;
     InitializeComponent();
     showDetails();
 }
예제 #4
0
 public AcountActions(BankMannager manager)//inharits the acount data list.
     : this()
 {
     this.manager = manager;
 }
예제 #5
0
 public MainMenu(BankMannager manager)// inharits the acount list data.
     : this()
 {
     this.manager = manager;
 }
예제 #6
0
 public Registering_a_new_client(BankMannager manager)// inharits the acount list data.
     : this()
 {
     this.manager = manager;
 }