Exemple #1
0
        public void GetListUserEventTest()
        {
            //arrange
            UserEventDAL ueDal = new UserEventDAL();
            //act
            var result = ueDal.UeListAllHome();

            //assert

            Assert.IsNotNull(result);
        }
        public ActionResult Index()
        {
            UserEventDAL userDao   = new UserEventDAL();
            var          userCom   = Session[CommonConstants.USER_COM] == null ? "no" : Session[CommonConstants.USER_COM].ToString();
            var          systemCom = Dns.GetHostEntry(Request.ServerVariables["REMOTE_ADDR"]).HostName.ToString();

            bool resultCom       = homeDao.CheckUserCom(userCom, systemCom);
            bool resultCheckedIn = Session[CommonConstants.CHECKED] == null ? true : false;

            HomeViewModel model = new HomeViewModel();

            model.IsHideButtonByComName = resultCom && resultCheckedIn;
            model.ListUserForHome       = userDao.UeListAllHome();

            return(View("Index", model));
        }