Example #1
0
        } // end check

        // prevent user to click back to exam after submit
        public int PreventBack()
        {
            var session    = SessionHelper.GetSession();
            var permission = new PermissionModel();
            var check      = new ChooseTypeController().checkPermission(session.ID);

            if (check == 2)
            {
                return(2);
            }
            else
            {
                return(0);
            }
        }
Example #2
0
        // check log status
        public int CheckStatus(int id)
        {
            var permission = new PermissionModel();
            var check      = new ChooseTypeController().checkPermission(id);

            if (check == 1)
            {
                permission.SetLogStatus(id, 1);
                return(1);
            }
            else
            {
                return(0);
            }
        } // end check