Ejemplo n.º 1
0
        public ActionResult Index(String userId)
        {
            UserAuthUtil authUtil = new UserAuthUtil();

            String opScope = "";

            String[] roleInfo = authUtil.chkUserFuncAuth(Session["UserID"].ToString(), "~/UserMgr/");
            if (roleInfo != null && roleInfo.Length == 1)
            {
                opScope = "1";
                //roleId = roleInfo[1];
                //funcType = roleInfo[2];
            }


            ViewBag.opScope = opScope;

            /*---畫面下拉選單初始值---*/
            SysCodeDao sysCodeDao = new SysCodeDao();


            //啟用狀態
            var isDisabledList = sysCodeDao.loadSelectList("IS_DISABLED");

            ViewBag.isDisabledList = isDisabledList;

            //是否寄送MAIL
            var isMailList = sysCodeDao.loadSelectList("YN_FLAG");

            ViewBag.isMailList = isMailList;

            //角色群組
            var roleAuthTypeList = sysCodeDao.loadSelectList("ROLE_AUTH_TYPE");

            ViewBag.roleAuthTypeList = roleAuthTypeList;

            //角色名稱
            CodeRoleDao codeRoleDao  = new CodeRoleDao();
            var         CodeRoleList = codeRoleDao.loadSelectList();

            ViewBag.CodeRoleList = CodeRoleList;

            //異動人員
            CodeUserDao codeUserDao  = new CodeUserDao();
            var         CodeUserList = codeUserDao.loadSelectList();

            ViewBag.CodeUserList = CodeUserList;

            if (userId != null)
            {
                UserMgrModel userMgrModel = new UserMgrModel();
                userMgrModel.cUserID = userId;
                ViewBag.cUserID      = userId;
                return(View(userMgrModel));
            }
            else
            {
                return(View());
            }
        }
Ejemplo n.º 2
0
        /// <summary>
        /// 畫面初始
        /// </summary>
        /// <returns></returns>
        public ActionResult Index()
        {
            UserAuthUtil authUtil = new UserAuthUtil();

            String opScope = "";

            String[] roleInfo = authUtil.chkUserFuncAuth(Session["UserID"].ToString(), "~/UserAppr/");
            if (roleInfo != null && roleInfo.Length == 1)
            {
                opScope = roleInfo[0];
            }

            ViewBag.opScope = opScope;


            ///*---畫面下拉選單初始值---*/
            //TypeDefineDao typeDefineDao = new TypeDefineDao();

            ////覆核單種類
            //var ReviewTypeList = typeDefineDao.loadSelectList("reviewType");
            //ViewBag.ReviewTypeList = ReviewTypeList;

            ////覆核狀態
            //var ReviewFlagList = typeDefineDao.loadSelectList("reviewSts");
            //ViewBag.ReviewFlagList = ReviewFlagList;

            return(View());
        }
Ejemplo n.º 3
0
        /**
         * 畫面初始
         **/
        public ActionResult Index()
        {
            UserAuthUtil authUtil = new UserAuthUtil();

            String opScope  = "";
            String roleId   = "";
            String funcType = "";

            String[] roleInfo = authUtil.chkUserFuncAuth(Session["UserID"].ToString(), "~/FuncMgr/");
            if (roleInfo != null && roleInfo.Length == 1)
            {
                opScope = "1";// roleInfo[0];
                //roleId = roleInfo[1];
                //funcType = roleInfo[2];
            }


            ViewBag.opScope = opScope;

            /*---畫面下拉選單初始值---*/
            SysCodeDao sysCodeDao = new SysCodeDao();
            //停用註記
            var FlagList = sysCodeDao.loadSelectList("IS_DISABLED");

            ViewBag.FlagList = FlagList;

            return(View());
        }
Ejemplo n.º 4
0
        protected string GetopScope(string funcId)
        {
            UserAuthUtil authUtil = new UserAuthUtil();
            String       opScope  = "";

            String[] roleInfo = authUtil.chkUserFuncAuth(Session["UserID"].ToString(), funcId);
            if (roleInfo != null && roleInfo.Length == 1)
            {
                opScope = roleInfo[0];
            }
            return(opScope);
        }
Ejemplo n.º 5
0
        /// <summary>
        /// 畫面初始
        /// </summary>
        /// <returns></returns>
        public ActionResult Index()
        {
            UserAuthUtil authUtil = new UserAuthUtil();

            String opScope = "";

            String[] roleInfo = authUtil.chkUserFuncAuth(Session["UserID"].ToString(), "~/RoleAppr/");
            if (roleInfo != null && roleInfo.Length == 1)
            {
                opScope = roleInfo[0];
            }


            ViewBag.opScope = opScope;



            return(View());
        }
Ejemplo n.º 6
0
        protected string[] GetopScope(string funcId)
        {
            UserAuthUtil authUtil = new UserAuthUtil();
            string       opScope  = "";
            string       funcName = "";

            string[] result = new string[2];

            string[] roleInfo = authUtil.chkUserFuncAuth(Session["UserID"].ToString(), funcId);
            if (roleInfo != null && roleInfo.Length == 2)
            {
                opScope   = roleInfo[0];
                funcName  = roleInfo[1];
                result[0] = opScope;
                result[1] = funcName;
            }

            return(result);
        }
Ejemplo n.º 7
0
        public ActionResult Index(String cRoleID)
        {
            UserAuthUtil authUtil = new UserAuthUtil();
            String       opScope  = "";
            String       roleId   = "";
            String       funcType = "";

            String[] roleInfo = authUtil.chkUserFuncAuth(Session["UserID"].ToString(), "~/RoleMgr/");
            if (roleInfo != null && roleInfo.Length == 1)
            {
                opScope = "1";
                //roleId = roleInfo[1];
                //funcType = roleInfo[2];
            }


            ViewBag.opScope = opScope;

            /*---畫面下拉選單初始值---*/
            SysCodeDao sysCodeDao = new SysCodeDao();


            //啟用狀態
            var isDisabledList = sysCodeDao.loadSelectList("IS_DISABLED");

            ViewBag.isDisabledList = isDisabledList;

            //角色群組
            var roleAuthTypeList = sysCodeDao.loadSelectList("ROLE_AUTH_TYPE");

            ViewBag.roleAuthTypeList = roleAuthTypeList;

            //角色名稱
            CodeRoleDao codeRoleDao  = new CodeRoleDao();
            var         CodeRoleList = codeRoleDao.loadSelectList();

            ViewBag.CodeRoleList = CodeRoleList;

            //異動人員
            CodeUserDao codeUserDao  = new CodeUserDao();
            var         CodeUserList = codeUserDao.loadSelectList();

            ViewBag.CodeUserList = CodeUserList;

            RoleMgrModel roleMgrModel = new RoleMgrModel();


            if (!"".Equals(StringUtil.toString(cRoleID)))
            {
                CODE_ROLE codeRole = new CODE_ROLE();
                codeRole = codeRoleDao.qryRoleByKey(cRoleID);


                roleMgrModel.cRoleID      = StringUtil.toString(codeRole.ROLE_ID);
                roleMgrModel.cRoleName    = StringUtil.toString(codeRole.ROLE_NAME);
                roleMgrModel.roleAuthType = StringUtil.toString(codeRole.ROLE_AUTH_TYPE);
                roleMgrModel.isDisabled   = StringUtil.toString(codeRole.IS_DISABLED);
                roleMgrModel.vMemo        = StringUtil.toString(codeRole.MEMO);
                roleMgrModel.cUpdUserID   = StringUtil.toString(codeRole.LAST_UPDATE_UID);

                ViewBag.cRoleID = cRoleID;
                return(View(roleMgrModel));
            }
            else
            {
                return(View());
            }
        }