public ActionResult qryRoleList(string roleAuthType) { try { CodeRoleDao codeRoleDao = new CodeRoleDao(); var roleStr = codeRoleDao.jqGridRoleList(roleAuthType); return(Json(new { success = true, roleList = roleStr })); } catch (Exception e) { logger.Error("[qryEquip]:" + e.ToString()); return(Json(new { success = false, err = "其它錯誤,請洽系統管理員!!" })); } }
/// <summary> /// 使用者資訊codeUser /// </summary> /// <param name="cUserID"></param> /// <returns></returns> public ActionResult detailUser(string userId) { /*---畫面下拉選單初始值---*/ 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.jqGridList("ROLE_AUTH_TYPE"); ViewBag.roleAuthTypeList = roleAuthTypeList; ////查詢使用者資訊 //CodeUserDao codeUserDao = new CodeUserDao(); //CODEUSER codeUser = codeUserDao.qryByKey(cUserID); ////查詢角色 CodeRoleDao codeRoleDao = new CodeRoleDao(); var roleStr = codeRoleDao.jqGridRoleList(""); ViewBag.roleList = roleStr; //將值搬給畫面欄位 UserMgrModel userMgrModel = new UserMgrModel(); if ("".Equals(StringUtil.toString(userId))) { ViewBag.bHaveData = false; return(View(userMgrModel)); } userMgrModel.cUserID = userId; List <UserMgrModel> rows = qryUserData(userMgrModel); if (rows.Count > 0) { ViewBag.bHaveData = true; //return RedirectToAction("Index", "Home"); return(View(rows[0])); } else { ViewBag.bHaveData = false; return(View(userMgrModel)); } }