Example #1
0
        public static UserProfile Account_GetEmployee(Account account, UserAccountTypes userType)
        {
            IUserAccountDAL userAccountDB;

            switch (userType)
            {
            case UserAccountTypes.Employee:
                userAccountDB = new EmployeeUserAccountDAL(connectionstring);
                break;

            case UserAccountTypes.Customer:
                userAccountDB = new CustomerUserAccountDAL(connectionstring);
                break;

            default:
                throw new Exception("usertype is not valid");
            }
            return(userAccountDB.GetEmployee(account));
        }