Пример #1
0
 /// <summary>
 /// ���ݽ�ɫSysNo����ȡ����ɫ��Ӧ��HasttableȨ��
 /// </summary>
 /// <param name="paramRoleSysNo"></param>
 /// <returns></returns>
 public Hashtable GetPrivilegeHtByRole(int paramRoleSysNo)
 {
     DataSet ds = GetPrivilegeDsByRole(paramRoleSysNo);
     if ( !Util.HasMoreRow(ds))
         return null;
     Hashtable ht = new Hashtable(20);
     foreach(DataRow dr in ds.Tables[0].Rows )
     {
         RolePrivilegeInfo item = new RolePrivilegeInfo();
         map(item, dr);
         ht.Add(item, null);
     }
     return ht;
 }
Пример #2
0
 /// <summary>
 /// Map Role&Privilege relation info
 /// </summary>
 /// <param name="oParam"></param>
 /// <param name="tempdr"></param>
 private void map(RolePrivilegeInfo oParam, DataRow tempdr)
 {
     oParam.SysNo = Util.TrimIntNull(tempdr["SysNo"]);
     oParam.RoleSysNo = Util.TrimIntNull(tempdr["RoleSysNo"]);
     oParam.PrivilegeSysNo = Util.TrimIntNull(tempdr["PrivilegeSysNo"]);
     oParam.PrivilegeID = Util.TrimNull(tempdr["PrivilegeID"]);
     oParam.PrivilegeName = Util.TrimNull(tempdr["PrivilegeName"]);
 }