Пример #1
0
        /// <summary>
        /// 获得选择列表
        /// </summary>
        public DataSet GetCheckList(int FlagType)
        {
            DAL.Common db = new DAL.Common();
            DataSet    ds = db.GetSelect("AdminFlag", "  FlagType = " + FlagType + "", "OrderID asc", " ID,FlagName"); // dal.GetList(strWhere);

            return(ds);
        }
Пример #2
0
        /// <summary>
        /// 数据Select
        /// </summary>
        /// <param name="Item">项目类别</param>
        /// <param name="IsUsing">是否启用 0不启用 1启用 -1全部</param>
        /// <returns></returns>
        public DataSet GetSelect(string Item, int IsUsing)
        {
            string strWhere = "Item='" + Utils.SqlStringFormat(Item, 1) + "'";

            if (IsUsing == 0 || IsUsing == 1)
            {
                strWhere += " and IsUsing=" + IsUsing;
            }
            DAL.Common db = new DAL.Common();
            DataSet    ds = db.GetSelect("SysConfig", strWhere, "OrderID asc", "[Value],[Name]"); //GetList(Item, IsUsing);

            return(ds);
        }
Пример #3
0
        /// <summary>
        /// 获取角色列表
        /// </summary>
        /// <returns></returns>
        public DataSet GetRoleChk(string RoleIDs)
        {
            var db = new DAL.Common();
            var ds = db.GetSelect("AdminRole", "", " RoleID ", " RoleID,RoleName");

            if (RoleIDs.IndexOf("67") == -1)
            {
                DataTable dt        = ds.Tables[0];
                int       rowsCount = dt.Rows.Count;
                for (int i = 0; i < rowsCount; i++)
                {
                    if (RoleIDs.IndexOf(dt.Rows[i]["RoleID"].ToString()) == -1)
                    {
                        dt.Rows[i]["RoleID"] = -1;
                    }
                }
            }

            return(ds);
        }
Пример #4
0
 /// <summary>
 /// 返回用户分组下来列表
 /// </summary>
 /// <returns>返回用户分组下来列表</returns>
 public DataSet GetSel()
 {
     DAL.Common db = new DAL.Common();
     return(db.GetSelect("MemberGroup", "", " GroupID ", " GroupID,GroupName "));
 }
Пример #5
0
 public DataSet GetRoleChildFlag(int ParentID)
 {
     DAL.Common db = new DAL.Common();
     return(db.GetSelect("AdminFlag ", " ParentID =" + ParentID + " AND FlagType=0", " ID ", " ID,FlagName,HaveChildNav,Icon,Flag"));
 }