コード例 #1
0
        /// <summary>
        /// 查询系统参数
        /// </summary>
        /// <param name="parent_type">0 一级参数 1 二级参数</param>
        /// <returns></returns>
        public DataSet ParamList(int parent_type)
        {
            string strSql = @"select (select title from bas_param where id=a.parent_id) ptitle,a.* from bas_param a  ";

            strSql += " where 1=1 ";
            if (parent_type > 0)
            {
                strSql += " and parent_id =" + parent_type.ToString();
            }
            else
            {
                strSql += " and parent_id=0";
            }
            strSql += " order by id desc ";
            DataSet ds = new DataSet();

            try
            {
                ds = DataBase.ExecuteDataSet(strSql, 1, 1000);
            }
            catch (Exception ex)
            {
                throw ex;
            }
            return(ds);
        }
コード例 #2
0
ファイル: Log.cs プロジェクト: fengxing1121/Hi
        /// <summary>
        /// 获得数据列表
        /// </summary>
        public DataSet BasLogSqlList(Hashtable hash, int pageIndex, int pageSize)
        {
            string strSql = Hi.Common.Db.DbUtils.WebPageSql(GetBasLogSql(hash), pageIndex, pageSize);

            strSql += " order by id desc ";
            return(DataBase.ExecuteDataSet(strSql, pageIndex, pageSize));
        }
コード例 #3
0
        public DataSet List(Dictionary <string, string> hash, int pageindex, int pagesize)
        {
            string  strSql = Hi.Common.Db.DbUtils.WebPageSql(DepartmentSql(hash), pageindex, pagesize);
            DataSet ds     = new DataSet();

            try
            {
                ds = DataBase.ExecuteDataSet(strSql);
            }
            catch (Exception ex)
            {
                throw ex;
            }
            return(ds);
        }
コード例 #4
0
        public DataSet GetSysMenu(string parent_id)
        {
            string  sql = "select * from bas_module where module_father=" + parent_id + " order by module_sort  ";
            DataSet set = new DataSet();

            try
            {
                set = DataBase.ExecuteDataSet(sql);
            }
            catch (Exception exception)
            {
                throw exception;
            }
            return(set);
        }
コード例 #5
0
        public DataSet BasModuleRole()
        {
            string  strSql = "select (select module_name from bas_module b where b.module_id=a.module_father) father_name,a.* from bas_module a where module_father>0 ";
            DataSet ds     = new DataSet();

            try
            {
                ds = DataBase.ExecuteDataSet(strSql);
            }
            catch (Exception exception)
            {
                throw exception;
            }
            return(ds);
        }
コード例 #6
0
        public DataSet ModuleInRole(int roleid)
        {
            string  strSql = " select * from bas_module_role where role_id=" + roleid;
            DataSet ds     = new DataSet();

            try
            {
                ds = DataBase.ExecuteDataSet(strSql);
            }
            catch (Exception exception)
            {
                throw exception;
            }
            return(ds);
        }
コード例 #7
0
        public DataSet RoleList(int pageindex, int pagesize)
        {
            string  strSql = RoleSql();
            DataSet ds     = new DataSet();

            try
            {
                ds = DataBase.ExecuteDataSet(strSql, pageindex, pagesize);
            }
            catch (Exception ex)
            {
                throw ex;
            }
            return(ds);
        }
コード例 #8
0
        /// <summary>
        /// 获得数据列表
        /// </summary>
        #region 模块分页列表
        public DataSet BasModuleList(int pageindex, int pagesize)
        {
            string  strSql = BasModuleSql();
            DataSet set    = new DataSet();

            try
            {
                set = DataBase.ExecuteDataSet(strSql, pageindex, pagesize);
            }
            catch (Exception exception)
            {
                throw exception;
            }
            return(set);
        }
コード例 #9
0
        public DataSet ParamList(Dictionary <string, string> dict, int pageindex, int pagesize, string sort)
        {
            string strSql = StringSql(dict);

            strSql += " order by id desc ";
            DataSet ds = new DataSet();

            try
            {
                ds = DataBase.ExecuteDataSet(strSql, pageindex, pagesize);
            }
            catch (Exception ex)
            {
                throw ex;
            }
            return(ds);
        }
コード例 #10
0
        public DataSet ParamListFromCode(string parent_code)
        {
            string strSql = @"select id,parent_id,grade,ltrim(rtrim(code)) code,title,
enumValue,remark,sort,enable_flag from bas_param where parent_id in(select id from bas_param where parent_id=0 and code ='" + parent_code.ToString() + "')";

            DataSet ds = new DataSet();

            try
            {
                ds = DataBase.ExecuteDataSet(strSql, 1, 100);
            }
            catch (Exception ex)
            {
                throw ex;
            }
            return(ds);
        }
コード例 #11
0
        /// <summary>
        /// 查询系统所有参数
        /// </summary>
        /// <returns></returns>
        public DataSet ParamList()
        {
            string strSql = @"select (select title from bas_param where id=a.parent_id) ptitle,(select code from bas_param where id=a.parent_id) pcode,a.* from bas_param a  ";

            strSql += " where 1=1 ";

            strSql += " order by id desc ";
            DataSet ds = new DataSet();

            try
            {
                ds = DataBase.ExecuteDataSet(strSql, 1, 1000);
            }
            catch (Exception ex)
            {
                throw ex;
            }
            return(ds);
        }
コード例 #12
0
ファイル: User.cs プロジェクト: fengxing1121/Hi
        /// <summary>
        /// 获得数据列表
        /// </summary>
        public DataSet List(Dictionary <string, string> dict, int pageIndex, int pageSize, string sort)
        {
            string strSql = GetSql(dict);

            return(DataBase.ExecuteDataSet(strSql, pageIndex, pageSize));
        }
コード例 #13
0
ファイル: Log.cs プロジェクト: fengxing1121/Hi
        /// <summary>
        /// 获得数据列表
        /// </summary>
        public DataSet List(Hashtable hash, int pageIndex, int pageSize)
        {
            string strSql = Hi.Common.Db.DbUtils.WebPageSql(GetSql(hash), pageIndex, pageSize);

            return(DataBase.ExecuteDataSet(strSql, pageIndex, pageSize));
        }