//public CODEUSER qryUserUnit(CODEUSER codeUser, string cUserType, string cAgentID) //{ // UnitInfo unit = new UnitInfo(); // if (!"1".Equals(cUserType.ToLower())) // { // AgentInfoDao agentInfoDao = new AgentInfoDao(); // AgentInfo agentInfo = agentInfoDao.qryByAgentId(cAgentID); // UnitInfoDao unitInfoDao = new UnitInfoDao(); // if (agentInfo == null) // return null; // codeUser.CWORKUNITCODE = agentInfo.WorkUnitCode.Trim(); // codeUser.CWORKUNITSEQ = agentInfo.WorkUnitSeq.Trim(); // unit = unitInfoDao.qryByUnitCodeSeq(codeUser.CWORKUNITCODE, codeUser.CWORKUNITSEQ, false); // if (unit == null) // codeUser.CWORKUNITNAME = ""; // else // codeUser.CWORKUNITNAME = StringUtil.toString(unit.UnitName); // codeUser.CBELONGUNITCODE = agentInfo.UnitCode.Trim(); // codeUser.CBELONGUNITSEQ = agentInfo.UnitSeq.Trim(); // unit = unitInfoDao.qryByUnitCodeSeq(codeUser.CBELONGUNITCODE, codeUser.CBELONGUNITSEQ, false); // if (unit == null) // codeUser.CBELONGUNITNAME = ""; // else // codeUser.CBELONGUNITNAME = StringUtil.toString(unit.UnitName); // } // else // { // codeUser.CWORKUNITCODE = ""; // codeUser.CWORKUNITSEQ = ""; // codeUser.CWORKUNITNAME = ""; // codeUser.CBELONGUNITCODE = ""; // codeUser.CBELONGUNITSEQ = ""; // codeUser.CBELONGUNITNAME = ""; // } // return codeUser; //} /// <summary> /// 查詢使用者使用特定功能的權限 /// </summary> /// <param name="userId"></param> /// <param name="funcId"></param> /// <returns></returns> public String[] chkUserFuncAuth(String userId, String funcId) { UserAuthDao userAuthDao = new UserAuthDao(); return(userAuthDao.qryOpScope(userId, funcId)); }
/// <summary> /// 查詢使用者使用特定功能的權限 /// </summary> /// <param name="userId"></param> /// <param name="funcId"></param> /// <returns></returns> public String[] chkUserFuncAuth(string userId, string funcId) { string sysCd = System.Configuration.ConfigurationManager.AppSettings.Get("SysCd"); UserAuthDao userAuthDao = new UserAuthDao(); return(userAuthDao.qryOpScope(sysCd, userId, funcId)); }