日期:2014-05-17 浏览次数:20551 次
string querySql = "select xtpz.xtpz_id,xtpz.pzxdm,xtpz.pzxmc,xtpz.xtpzfl,xtpz.kjlx,xtpz.pzxcszfw,xtpz.pzxcsz,xtpz.pzxmrcsz,xtpz.qyzt,xtpz.fwlx,xtpz.xjsfgl,xtpz.xjsfck" + ",xtpz.zd_guid,xtpz.glyfl,xtpz.xzqy_dm,xtpz.bzts" + ",sjyz.xtpzsjyz_id,sjyz.yzbz,sjyz.zxzsl,sjyz.zdzsl,sjyz.sfbt" + " from xt_xtpz xtpz " + "left join XT_XTPZSJYZ sjyz on xtpz.xtpz_id=sjyz.xtpz_id " + "where xtpz.GLYFL=@GLYFL and trim(xtpz.ZD_GUID)=@ZD_GUID and xtpz.XZQY_DM=@XZQY_DM and xtpz.XJSFGL='0' and xtpz.XTPZFL=@XTPZFL and xtpz.QYZT='1'"; ObjectParameter[] para = new ObjectParameter[4]; ObjectParameter p1 = new ObjectParameter("GLYFL", typeof(System.Int32)); p1.Value = glyFl_Code; ObjectParameter p2 = new ObjectParameter("ZD_GUID", typeof(System.String)); p2.Value = zd_guid; ObjectParameter p3 = new ObjectParameter("XZQY_DM", typeof(System.String)); p3.Value = xzqy_dm; ObjectParameter p4 = new ObjectParameter("XTPZFL", typeof(System.Int64)); p4.Value = xtpz_fl; para[0] = p1; para[1] = p2; para[2] = p3; para[3] = p4; IEnumerable<ViewShareConfig> dataList = db.ExecuteStoreQuery<ViewShareConfig>(querySql, para);