protected void Page_Load( object sender , EventArgs e ) { Security s = Session["sec"] as Security; if ( s == null ) { Response.Redirect( "error.aspx" ); } string sxtj = Session["sxtj"] as string; dbModule dm = new dbModule(); int flag = 0; int syjhid = 0; try { flag = Convert.ToInt32(Request["flag"]); syjhid = Convert.ToInt32(Request["id"]); } catch { flag = 0; } if (flag == 1) { dm.setSyjhSqzt(syjhid); Response.Redirect("eadm_syjh_bj.aspx"); } if ( sxtj == "" || sxtj == null ) { SqlDataSource1.SelectCommand = "SELECT sqzt,[ID],[KCID],[JSXM], [SYID], [SYBH], [SYMC], [KCMC], [SYRS], [SYKS], [SYSID], [SYJSID], [SYSMC],[SYSDD], [SYXN], [SYXQ], [SYZ], [SYXINGQ],[MC],[XINGQMC],[ZMC] FROM [V_SYJHXXB] where kcid in (select kcid from v_gly_sys_kc where glyid='" + s.getUserCode() + "') ORDER BY [SYMC], [SYBH]"; } else { SqlDataSource1.SelectCommand = "SELECT sqzt,[ID],[KCID], [SYID],[JSXM], [SYBH], [SYMC], [KCMC], [SYRS], [SYKS], [SYSID], [SYJSID], [SYSMC],[SYSDD],[SYXN], [SYXQ], [SYZ], [SYXINGQ],[MC],[XINGQMC],[ZMC] FROM [V_SYJHXXB] where kcid in (select kcid from v_gly_sys_kc where glyid='" + s.getUserCode() + "') and (sybh like '%" + sxtj + "%' or JSXM like '%" + sxtj + "%' or kcmc like '%" + sxtj + "%' or sysmc like '%" + sxtj + "%' or SYSDD like '%" + sxtj + "%' or syxn like '%" + sxtj + "%') ORDER BY [SYMC], [SYBH]"; } if (!IsPostBack) { //JSSDS.SelectCommand = "SELECT [ID], [SYMC]+'(' + [JSXM] + ')' as SYMC FROM [V_SYJBXXB] where kcid in (select kcid from v_gly_sys_kc where glyid='" + s.getUserCode() + "') ORDER BY [SYMC]"; SYSSDS.SelectCommand = "SELECT [ID], [SYSDD] FROM [T_SYSXXB] WHERE id in (select sysid from v_gly_sys_kc where glyid='" + s.getUserCode() + "') and ([ID] <> @ID) ORDER BY [SYSDD]"; } }