public BLReports(DLReports dr) { this.dr = dr; }
static void Main(string[] args) { DLAccountCreation da = new DLAccountCreation(); DLMoneyTransaction dmt = new DLMoneyTransaction(); DLInterestCalculation di = new DLInterestCalculation(); DLReports dr = new DLReports(); BLAccountCreation ba = new BLAccountCreation(da); BLMoneyTransaction bmt = new BLMoneyTransaction(dmt); BLInterestCalculation bi = new BLInterestCalculation(di); BLReports br = new BLReports(dr); userPresentation up = new userPresentation(ba, bmt, bi); adminPresentation ap = new adminPresentation(ba, bi, br); label: try { heading("IBS"); serivceMenu(); int choice = int.Parse(Console.ReadLine()); switch (choice) { case 1: //Login as admin or user Console.Clear(); heading("IBS"); Console.ForegroundColor = ConsoleColor.Blue; Console.WriteLine("\n\n\n\t\t\t\t\t\t LOGIN PORTAL"); Console.ForegroundColor = ConsoleColor.Black; Console.WriteLine("\t\t\t\t\t\t -------------"); Console.WriteLine("\n\n\t\t\t\t\t please enter your UserID Number : "); Console.SetCursorPosition(Console.CursorLeft + 55, Console.CursorTop); string userid = Console.ReadLine(); Console.WriteLine("\n\t\t\t\t\t\t Enter Password : "******"customer") { up.usermenu(userid, password); } else if (role == "admin") { ap.adminMenu(userid); } } else { Console.ForegroundColor = ConsoleColor.DarkRed; Console.SetCursorPosition(Console.CursorLeft + 50, Console.CursorTop); Console.WriteLine("\nIncorrect Username no or password\nLogin Failed"); Console.Beep(); Console.ForegroundColor = ConsoleColor.Black; Console.WriteLine("\nPress any Key to go back"); Console.ReadKey(); } break; case 2: //Resgitration for both user and admin Console.Clear(); heading("IBS Registration"); Console.ForegroundColor = ConsoleColor.DarkBlue; Console.WriteLine("\n\n\n\n\t\t\tDo u want register as an admin or a user(Press A for admin and U for user)?\n\n"); Console.ForegroundColor = ConsoleColor.Black; Console.SetCursorPosition(Console.CursorLeft + 57, Console.CursorTop); string s = Console.ReadLine(); if (s == "A" || s == "a") { Console.Clear(); heading("IBS Admin Registration"); Console.ForegroundColor = ConsoleColor.Blue; Console.WriteLine("\n\n\t\t\t\t\t\t Register Your Account"); Console.WriteLine("\t\t\t\t\t\t ---------------------"); Console.WriteLine("\n\n\tPlease enter your Personal details: "); ap.adminregistration(); } else if (s == "U" || s == "u") { Console.Clear(); heading("IBS User Registration"); Console.ForegroundColor = ConsoleColor.Blue; Console.WriteLine("\n\n\t\t\t\t\t\t Register Your Account"); Console.WriteLine("\t\t\t\t\t\t ---------------------"); Console.WriteLine("\n\n\tPlease enter your Personal details: "); up.userRegistration(); } else { Console.ForegroundColor = ConsoleColor.DarkRed; Console.SetCursorPosition(Console.CursorLeft + 50, Console.CursorTop); Console.WriteLine("\nIncorrect Input "); Console.Beep(); Console.ForegroundColor = ConsoleColor.Black; Console.WriteLine("\nPress any Key to go back"); Console.ReadKey(); } break; case 3: //Checking status of newly created account of Customer Console.ForegroundColor = ConsoleColor.DarkBlue; Console.WriteLine("\n\n\t\t\t\t Enter the temporary User Id no of your application"); Console.ForegroundColor = ConsoleColor.Black; Console.SetCursorPosition(Console.CursorLeft + 60, Console.CursorTop); string uid = Console.ReadLine(); string currstatus = ba.b_checkStatus(uid); up.displayStatus(currstatus, uid); Console.WriteLine("\nPress any Key to go back"); Console.ReadKey(); break; default: Console.WriteLine("Invalid Choice"); Console.WriteLine("\nPress any Key to go back"); Console.ReadKey(); break; } } catch (Exception e) { Console.WriteLine(e.Message); Console.WriteLine("\nPress any Key to go back"); Console.ReadKey(); } goto label; }