示例#1
0
        }//end of AddStudent

        //getting all the students from
        public List <Student> getStudents()
        {
            DALAccountManager manager = new DALAccountManager();

            List <Student> studs = manager.getStudents();

            return(studs);
        }//end of getStudents
示例#2
0
        }//end of EditStudentDetails

        //getting one account details by using accNumber
        public Account GetAccountRecord(int accountNumber)
        {
            Account           acc     = new Account();
            DALAccountManager manager = new DALAccountManager();

            acc = manager.GetAccountRecord(accountNumber);

            return(acc);
        }
示例#3
0
        }//end of GetAccountDetailsAsList

        //Method when passed a Student object will call method on DAL layer
        //that will change the details of particular student in the database
        public bool EditStudentDetails(Student stu)
        {
            DALAccountManager dalAccMngr = new DALAccountManager();

            bool retVal = false;

            retVal = dalAccMngr.EditStudentDetails(stu);

            return(retVal);
        }//end of EditStudentDetails
示例#4
0
        }//end of AddAccount

        //Method to create new Student record
        //uses DAL passing it an object of type Student
        public bool AddStudent(Student stud, out int studID)
        {
            DALAccountManager manager = new DALAccountManager();

            bool retVal = false;

            retVal = manager.addStudent(stud, out studID);

            return(retVal);
        }//end of AddStudent
示例#5
0
        }//end of GetAcountsByStudentFirsName

        //Method to add acount and pass out account number
        //uses DAL and passes on object of type Account to it
        public bool AddAccount(Account acc, out int accNumber)
        {
            DALAccountManager manager = new DALAccountManager();

            bool retVal = false;

            retVal = manager.AddAccount(acc, out accNumber);

            return(retVal);
        }//end of AddAccount
示例#6
0
        }//end of getStudents

        // getting account information out to main display
        public List <Account> GetAccountDetailsAsList()
        {
            List <Account> AccDetailsList = null;

            DALAccountManager dalAccMngr = new DALAccountManager();

            try
            {
                AccDetailsList = dalAccMngr.GetAccountDetailsAsList();
                // This line will exclude external account from the list  displayd on main screen.
                // Using simple lambda inside LINQ
                AccDetailsList = AccDetailsList.Where(Account => Account.AccountType != "external").ToList();
            }
            catch (Exception ex)
            {
                throw ex;
            }

            return(AccDetailsList);
        }//end of GetAccountDetailsAsList