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 Rw_Item_Model GET_RWXQ(int mbid, int nf, int zc) { string sql = "select * from calculation.xtgl_bbrw where mbid= @mbid and nf=@nf and zc=@zc"; MySqlParameter[] p = { new MySqlParameter("mbid", mbid), new MySqlParameter("nf", nf), new MySqlParameter("zc", zc) }; return(Modelhelper.类对象赋值 <Rw_Item_Model>(new Rw_Item_Model(), MySqlDbhelper.GetDataSet(sql, p).Tables[0])); }
public ZB_ZJ_CS GET_ZJ_ZB_CS(int mbid) { string sql = "select rwid,nf,zc,mbid from xtgl_bbrw where (zt = 3 or zt =4) and mbid =@mbid order by nf desc,zc desc limit 1"; MySqlParameter[] p = { new MySqlParameter("mbid", mbid) }; return(Modelhelper.类对象赋值 <ZB_ZJ_CS>(new ZB_ZJ_CS(), MySqlDbhelper.GetDataSet(sql, p).Tables[0])); }
//获取权限列表 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])); }
public Rw_Item_Model GET_RWXQ(int rwid) { string sql = "select * from calculation.xtgl_bbrw where rwid=@rwid"; MySqlParameter[] p = { new MySqlParameter("rwid", rwid) }; return(Modelhelper.类对象赋值 <Rw_Item_Model>(new Rw_Item_Model(), 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 Rw_Cofirm_data GET_RWZT(int rwid, int nf, int zc) { string sql = @"select t1.rwid,t1.rwmc,t1.nf,t1.zc,t2.cjjl_zt,t2.xzys_zt,t2.tdcj_zt,t2.rgsj_zt from calculation.xtgl_bbrw t1 left join calculation.xtgl_ConfirmData t2 on t1.rwid = t2.rwid where t1.rwid=@rwid and t1.nf = @nf and t1.zc=@zc"; MySqlParameter[] p = { new MySqlParameter("rwid", rwid), new MySqlParameter("nf", nf), new MySqlParameter("zc", zc) }; return(Modelhelper.类对象赋值(new Rw_Cofirm_data(), MySqlDbhelper.GetDataSet(sql, p).Tables[0])); }
public QXXX GET_YHQX(string qxkzq, string qxst) { string sql = @"select qxbh,fqxbh,qxmc,qxkzq,qxst from xtgl_fw_qxxx where qxbh = (select substr(qxbh, 1, 4) from xtgl_fw_qxxx where qxkzq = @qxkzq and qxst = @qxst)"; MySqlParameter[] p = { new MySqlParameter("qxkzq", qxkzq), new MySqlParameter("qxst", qxst) }; return(Modelhelper.类对象赋值 <QXXX>(new QXXX(), 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 YHXX CHECK_LOGIN(string yhmc, string yhmm) { string sql = "select * from xtgl_fw_yh where yhmc=@yhmc and yhmm=@yhmm"; MySqlParameter[] p = { new MySqlParameter("yhmc", yhmc), new MySqlParameter("yhmm", yhmm) }; DataTable dt = MySqlDbhelper.GetDataSet(sql, p).Tables[0]; if (dt != null && dt.Rows.Count > 0) { return(Modelhelper.类对象赋值 <YHXX>(new YHXX(), MySqlDbhelper.GetDataSet(sql, p).Tables[0])); } else { return(null); } }
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])); }