Example #1
0
        public void Detail_akun()
        {
            Akun data = Data_Akun[Login_status];

            Console.WriteLine("Detail Akun\nNama : {0}", data.Ambil_data(1));
            Console.WriteLine("Email : {0}", data.Ambil_data(3));
            Console.WriteLine("Pin : {0}", data.Ambil_data(4));
            Console.WriteLine("Saldo : {0}", data.Ambil_saldo());
            Console.WriteLine("Tabungan : {0}\nPress any key to exit", data.Ambil_tabungan());
            Console.ReadKey();
        }
Example #2
0
        public void Proses_saldo(int pilihan, long saldo)
        {
            Akun data = Data_Akun[Login_status];

            switch (pilihan)
            {
            case 1:     //menambah jumlah saldo
                if (data.Ubah_data(3, null, saldo))
                {
                    Console.Write("\nSaldo berhasil ditambahkan\nPress any key to exit\n"); Console.ReadKey();
                }
                break;

            case 2:     //menambah isi tabungan
                if (data.Ubah_data(2, null, saldo))
                {
                    Console.Write("\nTabungan berhasil ditambahkan\nPress any key to exit\n"); Console.ReadKey();
                }
                else
                {
                    Console.Write("Saldo tak cukup, jumlah saldo {0}\nPress any key to exit\n", data.Ambil_saldo()); Console.ReadKey();
                }
                break;

            case 3:     //tarik saldo
                if (data.Ubah_data(1, null, saldo))
                {
                    Console.Write("\nUang senilai {0} berhasil ditarik, sisa saldo {1}\nPress any key to exit\n", saldo, data.Ambil_saldo()); Console.ReadKey();
                }
                else
                {
                    Console.Write("\nSaldo kurang, sisa saldo {0}\npress any key to exit\n", data.Ambil_saldo()); Console.ReadKey();
                }
                break;

            case 4:     //tarik tabungan ke saldo
                if (data.Tabungan(1, saldo))
                {
                    Console.Write("\nSaldo senilai {0} berhasil ditarik dari tabungan, sisa tabungan {1}\npress any key to exit\n", saldo, data.Ambil_tabungan()); Console.ReadKey();
                }
                else
                {
                    Console.Write("\nTabungan kurang, sisa tabungan {0}\nPress any key to exit\n", data.Ambil_tabungan()); Console.ReadKey();
                }
                break;
            }
        }