Esempio n. 1
0
        /// <summary>
        /// Displays the data of particular option
        /// </summary>
        /// <param name="op"></param>
        private static void SqlDataRead(UserChoiceEnum op)
        {
            UserModule    userModule = new UserModule();
            SqlDataReader tab        = userModule.GetUserDetails(op);

            Console.WriteLine(StringLiterals.TableData);

            while (tab.Read())
            {
                for (int i = 0; i < tab.FieldCount; i++)
                {
                    Console.Write(tab.GetValue(i) + "\t");
                }
                Console.WriteLine();
            }
        }
Esempio n. 2
0
        public void LoginPage()
        {
            Authentication authentication = new Authentication();

            LoginModel loginModel = new LoginModel();

            Console.Write(StringLiterals._emailId);
            loginModel.Email = Console.ReadLine();

            Console.Write(StringLiterals._password);
            loginModel.Password = Console.ReadLine();

            if (authentication.Login(loginModel))
            {
                UserModule user = new UserModule();
                Console.WriteLine(StringLiterals._whichInfo);
                int role = Convert.ToInt32(Console.ReadLine());
                user.GetUserDetails((UserRoleChoiceEnum)role);
            }
            else
            {
                Console.WriteLine(StringLiterals._invalidDetails);
            }
        }
Esempio n. 3
0
 public MainMenu()
 {
     _authentication = new Authentication();
     _userModule     = new UserModule();
 }