public void HigherEducationDAOConstructorTest()
        {
            /*Context*/
            HigherEducationDAO higher_context = new HigherEducationDAO();
            AccountDAO account_context = new AccountDAO();

            /*Insert*/
            AccountDTO account = new AccountDTO();
            account.userName = "******";
            account.status = "active";
            account.password = "******";
            account.accountType = "admin";

            account_context.presist(account);

            HigherEducationDTO higherEdu = new HigherEducationDTO();
            higherEdu.userName = "******";
            higherEdu.country = "SA";
            higherEdu.educationType = "BTECH";
            higherEdu.industry = "Information Technology";
            higherEdu.institution = "CPUT";
            higherEdu.length = "four years";
            higherEdu.major = "Technical Programming";
            higherEdu.nqf = "7";
            higherEdu.province = "WP";
            higherEdu.town = "Cape Town";

            higher_context.presist(higherEdu);

            bool expected = true;
            bool actual;
            actual = higher_context.isFound("john", "Technical Programming");
            Assert.AreEqual(expected, actual);

            /*Update*/
            higherEdu.institution = "UWC";
            higher_context.merge(higherEdu);

            string expectedUpdate = "UWC";
            HigherEducationDTO contUpd = higher_context.find("john", "Technical Programming");
            Assert.AreEqual(expectedUpdate, contUpd.institution);

            /*Delete*/
            higher_context.removeByUserId("john", "Technical Programming");
            bool expectedDelete = false;
            bool actualDelete = higher_context.isFound("john", "Technical Programming");
            Assert.AreEqual(expectedDelete, actualDelete);

            account_context.removeByUserId("john");
        }
 public void doReset()
 {
     if (isMinimumValid())
     {
         HigherEducationDAO higherEducationDao = new HigherEducationDAO();
         HigherEducationDTO higherEducationInfoDto = higherEducationDao.find(view.getUsername(), view.getMajor());
         setHigherEducationDto(higherEducationInfoDto);
         view.showFeedback("Fields are reset.");
     }
     else
     {
         view.showFeedback("Error Field vlaues are not valid");
     }
 }
        protected void rptHigherEducation_ItemCommand(object source, RepeaterCommandEventArgs e)
        {
            HigherEducationDTO dto;
            HigherEducationDAO dao = new HigherEducationDAO();
            String element = e.CommandName.ToString();

            if (element.Equals("major"))
            {
                dto = dao.find(getUsername(), e.CommandArgument.ToString());
                presenter.setHigherEducationDto(dto);
                presenter.updateView();
            }
        }