示例#1
0
 public static RoleActionItem[] List(string __strFilter, string __strSort, int __nPageIndex, int __nPageSize)
 {
     RoleActionItem RoleItem = new RoleActionItem();
     RoleActionItem[] al = (RoleActionItem[])DataBase.HEntityCommon.HEntity(RoleItem).EntityList(__strFilter, "", __nPageIndex, __nPageSize);
     if (null == al || al.Length == 0)
         return null;
     return al;
 }
示例#2
0
 public static RoleActionItem[] GetRoleActions(int _nRoleItemId)
 {
     if (_nRoleItemId <= 0)
         return null;
     RoleActionItem item = new RoleActionItem();
     item.RoleItemId = _nRoleItemId;
     RoleActionItem[] alItems = (RoleActionItem[])HEntityCommon.HEntity(item).EntityList();
     if (null == alItems || alItems.Length == 0)
         return null;
     return alItems;
 }
示例#3
0
 public static RoleActionItem Get(int _nId)
 {
     if (_nId <= 0)
         return null;
     string strFilter = "Id=" + _nId;
     RoleActionItem oItem = new RoleActionItem();
     RoleActionItem[] alist = (RoleActionItem[])HEntityCommon.HEntity(oItem).EntityList(strFilter);
     if (null == alist || alist.Length == 0)
         return null;
     if (alist.Length > 1)
         throw new Exception(string.Format("{0}-{1}:{2} exist mutil records", oItem.GetTableName(), oItem.GetKeyName(), _nId));
     return alist[0];
 }