protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { HyoaClass.Hyoa_jszc Hyoa_jszc = new HyoaClass.Hyoa_jszc(); DataTable dt = Hyoa_jszc.Getdocs(); if (dt.Rows.Count > 0) { this.ddlifjszc.SelectedValue = dt.Rows[0]["ifjszc"].ToString(); this.ddlifwebqq.SelectedValue = dt.Rows[0]["ifwebqq"].ToString(); } } }
protected void Button_Save_Click(object sender, EventArgs e) { HyoaClass.Hyoa_jszc Hyoa_jszc = new HyoaClass.Hyoa_jszc(); DataTable dt = Hyoa_jszc.Getdocs(); if (dt.Rows.Count > 0) { Hyoa_jszc.id = dt.Rows[0]["id"].ToString(); Hyoa_jszc.ifjszc = this.ddlifjszc.SelectedValue; Hyoa_jszc.ifwebqq = this.ddlifwebqq.SelectedValue; Hyoa_jszc.Update(); } else { Hyoa_jszc.ifjszc = this.ddlifjszc.SelectedValue; Hyoa_jszc.ifwebqq = this.ddlifwebqq.SelectedValue; Hyoa_jszc.Insert(); } Response.Write("<script>alert('保存成功!');window.location='jszc.aspx';</script>"); }
//技术支持、webqq protected void getjszc() { HyoaClass.Hyoa_jszc Hyoa_jszc = new HyoaClass.Hyoa_jszc(); DataTable dt = Hyoa_jszc.Getdocs(); if (dt.Rows.Count > 0) { if (dt.Rows[0]["ifjszc"].ToString() == "0") { spjszc.Visible = false; } //if (dt.Rows[0]["ifwebqq"].ToString() == "1") //{ // hy_webqq_top += "|"; // hy_webqq_top += "<a href=\"#\" onclick=\"f_addTab('wdxx', '未读消息', 'system/list_znxx.aspx?rnd='+Math.random());\"> 未读消息"; // hy_webqq_top += "(<font color=\"red\"><span id=\"lblznxx\">" + getwdxxs() + "</span></font>) </a>"; // hy_webqq_top += "|"; // hy_webqq_top += "<a href=\"#\" onclick=\"document.getElementById('btn_slideleft').click();\"> 在线用户"; // hy_webqq_top += "(<font color=\"red\"><span id=\"lblzxyh\">" + getzxyhs() + "</span></font>) </a>"; // hy_webqq += "<div id=\"common_box\" style=\"display:none\">"; // hy_webqq += "<div>"; // hy_webqq += "<iframe id=\"webqq\" src=\"jstx/Hy_Frame_jstx.aspx\" frameborder=\"0\" width=\"100%\" height=\"530px\" scrolling=\"no\" frameborder=\"0\" allowTransparency=\"true\"></iframe>"; // hy_webqq += "</div>"; // hy_webqq += "</div>"; // hy_webqq += "<input type=\"button\" id=\"btn_slideleft\" value=\"展开收缩\" style=\"display:none\" />"; //} } }