//获取权限列表
        public List <QXXX> GET_GQXLB(int jsid)
        {
            string sql = "select t.* from calculation.fw_qxb t,calculation.fw_jsqxb t1 where t.id =t1.qxid  and t1.jsid=@jsid and t.fid is null";

            MySqlParameter[] p = { new MySqlParameter("jsid", jsid) };
            return(Modelhelper.类列表赋值 <QXXX>(new QXXX(), MySqlDbhelper.GetDataSet(sql, p).Tables[0]));
        }
Beispiel #2
0
        public List <Rw_List> GET_ZB_RWLB(int mbid, int pagesize, int pagenow)
        {
            string sql = @"select * from calculation.xtgl_bbrw where mbid=@mbid limit @f,@e";

            MySqlParameter[] p = { new MySqlParameter("mbid", mbid), new MySqlParameter("f", pagesize * (pagenow - 1)), new MySqlParameter("e", pagesize * pagenow) };
            return(Modelhelper.类列表赋值(new Rw_List(), MySqlDbhelper.GetDataSet(sql, p).Tables[0]));
        }
        //获取权限列表
        public List <QXXX> GET_QXLB(int jsbh)
        {
            string sql = "select t.* from xtgl_fw_qxxx t,xtgl_fw_jsqx t1 where t.qxbh =t1.qxbh  and t1.jsbh=@jsbh";

            MySqlParameter[] p = { new MySqlParameter("jsbh", jsbh) };
            return(Modelhelper.类列表赋值 <QXXX>(new QXXX(), MySqlDbhelper.GetDataSet(sql, p).Tables[0]));
        }
        public List <JSXX> GET_JSLB(string yhbh)
        {
            string sql = "select * from xtgl_fw_js t,xtgl_fw_yhjs t1 where t.jsbh =t1.jsbh and t1.yhbh=@yhbh ";

            MySqlParameter[] p = { new MySqlParameter("yhbh", yhbh) };
            return(Modelhelper.类列表赋值 <JSXX>(new JSXX(), MySqlDbhelper.GetDataSet(sql, p).Tables[0]));
        }
        //获取用户角色权限
        public List <QXXX> GET_YHQX(string yhbh)
        {
            string sql = @"select  distinct e.qxbh,e.qxmc,e.qxkzq,e.qxst,e.fqxbh,e.qxlx,e.tb
from xtgl_fw_yh a,xtgl_fw_js b,xtgl_fw_yhjs c,xtgl_fw_jsqx d,xtgl_fw_qxxx e
where a.yhbh=c.yhbh and b.jsbh =c.jsbh and d.jsbh=b.jsbh and  e.qxbh=d.qxbh
and a.yhbh=@yhbh";

            MySqlParameter[] p = { new MySqlParameter("yhbh", yhbh) };
            return(Modelhelper.类列表赋值 <QXXX>(new QXXX(), MySqlDbhelper.GetDataSet(sql, p).Tables[0]));
        }
        public List <ZB_TaskModels> GET_ZB_TASK_INFO(string yhbh, int nf, int zc)
        {
            string sql = @"select a.kfsbh,a.kfsmc,max(case when zt ='-1' then sl else '0' end) wqd,max(case when zt ='0' then sl else '0' end ) scz,max(case when zt='1' then sl else '0' end ) ywc from (
select kfsbh,kfsmc,zt,count(*) sl from v_yhfzmb t1 left join (
select t1.nf,t1.zc,t2.rwmc,t2.rwid, case when t2.zt = 4 then '1' when t2.zt is null then '-1' else '0'  end zt,t2.mbid from xtgl_sjrwjhb t1 left join xtgl_bbrw t2 on t1.nf=t2.nf and t1.zc=t2.zc 
where t1.nf=@nf and t1.zc=@zc) t2 on t1.mbbh =t2.mbid
where yhbh =@yhbh
group by t1.kfsbh,kfsmc,zt) a
group by a.kfsbh,a.kfsmc";

            MySqlParameter[] p = { new MySqlParameter("yhbh", yhbh), new MySqlParameter("nf", nf), new MySqlParameter("zc", zc) };
            return(Modelhelper.类列表赋值 <ZB_TaskModels>(new ZB_TaskModels(), MySqlDbhelper.GetDataSet(sql, p).Tables[0]));
        }
        public List <Data_JHNF> GET_JH_NF()
        {
            string sql = "select distinct nf nf from xtgl_sjrwjhb";

            return(Modelhelper.类列表赋值 <Data_JHNF>(new Data_JHNF(), MySqlDbhelper.GetDataSet(sql).Tables[0]));
        }
        /// <summary>
        /// 获取所有权限列表
        /// </summary>
        /// <returns></returns>
        public List <QXXX> GET_QXLB()
        {
            string sql = "select * from calculation.fw_qxb";

            return(Modelhelper.类列表赋值 <QXXX>(new QXXX(), MySqlDbhelper.GetDataSet(sql).Tables[0]));
        }
        /// <summary>
        /// 获取根权限列表
        /// </summary>
        public List <QXXX> GET_GQXLB()
        {
            string sql = "select * from xtgl_fw_qxxx where fqxbh is null or fqxbh = ''";

            return(Modelhelper.类列表赋值 <QXXX>(new QXXX(), MySqlDbhelper.GetDataSet(sql).Tables[0]));
        }
        //获取角色列表
        public List <JSXX> GET_JSLB()
        {
            string sql = "select * from xtgl_fw_js";

            return(Modelhelper.类列表赋值 <JSXX>(new JSXX(), MySqlDbhelper.GetDataSet(sql).Tables[0]));
        }